Bug 93543 - udisksctl mounts removable partition to '/' with no questions asked
Summary: udisksctl mounts removable partition to '/' with no questions asked
Status: NEW
Alias: None
Product: udisks
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Martin Pitt
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-31 03:33 UTC by Jarrad Whitaker
Modified: 2016-02-29 21:20 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
output of udisksctl monitor (976 bytes, text/plain)
2015-12-31 03:34 UTC, Jarrad Whitaker
Details
output of mount (3.46 KB, text/plain)
2015-12-31 03:34 UTC, Jarrad Whitaker
Details
output of udisksctl dump before mounting (49.94 KB, text/plain)
2015-12-31 03:35 UTC, Jarrad Whitaker
Details
output of udisksctl dump after mounting (49.94 KB, text/plain)
2015-12-31 03:35 UTC, Jarrad Whitaker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jarrad Whitaker 2015-12-31 03:33:32 UTC
Hi all,
I had created a poor man's backup of my root partition with
dd if=/dev/sda1 of=/dev/sdb1 ,
where sda is my PC's only hard drive (mounted offline!), and sdb is a removable USB hard drive. Now, two years later, I tried to mount this partition with udisksctl, to find that it mounted it on the filesystem root '/' with no questions asked and no elevation required (other partitions on the USB hard drive mount to /media/username/blah happily). This is a bit of a worry, though it's hard to say if there is any real danger, as 'ls /' still lists my real hard drive root, and I didn't do much playing around in the mounted state as I value my filesystem and sanity too much.
As a user, I would expect this operation to mount the USB partition on /media/username/something, as with any other USB partitions. At the very least I would expect a big scary warning to be issued if trying to mount something on '/', and I would expect non-root to not be allowed to do this at all.

Info as suggested on the wiki page to be attached. Please advise if you wish me to supply anything else.

Jarrad
Comment 1 Jarrad Whitaker 2015-12-31 03:34:14 UTC
Created attachment 120743 [details]
output of udisksctl monitor

udisksctl monitor
while mounting and unmounting the partition in question
Comment 2 Jarrad Whitaker 2015-12-31 03:34:54 UTC
Created attachment 120744 [details]
output of mount

output of `mount` after udisksctl has done its thing
Comment 3 Jarrad Whitaker 2015-12-31 03:35:29 UTC
Created attachment 120745 [details]
output of udisksctl dump before mounting
Comment 4 Jarrad Whitaker 2015-12-31 03:35:58 UTC
Created attachment 120746 [details]
output of udisksctl dump after mounting
Comment 5 Jarrad Whitaker 2015-12-31 03:38:15 UTC
forgot to say: the partition in question is /dev/sdc3 in all the posted attachments.
Comment 6 Tom Yan 2016-02-29 21:20:13 UTC
If you have an fstab entry of your root filesystem, that's not really udisks fault. Since sdb1 and sda1 are clone, they have the same (FS) UUID unless you have changed either/both of them manually after cloning. So "sdb1" got resolved and matched with the fstab entry of "/" and get mounted there.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.