Closed Bug 1910211 Opened 1 year ago Closed 1 year ago

Assertion failure: ((bool)(__builtin_expect(!!(!NS_FAILED_impl(result)), 1))) (Failed to convert YUV into RGB data), at /builds/worker/checkouts/gecko/image/decoders/nsAVIFDecoder.cpp:1927

Categories

(Core :: Graphics: ImageLib, defect)

defect

Tracking

()

VERIFIED FIXED
131 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox-esr128 --- wontfix
firefox129 --- wontfix
firefox130 --- wontfix
firefox131 --- verified

People

(Reporter: tsmith, Assigned: tnikkel)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase, Whiteboard: [bugmon:bisected,confirmed])

Attachments

(2 files)

Attached image testcase.avif

Found while fuzzing m-c 20240724-a0e3db73fd24 (--enable-debug --enable-fuzzing)

To reproduce via Grizzly Replay:

$ pip install fuzzfetch grizzly-framework --upgrade
$ python -m fuzzfetch -d --fuzzing -n firefox
$ python -m grizzly.replay.bugzilla ./firefox/firefox <bugid>

Assertion failure: ((bool)(__builtin_expect(!!(!NS_FAILED_impl(result)), 1))) (Failed to convert YUV into RGB data), at /builds/worker/checkouts/gecko/image/decoders/nsAVIFDecoder.cpp:1927

#0 0x78abfd68db0a in mozilla::image::nsAVIFDecoder::DoDecodeInternal(mozilla::image::SourceBufferIterator&, mozilla::image::IResumable*) /builds/worker/checkouts/gecko/image/decoders/nsAVIFDecoder.cpp:1927:3
#1 0x78abfd68a678 in mozilla::image::nsAVIFDecoder::DoDecode(mozilla::image::SourceBufferIterator&, mozilla::image::IResumable*) /builds/worker/checkouts/gecko/image/decoders/nsAVIFDecoder.cpp:1256:25
#2 0x78abfd5c116a in mozilla::image::Decoder::Decode(mozilla::image::IResumable*) /builds/worker/checkouts/gecko/image/Decoder.cpp:180:19
#3 0x78abfd5cd44f in mozilla::image::DecodedSurfaceProvider::Run() /builds/worker/checkouts/gecko/image/DecodedSurfaceProvider.cpp:125:34
#4 0x78abfd5e3cd1 in mozilla::image::DecodingTask::Run() /builds/worker/checkouts/gecko/image/DecodePool.cpp:153:12
#5 0x78abfbba0898 in mozilla::TaskController::RunPoolThread(mozilla::PoolThread*) /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:350:29
#6 0x78ac0f4db6ef in _pt_root /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:201:5
#7 0x78ac0ee94ac2 in start_thread nptl/pthread_create.c:442:8
#8 0x78ac0ef2684f  misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Flags: in-testsuite?

Verified bug as reproducible on mozilla-central 20240727090309-265f9fb218cd.
Unable to bisect testcase (Testcase reproduces on start build!):

Start: 1c410aed156878dc739ffdb4343c315fb0bb0a00 (20230729091211)
End: a0e3db73fd245839270bf90032fcab98a5549a64 (20240724215903)
BuildFlags: BuildFlags(asan=False, tsan=False, debug=True, fuzzing=True, coverage=False, valgrind=False, no_opt=False, fuzzilli=False, nyx=False)

Whiteboard: [bugmon:bisected,confirmed]

The matrix coefficients field in the file is Identity, indicating this is RGB data, but the pixel layout field is "half width and half height". We don't support subsampling with RGB data, so we hit this

https://searchfox.org/mozilla-central/rev/fa55b33a4b56f392bc5a0c7616e0dfe055112cb5/gfx/ycbcr/yuv_convert.cpp#144

which makes ConvertYCbCrToRGB32 fail.

Assignee: nobody → tnikkel
Status: NEW → ASSIGNED
Severity: -- → S3
Pushed by tnikkel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/34a8413ced65 Error-out if an avif file specifies color space options that are not supported instead of asserting. r=gfx-reviewers,nical
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch

Verified bug as fixed on rev mozilla-central 20240807215007-70728a2fa4a2.
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.

Status: RESOLVED → VERIFIED
Keywords: bugmon

The patch landed in nightly and beta is affected.
:tnikkel, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox130 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(tnikkel)
Flags: needinfo?(tnikkel)
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: