Source: libsndfile Version: 1.0.27-2 Severity: important Tags: security patch upstream Forwarded: https://github.com/erikd/libsndfile/issues/232#issuecomment-300267444
Hi, the following vulnerability was published for libsndfile. CVE-2017-8361[0]: | The flac_buffer_copy function in flac.c in libsndfile 1.0.28 allows | remote attackers to cause a denial of service (buffer overflow and | application crash) or possibly have unspecified other impact via a | crafted audio file. root@sid:~/libsndfile-1.0.27# ASAN_OPTIONS='detect_leaks=0' ./programs/sndfile-convert ~/poc/00265-libsndfile-globaloverflow-flac_buffer_copy /tmp/out.wav ================================================================= ==19742==ERROR: AddressSanitizer: global-buffer-overflow on address 0x555fbce48220 at pc 0x555fbcb08bbe bp 0x7ffff8e810d0 sp 0x7ffff8e810c8 WRITE of size 4 at 0x555fbce48220 thread T0 #0 0x555fbcb08bbd in flac_buffer_copy /root/libsndfile-1.0.27/src/flac.c:263 #1 0x555fbcb09bc1 in sf_flac_write_callback /root/libsndfile-1.0.27/src/flac.c:387 #2 0x7fa32d65f18e (/usr/lib/x86_64-linux-gnu/libFLAC.so.8+0x4e18e) #3 0x7fa32d66269c in FLAC__stream_decoder_process_single (/usr/lib/x86_64-linux-gnu/libFLAC.so.8+0x5169c) #4 0x555fbcb0caa7 in flac_read_loop /root/libsndfile-1.0.27/src/flac.c:920 #5 0x555fbcb0ce26 in flac_read_flac2i /root/libsndfile-1.0.27/src/flac.c:962 #6 0x555fbcae3f8c in sf_readf_int /root/libsndfile-1.0.27/src/sndfile.c:1778 #7 0x555fbcad8ec7 in sfe_copy_data_int /root/libsndfile-1.0.27/programs/common.c:87 #8 0x555fbcad8930 in main /root/libsndfile-1.0.27/programs/sndfile-convert.c:340 #9 0x7fa32c8b12b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) #10 0x555fbcad7639 in _start (/root/libsndfile-1.0.27/programs/sndfile-convert+0x2d639) 0x555fbce48220 is located 32 bytes to the left of global variable 'sf_errno' defined in 'sndfile.c:293:5' (0x555fbce48240) of size 4 0x555fbce48220 is located 0 bytes to the right of global variable 'data' defined in 'common.c:80:14' (0x555fbce44220) of size 16384 SUMMARY: AddressSanitizer: global-buffer-overflow /root/libsndfile-1.0.27/src/flac.c:263 in flac_buffer_copy Shadow bytes around the buggy address: 0x0aac779c0ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0aac779c1000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0aac779c1010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0aac779c1020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0aac779c1030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0aac779c1040: 00 00 00 00[f9]f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9 0x0aac779c1050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0aac779c1060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0aac779c1070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0aac779c1080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0aac779c1090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 ==19742==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-8361 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8361 Please adjust the affected versions in the BTS as needed. Regards, Salvatore