Source: libsndfile Version: 1.0.27-2 Severity: important Tags: upstream patch security Forwarded: https://github.com/erikd/libsndfile/issues/233
Hi, the following vulnerability was published for libsndfile. CVE-2017-8363[0]: | The flac_buffer_copy function in flac.c in libsndfile 1.0.28 allows | remote attackers to cause a denial of service (heap-based buffer | over-read and application crash) via a crafted audio file. root@sid:~/libsndfile-1.0.27# ASAN_OPTIONS='detect_leaks=0' ./programs/sndfile-convert ~/poc/00266-libsndfile-heapoverflow-flac_buffer_copy /tmp/out.wav ================================================================= ==19330==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x62100001dd10 at pc 0x55c421b34b75 bp 0x7ffe33908460 sp 0x7ffe33908458 READ of size 4 at 0x62100001dd10 thread T0 #0 0x55c421b34b74 in flac_buffer_copy /root/libsndfile-1.0.27/src/flac.c:263 #1 0x55c421b38a75 in flac_read_loop /root/libsndfile-1.0.27/src/flac.c:916 #2 0x55c421b38e26 in flac_read_flac2i /root/libsndfile-1.0.27/src/flac.c:962 #3 0x55c421b0ff8c in sf_readf_int /root/libsndfile-1.0.27/src/sndfile.c:1778 #4 0x55c421b04ec7 in sfe_copy_data_int /root/libsndfile-1.0.27/programs/common.c:87 #5 0x55c421b04930 in main /root/libsndfile-1.0.27/programs/sndfile-convert.c:340 #6 0x7fa2e7acf2b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) #7 0x55c421b03639 in _start (/root/libsndfile-1.0.27/programs/sndfile-convert+0x2d639) 0x62100001dd10 is located 0 bytes to the right of 4112-byte region [0x62100001cd00,0x62100001dd10) allocated by thread T0 here: #0 0x7fa2e8b67d28 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1d28) #1 0x7fa2e887bfa8 (/usr/lib/x86_64-linux-gnu/libFLAC.so.8+0x4cfa8) SUMMARY: AddressSanitizer: heap-buffer-overflow /root/libsndfile-1.0.27/src/flac.c:263 in flac_buffer_copy Shadow bytes around the buggy address: 0x0c427fffbb50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c427fffbb60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c427fffbb70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c427fffbb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c427fffbb90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c427fffbba0: 00 00[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c427fffbbb0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c427fffbbc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c427fffbbd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c427fffbbe0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c427fffbbf0: 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 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==19330==ABORTING root@sid:~/libsndfile-1.0.27# 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-8363 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8363 [1] https://github.com/erikd/libsndfile/issues/233 Please adjust the affected versions in the BTS as needed. Regards, Salvatore