Debian Bug report logs - #628534
ntfs-3g: doesn't mount anything if / is rw

Package: libfuse2; Maintainer for libfuse2 is Daniel Baumann <mail@daniel-baumann.ch>; Source for libfuse2 is src:fuse.

Reported by: "Mario 'BitKoenig' Holbe" <Mario.Holbe@TU-Ilmenau.DE>

Date: Sun, 29 May 2011 21:33:02 UTC

Severity: normal

Done: "Mario 'BitKoenig' Holbe" <Mario.Holbe@TU-Ilmenau.DE>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Daniel Baumann <daniel.baumann@progress-technologies.net>:
Bug#628534; Package ntfs-3g. (Sun, 29 May 2011 21:33:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Mario 'BitKoenig' Holbe" <Mario.Holbe@TU-Ilmenau.DE>:
New Bug report received and forwarded. Copy sent to Daniel Baumann <daniel.baumann@progress-technologies.net>. (Sun, 29 May 2011 21:33:06 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "Mario 'BitKoenig' Holbe" <Mario.Holbe@TU-Ilmenau.DE>
To: submit@bugs.debian.org
Subject: ntfs-3g: doesn't mount anything if / is rw
Date: Sun, 29 May 2011 23:30:58 +0200
[Message part 1 (text/plain, inline)]
Package: ntfs-3g                         
Version: 1:2011.1.15AR.4+2011.4.12-2

Hello,

ntfs-3g doesn't mount any filesystem if it has write access to
/etc/mtab.
To reproduce the issue I did the following on a system booted into
emergency (plus started udev, fuse, ..., mounted /usr) where / is
initially ro-mounted:

root@(none):~# strace -o /run/ntfs-ro.trace ntfs-3g /dev/mapper/data /mnt
root@(none):~# ls -l /mnt
total 212
-rwxrwxrwx 2 root root 216550 Apr 21 11:32 some_stupid_document.doc
drwxrwxrwx 1 root root      0 May 29 19:22 System Volume Information
root@(none):~# umount /mnt
root@(none):~# mount -o remount,rw /
root@(none):~# strace -o /run/ntfs-rw.trace ntfs-3g /dev/mapper/data /mnt
root@(none):~# ls -l /mnt
total 0
root@(none):~# umount /mnt
umount: /mnt: not mounted

The straces show that in the rw case ntfs-3g umounts the fs after it has
been mounted.

the relevant strace part for the ro case:
...
stat64("/mnt", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/dev/fuse", O_RDWR|O_LARGEFILE)   = 4
getgid32()                              = 0
getuid32()                              = 0
mount("/dev/dm-5", "/mnt", "fuseblk", MS_NOSUID|MS_NODEV, "allow_other,blksize=4096,fd=4,ro"...) = 0
geteuid32()                             = 0
lstat64("/etc/mtab", {st_mode=S_IFREG|0644, st_size=643, ...}) = 0
access("/etc/mtab", W_OK)               = -1 EROFS (Read-only file system)
getuid32()                              = 0
brk(0x9dd1000)                          = 0x9dd1000
rt_sigaction(SIGHUP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, {0xb7823f10, [], 0}, NULL, 8) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0xb7823f10, [], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {0xb7823f10, [], 0}, NULL, 8) = 0
rt_sigaction(SIGPIPE, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [], 0}, NULL, 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb763a728) = 2070
exit_group(0)                           = ?

and for the rw case:
...
stat64("/mnt", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/dev/fuse", O_RDWR|O_LARGEFILE)   = 4
getgid32()                              = 0
getuid32()                              = 0
mount("/dev/dm-5", "/mnt", "fuseblk", MS_NOSUID|MS_NODEV, "allow_other,blksize=4096,fd=4,ro"...) = 0
geteuid32()                             = 0
lstat64("/etc/mtab", {st_mode=S_IFREG|0644, st_size=643, ...}) = 0
access("/etc/mtab", W_OK)               = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7589728) = 2275
waitpid(2275, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0) = 2275
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
umount("/mnt", MNT_DETACH)              = 0
close(4)                                = 0
fsync(3)                                = 0
fcntl64(3, F_SETLK64, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}, 0xbff3de78) = 0
close(3)                                = 0
munmap(0xb7568000, 135168)              = 0
exit_group(21)                          = ?


regards
   Mario
-- 
This project is so important we can't let things that are more important
interfere with it.
                 -- Advertising/Marketing manager, United Parcel Service
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Baumann <daniel.baumann@progress-technologies.net>:
Bug#628534; Package ntfs-3g. (Fri, 03 Jun 2011 16:18:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chris Dos <chris@chrisdos.com>:
Extra info received and forwarded to list. Copy sent to Daniel Baumann <daniel.baumann@progress-technologies.net>. (Fri, 03 Jun 2011 16:18:10 GMT) Full text and rfc822 format available.

Message #10 received at 628534@bugs.debian.org (full text, mbox):

From: Chris Dos <chris@chrisdos.com>
To: 628534@bugs.debian.org
Subject: Bug Confirmation
Date: Fri, 03 Jun 2011 10:07:49 -0600
I can also confirm this bug.  I booted to single user mode, remounted / read only, tried to mount my windows
partition and it mounted with no problems.  Unmounted the windows partition, remounted / read write, and I
could no longer mount the windows partition.  I've very impressed that Mario was able to figure out how this
bug worked.  I spent hours trying to figure out why I could not mount NTFS partitions to no avail until I came
across this bug report.

	Chris





Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Baumann <daniel.baumann@progress-technologies.net>:
Bug#628534; Package ntfs-3g. (Sun, 19 Jun 2011 15:48:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eduard Bloch <edi@gmx.de>:
Extra info received and forwarded to list. Copy sent to Daniel Baumann <daniel.baumann@progress-technologies.net>. (Sun, 19 Jun 2011 15:48:06 GMT) Full text and rfc822 format available.

