Bug 1643812

Summary: There is a heap-buffer-overflow on address 0x61200000be50 in libsndfile.
Product: Red Hat Enterprise Linux 7 Reporter: shuitao gan <ganshuitao>
Component: libsndfileAssignee: Michal Hlavinka <mhlavink>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 7.7-AltCC: jenra18rahul, ovasik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-10 10:21: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:
Bug Depends On:    
Bug Blocks: 1630910, 1660473    
Attachments:
Description Flags
Trigger by "./sndfile-convert POC0" none

Description shuitao gan 2018-10-29 04:02:33 UTC
Created attachment 1498401 [details]
Trigger by "./sndfile-convert  POC0"

version: libsndfile
Summary: 

There is a heap-buffer-overflow on address 0x61200000be50 in libsndfile.

Description:

The asan debug is as follows:

$./sndfile-convert POC0 a.wav

==122624==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61200000be50 at pc 0x5e96a0 bp 0x7ffd57e9efb0 sp 0x7ffd57e9efa8
READ of size 4 at 0x61200000be50 thread T0
==122624==WARNING: Trying to symbolize code, but external symbolizer is not initialized!
    #0 0x5e969f (/home/company/real_sanitize/poc_check/libsndfile/sndfile-convert_addr+0x5e969f)
    #1 0x4cb046 (/home/company/real_sanitize/poc_check/libsndfile/sndfile-convert_addr+0x4cb046)
    #2 0x4863e9 (/home/company/real_sanitize/poc_check/libsndfile/sndfile-convert_addr+0x4863e9)
    #3 0x483b5e (/home/company/real_sanitize/poc_check/libsndfile/sndfile-convert_addr+0x483b5e)
    #4 0x7f2ec5cf6a3f (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f)
    #5 0x47ede8 (/home/company/real_sanitize/poc_check/libsndfile/sndfile-convert_addr+0x47ede8)

0x61200000be50 is located 0 bytes to the right of 272-byte region [0x61200000bd40,0x61200000be50)
allocated by thread T0 here:
    #0 0x468dc9 (/home/company/real_sanitize/poc_check/libsndfile/sndfile-convert_addr+0x468dc9)
    #1 0x66ce6d (/home/company/real_sanitize/poc_check/libsndfile/sndfile-convert_addr+0x66ce6d)
    #2 0x4ad66f (/home/company/real_sanitize/poc_check/libsndfile/sndfile-convert_addr+0x4ad66f)
    #3 0x485384 (/home/company/real_sanitize/poc_check/libsndfile/sndfile-convert_addr+0x485384)
    #4 0x483690 (/home/company/real_sanitize/poc_check/libsndfile/sndfile-convert_addr+0x483690)
    #5 0x7f2ec5cf6a3f (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f)

SUMMARY: AddressSanitizer: heap-buffer-overflow ??:0 ??
Shadow bytes around the buggy address:
  0x0c247fff9770: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c247fff9780: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c247fff9790: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c247fff97a0: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
  0x0c247fff97b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c247fff97c0: 00 00 00 00 00 00 00 00 00 00[fa]fa fa fa fa fa
  0x0c247fff97d0: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
  0x0c247fff97e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c247fff97f0: 00 00 00 00 00 00 00 00 00 00 fa fa fa fa fa fa
  0x0c247fff9800: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c247fff9810: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
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
  ASan internal:         fe
==122624==ABORTING




$./sndfile-convert POC0 a.wav
Segmentation fault

Comment 2 shuitao gan 2018-10-29 04:03:37 UTC
version 1.0.28

Comment 3 Rahul Joshi 2018-12-16 10:40:51 UTC
Which version of libsndfile made this crash.
Actually, I didn't get crash in version "libsndfile-1.0.28".
Could u please explain this?
Ref: https://nvd.nist.gov/vuln/detail/CVE-2018-19758

Thanks in advance.

Comment 4 Rahul Joshi 2018-12-16 10:46:33 UTC
I downloaded the version from this Github resource as follow.
https://github.com/erikd/libsndfile/releases (1.0.28)

Comment 5 Rahul Joshi 2018-12-16 11:07:00 UTC
I got the crash now and Sry for the noise in the channel.
Thanks

Comment 7 Michal Hlavinka 2020-06-10 10:21:18 UTC
The Red Hat Enterprise Linux 7 life cycle has entered Maintenance Support Phase, which means that only qualified Critical and Important Security errata advisories (RHSAs) and some Urgent Priority Bug Fix errata advisories (RHBAs) will be released as they become available.  Unfortunately, this issue was not selected to be included in Red Hat Enterprise Linux 7. We will now close this issue. We recommend moving the request to Red Hat Enterprise Linux 8 if applicable.

See the Red Hat Enterprise Linux Life Cycle for more details:
https://access.redhat.com/support/policy/updates/errata/