Partition type 0x12 could be hidden

Bug #451304 reported by Jan Gutter
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
Undecided
Unassigned
obsolete
Fix Released
Medium
devicekit-disks (Ubuntu)
Fix Released
Low
Martin Pitt
Karmic
Fix Released
Undecided
Martin Pitt

Bug Description

Binary package hint: devicekit-disks

/lib/udev/rules.d/95-devkit-disks.rules contains rules to hide system recovery partitions and such: here's an excerpt:

# special MBR partition types (EFI, hidden, etc.)
# see http://www.win.tue.nl/~aeb/partitions/partition_types-1.html
ENV{DKD_PARTITION_SCHEME}=="mbr", \
  ENV{DKD_PARTITION_TYPE}=="0x00|0x11|0x14|0x16|0x17|0x1b|0x1c|0x1e|0x27|0x3d|0x84|0x8d|0x90|0x91|0x92|0x93|0x97|0x98|0x9a|0x9b|0xbb|0xc2|0xc3|0xdd|0xef", \
  ENV{DKD_PRESENTATION_HIDE}="1"

According to the web site listed, partition type 0x12 (Compaq diagnostics) is also used by Thinkpads for the recovery partition. I can confirm this, at least on my Lenovo X200 Tablet. Adding 0x12 to the hidden partition types would hide the recovery partition by default, which I consider to be a bonus: a technically minded user can always unhide the partition if they need access to it. As I've already hidden mine with a custom rule, I don't mind either way.

The main reason why my recovery partition wasn't hidden using other rules, was because it does not have a label.

Thanks for the hard work guys, it really shows!

Martin Pitt (pitti)
Changed in devicekit-disks (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Low
status: New → In Progress
Revision history for this message
In , Martin Pitt (pitti) wrote :

From downstream report:

  "According to the web site listed, partition type 0x12 (Compaq diagnostics) is also used by Thinkpads for the recovery partition. I can confirm this, at least on my Lenovo X200 Tablet. Adding 0x12 to the hidden partition types would hide the recovery partition by default, which I consider to be a bonus: a technically minded user can always unhide the partition if they need access to it. As I've already hidden mine with a custom rule, I don't mind either way."

Indeed http://www.win.tue.nl/~aeb/partitions/partition_types-1.html lists 0x12 only for configuration/rescue.

Revision history for this message
In , Martin Pitt (pitti) wrote :

Created an attachment (id=31067)
git formatted patch

Revision history for this message
Martin Pitt (pitti) wrote :

Patch sent upstream for review and inclusion.

Changed in devicekit-disks (Ubuntu):
status: In Progress → Fix Committed
Changed in devicekit:
status: Unknown → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package devicekit-disks - 009-1ubuntu2

---------------
devicekit-disks (009-1ubuntu2) lucid; urgency=low

  Resynchronize to Debian git head, no remaining Ubuntu changes.

  [ Michael Biebl ]
  * debian/patches/09-reiserfs-support.patch
    - Add support for ReiserFS.

  [ Martin Pitt ]
  * Add debian/local/ubuntu.pkla: Allow passwordless file system operations
    for local foreground admin user sessions on Ubuntu. Install it in
    debian/rules. (LP: #465054)
  * Add 02-allow-simulated-smart.patch: Allow simulated SMART data on
    non-SMART devices. This is both useful for testing DK-disks itself, as
    well as recreating bugs with SMART handling. (fd.o #24772)
  * Add 03-hide-configuration-partition-12.patch: Hide Compaq recovery
    partition type 0x12. (fd.o #24999, LP: #451304)
  * Add 04-hide-wd-smartware-partition.patch: Ignore Western Digital SmartWare
    partitions. (fd.o #25009, LP: #474790)
  * Add 06-guid-partition-flags.patch: Fix setting flags for GUID partitions.
    (fd.o #25034)
 -- Martin Pitt <email address hidden> Wed, 11 Nov 2009 17:42:19 +0100

Changed in devicekit-disks (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Steve Magoun (smagoun) wrote :

Impact:
A regression in the hal-->devicekit-disks transition resulted in hidden recovery partitions appearing after an upgrade to 9.10. Some ACER systems use a hidden recovery partition of type 0x12 (label 'PQSERVICE'). These hidden partitions were hidden from the user in 9.04, but are not properly hidden in 9.10 with devicekit-disks 007-2ubuntu3. In 9.10 it is possible for the user to mount these hidden partitions and modify the files on them, inadvertently breaking the system recovery feature.

Fix:
The patch 03-hide-configuration-partition-12.patch fixes this behavior on 9.10.

TEST CASE:
On a system that contains a hidden partition of type 0x12, install 9.04. Notice that the partition cannot be accessed from the file manager or the Places menu. Upgrade to 9.10; the hidden partition will now be visible in the file manager. Update to a patched version of devicekit-disks. The hidden partition should not be accessible from the file manager or Places menu.

Regression potential:
Users who rely on access to a hidden partition of type 0x12 will no longer have access to the partition. I expect this is a very small set of users.

Revision history for this message
Steve Magoun (smagoun) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

This looks good; I also want to fold the fix for bug 419663 into the next SRU, once I get a confirmation that my PPA package works.

I'll sponsor this in due course.

Changed in devicekit-disks (Ubuntu Karmic):
assignee: nobody → Martin Pitt (pitti)
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Uploaded to karmic-proposed queue. Needs to be processed by an SRU team member now.

Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Accepted devicekit-disks into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in devicekit-disks (Ubuntu Karmic):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
In , Martin Pitt (pitti) wrote :

Created an attachment (id=31636)
git formatted patch

Updated to current git head for udisks renaming.

Revision history for this message
In , Zeuthen (zeuthen) wrote :

Committed, thanks!

Revision history for this message
Steve Magoun (smagoun) wrote :

Confirmed that devicekit-disks_007-2ubuntu4 from karmic-proposed hides partitions of type 0x12. I haven't noticed any side effects.

Changed in devicekit:
status: Confirmed → Fix Released
Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package devicekit-disks - 007-2ubuntu4

---------------
devicekit-disks (007-2ubuntu4) karmic-proposed; urgency=low

  [ Martin Pitt ]
  * Add 09-fix-atasmart-crash.patch: Fix common crash when
    devkit-disks-helper-ata-smart-collect succeeds, but returns invalid base64
    data on stdout. (fd.o #25043, LP: #419663)

  [ Steve Magoun ]
  * Backport 03-hide-configuration-partition-12.patch from Lucid to fix
    regression that caused Acer and other hidden partitions to appear
    after upgrading to Karmic (LP: #451304)
 -- Martin Pitt <email address hidden> Wed, 11 Nov 2009 23:29:29 +0100

Changed in devicekit-disks (Ubuntu Karmic):
status: Fix Committed → Fix Released
Martin Pitt (pitti)
Changed in oem-priority:
status: New → Fix Released
Changed in devicekit:
importance: Unknown → Medium
Changed in devicekit:
importance: Medium → Unknown
Changed in devicekit:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.