Bug 192839 - Duplicate entries in an mtree file cause nmtree to coredump
Summary: Duplicate entries in an mtree file cause nmtree to coredump
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-19 20:49 UTC by Enji Cooper
Modified: 2018-02-20 12:33 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer 2014-08-19 20:49:57 UTC
% uname -a
FreeBSD freebsd-11-x64.localdomain 11.0-CURRENT FreeBSD 11.0-CURRENT #10 r269317+78cba4b(isilon-atf): Wed Aug 13 21:46:54 PDT 2014     root@freebsd-11-x64.localdomain:/usr/obj/usr/src/sys/GENERIC-DEBUG  amd64
% /bin/sh
% cat | nmtree -dEU <<EOF
.
    duplicate_entry
    ..
    duplicate_entry
    ..
..
EOF
^D
Bus error (core dumped)
%
Comment 1 Enji Cooper freebsd_committer 2014-08-20 04:27:35 UTC
An even simpler repro is:

% /bin/sh
% nmtree -dEU <<EOF
.
    duplicate_entry
    ..
    duplicate_entry
    ..
..
EOF
Bus error: 10 (core dumped)
%
Comment 2 Enji Cooper freebsd_committer 2015-10-23 09:00:39 UTC
*sigh*. This impacts makefs too, making makefs -D useless.
Comment 3 Enji Cooper freebsd_committer 2015-10-31 06:04:06 UTC
Another case that repros this is as follows (not sure if this mtree file is valid though):

.
    a
    ..
..
.
    a
    ..
..
Comment 4 Enji Cooper freebsd_committer 2017-11-05 20:59:18 UTC
Handing a number of makefs, mtree, and msdosfs bugs in my queue over to emaste@.
Comment 5 Ed Maste freebsd_committer 2017-11-21 01:42:53 UTC
I do not expect to be able to look at mtree bugs in the near term.