Hello, found multiple crashes of make utility on parsing files. For all crashes testcase is the same: make -q -f <FILE>. Tarball with all reproducers attached. Found with afl-fuzz.
# make -q -f report-make/tc2
assertion "comment != line" failed: file "parse.c", line 1046, function
"strip_comments"
Abort trap (core dumped)
# cat report-make/tc2.min
.if0
.# gdb -c make.core /usr/bin/make
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd6.2"...(no debugging symbols
found)
Core was generated by `make'.
Program terminated with signal 6, Aborted.
(no debugging symbols found)
Loaded symbols for /usr/bin/make
Reading symbols from /usr/lib/libutil.so.12.2...done.
Loaded symbols for /usr/lib/libutil.so.12.2
Reading symbols from /usr/lib/libc.so.92.0...done.
Loaded symbols for /usr/lib/libc.so.92.0
Reading symbols from /usr/libexec/ld.so...done.
Loaded symbols for /usr/libexec/ld.so
#0 thrkill () at -:3
3 -: No such file or directory.
in -
(gdb) bt
#0 thrkill () at -:3
#1 0x00000d5a23cc81dd in _libc_abort () at /usr/src/lib/libc/stdlib/abort.c:51
#2 0x00000d5a23d01db2 in _libc___assert2 (file=Variable "file" is not
available.
) at /usr/src/lib/libc/gen/assert.c:52
#3 0x00000d580950e04a in Dir_Destroy () from /usr/bin/make
#4 0x00000d580950c97d in Dir_Destroy () from /usr/bin/make
#5 0x00000d580950b5ec in Dir_Destroy () from /usr/bin/make
#6 0x00000d5809517f73 in Var_DeleteLoopVar () from /usr/bin/make
#7 0x00000d580950b155 in Dir_Destroy () from /usr/bin/make
#8 0x00000d5809500ad4 in ?? () from /usr/bin/make
#9 0x0000000000000000 in ?? ()
Current language: auto; currently asm
(gdb)
Sergey
make-testcases.tgz
Description: application/tar-gz
