Opened 5 years ago

Closed 5 years ago

#8161 closed defect (fixed)

left shift of negative value bugs in libavcodec/wavpackenc.c

Reported by: Suhwan Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: ubsan
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
There're two left shift of negative value bugs in libavcodec/wavpackenc.c

libavcodec/wavpackenc.c:534:32: runtime error: left shift of negative value -8
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libavcodec/wavpackenc.c:534:32 in 
libavcodec/wavpackenc.c:2560:47: runtime error: left shift of negative value -1
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libavcodec/wavpackenc.c:2560:47 in 

How to reproduce:

% ./ffmpeg_g -t 0 -stream_loop 1 -y -r 49 -i testvector07.ogg -loglevel 99 -map 0 -ar 22050 -ac 3 output/tmp.wv

ffmpeg version N-94943-g1db6e47e85
built on ubuntu 18.04 with clang-6 and UBSAN option.

Attachments (2)

gdb-wavpackenc (30.4 KB ) - added by Suhwan 5 years ago.
testvector07.ogg (178.0 KB ) - added by Suhwan 5 years ago.
poc

Download all attachments as: .zip

Change History (3)

by Suhwan, 5 years ago

Attachment: gdb-wavpackenc added

by Suhwan, 5 years ago

Attachment: testvector07.ogg added

poc

comment:1 by Elon Musk, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.