[Bug 726283] Re: umount segfaults with inconsistent entry in /etc/fstab
Launchpad Bug Tracker
726283 at bugs.launchpad.net
Sat Jan 21 16:26:27 UTC 2012
Status changed to 'Confirmed' because the bug affects multiple users.
** Changed in: util-linux (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/726283
Title:
umount segfaults with inconsistent entry in /etc/fstab
Status in “util-linux” package in Ubuntu:
Confirmed
Bug description:
Binary package hint: util-linux
Reproduced on Maverick using util-linux version 2.17.2-0ubuntu1.
If /etc/fstab has an incorrect mount directory for an already mounted
device, 'umount <device>' will segfault when run as an unprivileged
user.
Steps to reproduce:
cd /tmp
# Create and mount a loopback file
dd if=/dev/zero of=file bs=1024 count=300; mkdir fs
sudo losetup /dev/loop0 file; sudo mkfs /dev/loop0
sudo mount /dev/loop0 fs/
# Add entry to /etc/fstab with incorrect/missing mount directory
echo /tmp/fs | sudo tee -a /etc/fstab
# Try umounting as an unprivileged user
umount /tmp/fs
# Segfault!
Applying the attached patch fixes the segfault. The semantics of this
patch are likely wrong, but at least this demonstrates the codepath
taken (fs escapes from the revelant block being NULL, only to be
dereferenced on the next line).
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/726283/+subscriptions
More information about the foundations-bugs
mailing list