Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1533087

Summary: restore crashes on corrupted dump file
Product: Red Hat Enterprise Linux 7 Reporter: Karel Srot <ksrot>
Component: dumpAssignee: Vaclav Dolezal <vdolezal>
Status: CLOSED WONTFIX QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: high    
Version: 7.5-Alt   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1533124 (view as bug list) Environment:
Last Closed: 2020-01-29 09:41:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
crash reproducers
none
console log none

Description Karel Srot 2018-01-10 12:52:15 UTC
Created attachment 1379512 [details]
crash reproducers

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

Comment 1 Karel Srot 2018-01-10 12:53:53 UTC
Created attachment 1379513 [details]
console log

Comment 4 Vaclav Dolezal 2020-01-29 09:41:18 UTC
Red Hat Enterprise Linux version 7 entered the Maintenance Support 1 Phase in August 2019. In this phase only qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released as they become available. Other errata advisories may be delivered as appropriate.

This bug has been reviewed by Support and Engineering representative and does not meet the inclusion criteria for Maintenance Support 1 Phase. If this issue still exists in newer major version of Red Hat Enterprise Linux, it has been cloned there and work will continue in the cloned bug.

For more information about Red Hat Enterprise Linux Lifecycle, please see https://access.redhat.com/support/policy/updates/errata/