Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Apr 2019 20:42:15 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 237368] /bin/df ; df on more than one unmounted device coredumps
Message-ID:  <bug-237368-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237368

            Bug ID: 237368
           Summary: /bin/df ; df on more than one unmounted device
                    coredumps
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: jamie@catflap.org

I realise "df on unmountd devices is deprecated", but even so, as it stands,
there appears to be an invalid free, which causes coredump.

/usr/src/bin/df/df.c:

Line 276 and 277:

if (iov !=3D NULL)
     free_iovec(&iov, &iovlen);

This is called prior to building the mount structure for nmount. If the
structure has been used before, it tries to free it, but causes a coredump =
in
the process.

To reproduce, run df on 2 or more unmounted devices (you don't actually nee=
d a
real unmounted device to trigger the bug, simply doing "df /dev/*" will tri=
gger
the above codepath.

[ I tagged this "current" because it still occurs in current, but it's in
12-stable too ]

cheers, Jamie

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-237368-227>