exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

umountFlaw.txt

umountFlaw.txt
Posted Sep 13, 2005
Authored by David Watson

The Linux umount command as provided in the util-linux package in versions 2.8 to 2.12q, 2.13-pre1 and 2.13-pre2, allows for bypass of the nosuid and nodev when a user uses the -r option.

tags | advisory
systems | linux
SHA-256 | 9536b7be9fa39bf6d7245bade27ac38d2b961b78e3a9de5e7aa119217548696f

umountFlaw.txt

Change Mirror Download
Affected: Linux umount command as provided in the util-linux package in 
versions 2.8 to 2.12q, 2.13-pre1 and 2.13-pre2.

Privileges needed to exploit: local account with permission to unmount a
user-mountable file system with Unix-type features (set-id bits or device
nodes).

Effect: removal of nosuid, nodev and other flags from the file system, thus
allowing setuid and setgid bits to take effect and device nodes to be
interpreted. While this may be undesirable in itself, someone who can write
to the underlying device or otherwise provide its contents can use this to
obtain root privileges (for example by creating a setuid-root binary in the
file system and having its setuid bit take effect when run).

Explanation:

When mounting a user-mountable file system, the mount command always imposes
the nosuid and nodev flags by default, and only the superuser or an explicit
setting in the fstab entry can override this. However, I recently discovered
that the umount command allowed users to remove these flags again by using
the -r option.

The -r option tells umount to try to remount the file system read-only if it
is currently busy and cannot be unmounted fully (for example, if it is the
current directory of some process). However, the file system is remounted
with the MS_RDONLY ("ro") flag alone, thus clearing all its other flags,
including nosuid and nodev. In the affected versions, the user who mounted
the file system can use this option and easily force the unsafe remount, even
if the file system is already read-only. If "users" was given in the fstab
entry, then any user can do so.

Workaround: edit /etc/fstab to limit the (un)mounting of filesystems
appropriately, or just remove the setuid bit from umount.

Fix: fixed in util-linux 2.12r-pre1 and 2.13-pre3, by refusing to accept
the -r option from a non-root user.

Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    38 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close