[Secure-testing-team] Bug#866020: lrzip: CVE-2017-9929: Stack buffer overflow in get_fileinfoin lrzip.c:1074, allows attackers to cause DoS

Salvatore Bonaccorso carnil at debian.org
Mon Jun 26 17:14:35 UTC 2017


Source: lrzip
Version: 0.631-1
Severity: important
Tags: upstream security
Forwarded: https://github.com/ckolivas/lrzip/issues/75

Hi,

the following vulnerability was published for lrzip.

CVE-2017-9929[0]:
| In lrzip 0.631, a stack buffer overflow was found in the function
| get_fileinfo in lrzip.c:1074, which allows attackers to cause a denial
| of service via a crafted file.

=================================================================
==26348==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffd494c9e78 at pc 0x7f125e46b925 bp 0x7ffd494c9bd0 sp 0x7ffd494c9380
WRITE of size 10 at 0x7ffd494c9e78 thread T0
    #0 0x7f125e46b924 in __interceptor_read (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x48924)
    #1 0x413e8d in get_fileinfo lrzip.c:1074
    #2 0x409b81 in main main.c:671
    #3 0x7f125cf9f2b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0)
    #4 0x4032e9 in _start (/root/lrzip-0.631/lrzip+0x4032e9)

Address 0x7ffd494c9e78 is located in stack of thread T0 at offset 424 in frame
    #0 0x41232d in get_fileinfo lrzip.c:926

  This frame has 10 object(s):
    [32, 33) 'chunk_byte'
    [96, 97) 'ctype'
    [160, 168) 'u_len'
    [224, 232) 'c_len'
    [288, 296) 'last_head'
    [352, 360) 'expected_size'
    [416, 424) 'chunk_size' <== Memory access at offset 424 overflows this variable
    [480, 496) 'stream_head'
    [544, 560) 'md5_stored'
    [608, 752) 'fdin_stat'
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x48924) in __interceptor_read
Shadow bytes around the buggy address:
  0x100029291370: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100029291380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100029291390: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 01 f4
  0x1000292913a0: f4 f4 f2 f2 f2 f2 01 f4 f4 f4 f2 f2 f2 f2 00 f4
  0x1000292913b0: f4 f4 f2 f2 f2 f2 00 f4 f4 f4 f2 f2 f2 f2 00 f4
=>0x1000292913c0: f4 f4 f2 f2 f2 f2 00 f4 f4 f4 f2 f2 f2 f2 00[f4]
  0x1000292913d0: f4 f4 f2 f2 f2 f2 00 00 f4 f4 f2 f2 f2 f2 00 00
  0x1000292913e0: f4 f4 f2 f2 f2 f2 00 00 00 00 00 00 00 00 00 00
  0x1000292913f0: 00 00 00 00 00 00 00 00 f4 f4 f3 f3 f3 f3 00 00
  0x100029291400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100029291410: 00 00 f1 f1 f1 f1 04 f4 f4 f4 f2 f2 f2 f2 04 f4
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==26348==ABORTING
If you fix the vulnerability please also make sure to include the
CVE (Common Vulnerabilities & Exposures) id in your changelog entry.

For further information see:

[0] https://security-tracker.debian.org/tracker/CVE-2017-9929
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9929
[1] https://github.com/ckolivas/lrzip/issues/75

Please adjust the affected versions in the BTS as needed.

Regards,
Salvatore



More information about the Secure-testing-team mailing list