Valid also for F27 with dump-0.4-0.32.b46.fc26.x86_64 +++ This bug was initially created as a clone of Bug #1533087 +++ Description of problem: Using the AFL fuzzer I have discovered few files that are causing restore command to crash. Files are attached in the archive. reproducers crash1, crash1b: Program received signal SIGABRT, Aborted. 0x00007ffff69361a7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); (gdb) (gdb) (gdb) (gdb) bt #0 0x00007ffff69361a7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007ffff6937898 in __GI_abort () at abort.c:90 #2 0x00007ffff6978bb7 in __libc_message (do_abort=2, fmt=fmt@entry=0x7ffff6a8aa60 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:196 #3 0x00007ffff6982af6 in malloc_printerr (ar_ptr=0x7ffff6cc6760 <main_arena>, ptr=0x665160, str=0x7ffff6a8815b "malloc(): memory corruption", action=<optimized out>) at malloc.c:5025 #4 _int_malloc (av=av@entry=0x7ffff6cc6760 <main_arena>, bytes=bytes@entry=568) at malloc.c:3473 #5 0x00007ffff69856bc in __GI___libc_malloc (bytes=568) at malloc.c:2899 #6 0x00007ffff696e145 in _IO_new_fdopen (fd=9, mode=<optimized out>) at iofdopen.c:144 #7 0x0000000000404c2d in extractdirs (genmode=genmode@entry=0) at dirs.c:203 #8 0x0000000000404049 in main (argc=1, argv=0x7fffffffe5a8) at main.c:568 crash2, crash2b, crash3: infinite-loop like behaviour ending quickly with Segmentation fault Program received signal SIGSEGV, Segmentation fault. 0x00007ffff6a15f00 in ___fprintf_chk (fp=0x7ffff6cc7400 <_IO_2_1_stdout_>, flag=flag@entry=1, format=format@entry=0x416392 "%10lu\t%s\n") at fprintf_chk.c:27 27 { (gdb) bt #0 0x00007ffff6a15f00 in ___fprintf_chk (fp=0x7ffff6cc7400 <_IO_2_1_stdout_>, flag=flag@entry=1, format=format@entry=0x416392 "%10lu\t%s\n") at fprintf_chk.c:27 #1 0x0000000000408502 in fprintf (__fmt=0x416392 "%10lu\t%s\n", __stream=<optimized out>) at /usr/include/bits/stdio2.h:97 #2 listfile ( name=0x7fffff800100 "././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././"..., ino=2, type=<optimized out>) at restore.c:105 #3 0x0000000000405334 in treescan ( pname=pname@entry=0x7fffff800100 "././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././"..., ino=<optimized out>, todo=todo@entry=0x408460 <listfile>) at dirs.c:311 #4 0x0000000000405491 in treescan ( pname=pname@entry=0x7fffff801150 "././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././"..., ino=<optimized out>, todo=todo@entry=0x408460 <listfile>) at dirs.c:343 #5 0x0000000000405491 in treescan ( pname=pname@entry=0x7fffff8021a0 "././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././"..., ino=<optimized out>, todo=todo@entry=0x408460 <listfile>) at dirs.c:343 #6 0x0000000000405491 in treescan ( pname=pname@entry=0x7fffff8031f0 "././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././"..., ino=<optimized out>, todo=todo@entry=0x408460 <listfile>) at dirs.c:343 ... << multiple iterations removed >> ... #2002 0x0000000000405491 in treescan (pname=pname@entry=0x7fffffff61b0 "././././././.", ino=<optimized out>, todo=todo@entry=0x408460 <listfile>) at dirs.c:343 #2003 0x0000000000405491 in treescan (pname=pname@entry=0x7fffffff7200 "./././././.", ino=<optimized out>, todo=todo@entry=0x408460 <listfile>) at dirs.c:343 #2004 0x0000000000405491 in treescan (pname=pname@entry=0x7fffffff8250 "././././.", ino=<optimized out>, todo=todo@entry=0x408460 <listfile>) at dirs.c:343 #2005 0x0000000000405491 in treescan (pname=pname@entry=0x7fffffff92a0 "./././.", ino=<optimized out>, todo=todo@entry=0x408460 <listfile>) at dirs.c:343 #2006 0x0000000000405491 in treescan (pname=pname@entry=0x7fffffffa2f0 "././.", ino=<optimized out>, todo=todo@entry=0x408460 <listfile>) at dirs.c:343 #2007 0x0000000000405491 in treescan (pname=pname@entry=0x7fffffffb340 "./.", ino=<optimized out>, todo=todo@entry=0x408460 <listfile>) at dirs.c:343 #2008 0x0000000000405491 in treescan (pname=pname@entry=0x7fffffffc460 ".", ino=<optimized out>, todo=0x408460 <listfile>) at dirs.c:343 #2009 0x00000000004040b1 in main (argc=0, argv=0x7fffffffe5b0) at main.c:579 See attached console.txt file with console logs. Version-Release number of selected component (if applicable): dump-0.4-0.23.b44.el7.x86_64 How reproducible: always Steps to Reproduce: 1. restore -y -t -f FILE Actual results: crashes described above Expected results: error reports Additional info: found by AFL fuzzer
Created attachment 1379558 [details] reproducer to hang -> infinite loop Adding also a fuzzed file that cases restore command to loop infinitely.
This message is a reminder that Fedora 27 is nearing its end of life. On 2018-Nov-30 Fedora will stop maintaining and issuing updates for Fedora 27. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '27'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 27 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.