UndefinedBehaviorSanitizer: dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:996:24: runtime error: load of value 96, which is not a valid value for type 'enum AVColorSpace'
Categories
(Core :: Audio/Video, defect)
Tracking
()
People
(Reporter: decoder, Assigned: padenot)
References
Details
(Keywords: crash, testcase)
Attachments
(3 files)
The attached testcase crashes on mozilla-central revision 20220917-09d4c0163454 (fuzzing build).
For detailed crash information, see attachment.
To reproduce the issue, perform the following steps:
- Download the attached testcase, save as "test.bin".
2a. Build with--enable-fuzzing(requires Clang and ASan, also build gtests using./mach gtest dontruntests).
2b. Alternatively you can download builds from TC usingpython -mfuzzfetch -a --fuzzing --target firefox gtest(see https://github.com/MozillaSecurity/fuzzfetch). - Run
FUZZER=MediaWebM objdir/dist/bin/firefox test.bin
This could be security-sensitive: This particular UBSan message of loading an invalid enum value is a typical symptom of uninitialized memory. It is likely that mFrame->colorspace is uninitialized here. However, a cursory look at the code suggests that the value is only flowing into a switch statement with a default case and not used further. On the other hand, there could be more parts of mFrame uninitialized, so we should check first what the source of the issue here is.
| Reporter | ||
Comment 1•3 years ago
|
||
| Reporter | ||
Comment 2•3 years ago
|
||
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 4•3 years ago
|
||
This is on an AV1 decoded via ffmpeg, we only do this on Linux. Looks like other members don't have correct values as well, lots of errors on stdout.
| Assignee | ||
Comment 5•3 years ago
|
||
| Assignee | ||
Comment 6•3 years ago
|
||
It's initialized to a bogus value, directly from the codec byte-stream, and we fall back to a good default value in the switch.
Then the code errors out as it should, because the file isn't valid, this isn't security sensitive, but I'll make a patch regardless to silence this.
Updated•3 years ago
|
| Assignee | ||
Comment 7•3 years ago
|
||
Comment 9•3 years ago
|
||
| bugherder | ||
Comment 10•3 years ago
|
||
The patch landed in nightly and beta is affected.
:padenot, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox106towontfix.
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Description
•