Message #15 received at 628534@bugs.debian.org (full text, mbox):

From: Eduard Bloch <edi@gmx.de>
To: 628534@bugs.debian.org
Subject: Re: Bug Confirmation
Date: Sun, 19 Jun 2011 17:45:17 +0200
clone 628534 -1
retitle -1 Uses unavailable mount option and hides mount error output
reassign 628534 libfuse2
thanks

#include <hallo.h>
* Chris Dos [Fri, Jun 03 2011, 10:07:49AM]:
> I can also confirm this bug.  I booted to single user mode, remounted / read only, tried to mount my windows
> partition and it mounted with no problems.  Unmounted the windows partition, remounted / read write, and I
> could no longer mount the windows partition.  I've very impressed that Mario was able to figure out how this
> bug worked.  I spent hours trying to figure out why I could not mount NTFS partitions to no avail until I came
> across this bug report.

The original strace output hides the most interesting stuff. Actually,
it's libfuse hiding information because it deliberately redirects mount
error output.

[pid 16618] write(2, "/bin/mount: unrecognized option '--no-canonicalize'\n", 52) = -1 EBADF (Bad file descriptor)
[pid 16618] open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/util-linux-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 16618] open("/usr/share/locale/en_US.utf8/LC_MESSAGES/util-linux-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 16618] open("/usr/share/locale/en_US/LC_MESSAGES/util-linux-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 16618] open("/usr/share/locale/en.UTF-8/LC_MESSAGES/util-linux-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 16618] open("/usr/share/locale/en.utf8/LC_MESSAGES/util-linux-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 16618] open("/usr/share/locale/en/LC_MESSAGES/util-linux-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 16618] write(2, "Usage: mount -V                 : print version\n       mount -h                 : print this help\n       mount                    : list mounted filesystems\n       mount -l                 : idem, including volume labels\nSo far the informational part. Next the mounting.\nThe command is `mount [-t fstype] something somewhere'.\nDetails found in /etc/fstab may be omitted.\n       mount -a [-t|-O] ...     : mount all stuff from /etc/fstab\n       mount device             : mount device at the known place\n       mount directory          : mount known device here\n       mount -t type dev dir    : ordinary mount command\nNote that one does not really mount a device, one mounts\na filesystem (of the given type) found on the device.\nOne can also mount an already visible directory tree elsewhere:\n       mount --bind olddir newdir\nor move a subtree:\n       mount --move olddir newdir\nOne can change the type of mount containing the directory dir:\n       mount --make-shared dir\n       mount --make-slave dir\n       mount --make-private dir\n       mount --make-unbindable dir\nOne can change the type of all the mounts in a mount subtree\ncontaining the directory dir:\n       mount --make-rshared dir\n       mount --make-rslave dir\n       mount --make-rprivate dir\n       mount --make-runbindable dir\nA device can be given by name, say /dev/hda1 or /dev/cdrom,\nor by label, using  -L label  or by uuid, using  -U uuid .\nOther options: [-nfFrsvw] [-o options] [-p passwdfd].\nFor many more details, say  man 8 mount .\n", 1509) = -1 EBADF (Bad file descriptor)
[pid 16618] exit_group(1)               = ?

Regards,
Eduard.

-- 
<weasel> wenn es auf der Scheibenwelt neben dem Tod und dem Hogfather noch eine
	Person fuer die Schuld gaebe, dann waere das white.




Bug 628534 cloned as bug 630992. Request was from Eduard Bloch <edi@gmx.de> to control@bugs.debian.org. (Sun, 19 Jun 2011 15:48:07 GMT) Full text and rfc822 format available.

Bug reassigned from package 'ntfs-3g' to 'libfuse2'. Request was from Eduard Bloch <edi@gmx.de> to control@bugs.debian.org. (Sun, 19 Jun 2011 15:48:10 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions ntfs-3g/1:2011.1.15AR.4+2011.4.12-2. Request was from Eduard Bloch <edi@gmx.de> to control@bugs.debian.org. (Sun, 19 Jun 2011 15:48:11 GMT) Full text and rfc822 format available.

Reply sent to "Mario 'BitKoenig' Holbe" <Mario.Holbe@TU-Ilmenau.DE>:
You have taken responsibility. (Tue, 12 Jul 2011 13:27:03 GMT) Full text and rfc822 format available.

Notification sent to "Mario 'BitKoenig' Holbe" <Mario.Holbe@TU-Ilmenau.DE>:
Bug acknowledged by developer. (Tue, 12 Jul 2011 13:27:04 GMT) Full text and rfc822 format available.

Message #26 received at 628534-done@bugs.debian.org (full text, mbox):

From: "Mario 'BitKoenig' Holbe" <Mario.Holbe@TU-Ilmenau.DE>
To: 628534-done@bugs.debian.org
Subject: Re: ntfs-3g: doesn't mount anything if / is rw
Date: Tue, 12 Jul 2011 15:25:14 +0200
[Message part 1 (text/plain, inline)]
On Sun, May 29, 2011 at 11:30:58PM +0200, Mario 'BitKoenig' Holbe wrote:
> ntfs-3g doesn't mount any filesystem if it has write access to
> /etc/mtab.

I believe this bug can be closed.
The cause appears to have been loop-aes-utils, after upgrading fuse to
2.8.5-4 - together with removing loop-aes-utils I can mount my
filesystems as root, too.


regards
   Mario
-- 
It is practically impossible to teach good programming style to students
that have had prior exposure to BASIC: as potential programmers they are
mentally mutilated beyond hope of regeneration.  -- Dijkstra
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 10 Aug 2011 07:35:53 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 20:13:54 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.