GNU bug report logs - #35137
[df] incorrect parsing of /proc/self/mountinfo with \r in mount path

Previous Next

Package: coreutils;

Reported by: Zbigniew Jędrzejewski-Szmek <zbyszek <at> in.waw.pl>

Date: Thu, 4 Apr 2019 07:54:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Zbigniew Jędrzejewski-Szmek <zbyszek <at> in.waw.pl>
To: 35137 <at> debbugs.gnu.org
Subject: bug#35137: [df] incorrect parsing of /proc/self/mountinfo with \r in mount path
Date: Thu, 4 Apr 2019 07:52:25 +0000
See https://github.com/systemd/systemd/issues/12018 and
https://github.com/karelzak/util-linux/issues/780 for additional context.

$ mkdir "$(echo -e foo\\rbar)"
$ sudo mount -t tmpfs tmpfs foo^Mbar/
$ cat -v /proc/self/mountinfo|grep foo
865 39 0:59 / /tmp/foo^Mbar rw,relatime shared:462 - tmpfs tmpfs rw,seclabel
$ df -h | grep foo
$ df -h /tmp/foo$'\r'bar
Filesystem      Size  Used Avail Use% Mounted on
-               3.9G     0  3.9G   0% /tmp/foo?bar

When asked to show all filesystems, the mount point is not shown at all.
When asked to show just that one, df parses the mount point correctly,
but it gets the filesystem type wrong.

Zbyszek




This bug report was last modified 6 years and 61 days ago.

Previous Next


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