Subject: bug#35137: [df] incorrect parsing of /proc/self/mountinfo with \r in mount path

From: Bernhard Voelker <[email-masked]>
Date: Thu, 18 Apr 2019 08:19:04 +0200

[removing bug-gnulib]

On 4/10/19 9:23 AM, Bernhard Voelker wrote:
> Pushed with all these changes at:
> https://git.sv.gnu.org/cgit/gnulib.git/commit/?id=eb8278fefa
> 
> For coreutils, I'll push the (attached) gnulib update with a NEWS entry soon,
> and then work on tests.

The tests are probably best done as a new root-test, and therefore need
extra caution.  Meanwhile, I intend to just pull in the gnulib change with
a NEWS entry - patch attached.

Have a nice day,
Berny
>From 774c9e14611be3690471b251ad889c82db632a0d Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <[email-masked]>
Date: Wed, 10 Apr 2019 09:13:27 +0200
Subject: [PATCH] gnulib: update to the latest

* gnulib: Update to latest, mainly for:
  > mountlist: make parsing /proc/self/mountinfo more robust
* NEWS: Mention the fix.

Fixes https://bugs.gnu.org/33468
---
 NEWS   | 7 +++++++
 gnulib | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 6844228be..12c864dcc 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,13 @@ GNU coreutils NEWS                                    -*- outline -*-
 
 ** Bug fixes
 
+  df now correctly parses the /proc/self/mountinfo file for unusual entries
+  like ones with '\r' in a field value ("mount -t tmpfs tmpfs /foo$'\r'bar"),
+  when the source field is empty ('mount -t tmpfs "" /mnt'), and when the
+  filesystem type contains characters like a blank which need escaping.
+  [bugs introduced in coreutils-8.24 with the introduction of reading
+   the /proc/self/mountinfo file]
+
   factor again outputs immediately when stdout is a tty but stdin is not.
   [bug introduced in coreutils-8.24]
 
diff --git a/gnulib b/gnulib
index 188d87b05..eb8278fef 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 188d87b05190690d6f8b0577ec65ef221a711d08
+Subproject commit eb8278fefa0bbf2a53b706bffb2c99ccfe5d7bd4
-- 
2.21.0