[kde] [Bug 452837] New: Automount mounts non-removable devices

Adam Williamson bugzilla_noreply at kde.org
Fri Apr 22 01:44:12 BST 2022


https://bugs.kde.org/show_bug.cgi?id=452837

            Bug ID: 452837
           Summary: Automount mounts non-removable devices
           Product: kde
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: unassigned-bugs at kde.org
          Reporter: adamw at happyassassin.net
  Target Milestone: ---

SUMMARY

With plasma-desktop 5.24.4, automounting of "known devices" on "Login" and
"Attach" is enabled by default. These settings are shown under "Removable
Devices" in System Settings. However, despite that name, it seems they affect
non-removable devices. We found this out in a Fedora downstream bug:
https://bugzilla.redhat.com/show_bug.cgi?id=2073708 . The problem happens if
you try to install Fedora 36 over the top of an existing Fedora or RHEL
installation which uses LVM. When the Fedora installer goes to delete the
existing LVs, it activates them (this is "to be able to wipe the file system
from them"), and KDE sees the device appear and automounts it (it's "known"
because it was mounted earlier in the boot or install process, I think). It
does this even if the LV is on an internal, non-removable hard disk.

STEPS TO REPRODUCE

This is the reproducer I know of:

1. Install Fedora or RHEL with an LVM layout, ideally with more than one LV
(e.g. a /home and a root partition) - older Fedora releases on larger disks do
this by default, otherwise you can do it in custom partitioning
2. Boot a current Fedora 36 KDE live image, e.g.
https://kojipkgs.fedoraproject.org/compose/branched/Fedora-36-20220421.n.0/compose/Spins/x86_64/iso/Fedora-KDE-Live-x86_64-36-20220421.n.0.iso
3. Run through the installer, choosing to wipe the existing partitions to
provide space for the install
4. Try and run the install; it will likely fail at the start, complaining that
"device is active". This seems to be slightly racy, for me it happens about 1
in 2 tries. Snapshotting a VM after point 1 is a good idea

There are likely much simpler ways to do it, though. Probably just creating
some LVs on a non-removable disk, then playing with mounting/unmounting and
activating/deactivating them will do the trick.

OBSERVED RESULT
Filesystem on the LV on a non-removable disk gets automounted

EXPECTED RESULT
Filesystems on non-removable disk should not be automounted, since the config
settings refer specifically to "Removable Devices"

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:
(available in About System)
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION

Filing against this component because there doesn't seem to be a match for
plasma-desktop, which is where the code seems to be:
https://github.com/KDE/plasma-desktop/blob/master/solid-device-automounter/kded/DeviceAutomounter.cpp
. It doesn't look to me like anything there is actually doing any kind of check
that a filesystem is on a removable drive. Maybe the assumption is that only
filesystems on "removable" drives would suddenly appear or disappear, but
that's an incorrect assumption as we see with LVs.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Unassigned-bugs mailing list