Skip to content
Memory corruption Disclosed report Advanced CVE-2026-4695

Invalid memory read access in aom_sse_avx2

A crafted HTML page that drives the AV1 encoder with extreme frame dimensions causes out-of-bounds reads inside the aom_sse_avx2 SIMD routine during CDEF filtering. An attacker could crash the browser process or read memory beyond the intended buffer, as shown by AddressSanitizer traces.

Atte Kettunen Follow

Originally disclosed on Mozilla

  • Fixed in 16 days
  • Paid in 34 days
  • Disclosed after 16 days
Text
Created attachment 9548741
repro_cdef_min.html

Tested on:

OS: Ubuntu 25.10
Firefox: fuzzfetch fetched AddressSanitizer build
'''
Version=150.0a1
BuildID=20260227090653
SourceStamp=69326b7edf8166a75eba45b4f156f7a9727be83a
ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
'''

ASAN-trace(with repro-file as it is):
'''
=================================================================
==85175==ERROR: AddressSanitizer: SEGV on unknown address 0x7bff2cb94880 (pc 0x7bfff31a9b5d bp 0x7bffa91e1730 sp 0x7bffa91e1610 T30)
==85175==The signal is caused by a READ memory access.
SCARINESS: 20 (wild-addr-read)
    #0 0x7bfff31a9b5d in aom_sse_avx2 /builds/worker/checkouts/gecko/third_party/aom/aom_dsp/x86/sse_avx2.c:0:0
    #1 0x7bfff38591dc in get_filt_error /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/pickcdef.c:428:13
    #2 0x7bfff38591dc in av1_cdef_mse_calc_block /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/pickcdef.c:601:33
    #3 0x7bfff37442c2 in cdef_filter_block_worker_hook /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/ethread.c:3332:5
    #4 0x7bfff3204bf5 in execute /builds/worker/checkouts/gecko/third_party/aom/aom_util/aom_thread.c:197:27
    #5 0x7bfff3743657 in launch_workers /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/ethread.c:1481:7
    #6 0x7bfff3743657 in av1_cdef_mse_calc_frame_mt /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/ethread.c:3362:3
    #7 0x7bfff385cd20 in av1_cdef_search /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/pickcdef.c:880:5
    #8 0x7bfff3703233 in cdef_restoration_frame /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/encoder.c:2770:5
    #9 0x7bfff3703233 in loopfilter_frame /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/encoder.c:2898:3
    #10 0x7bfff3703233 in encode_with_recode_loop_and_filter /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/encoder.c:3724:5
    #11 0x7bfff36dbce0 in encode_frame_to_data_rate /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/encoder.c:4370:9
.
.
.
'''

If you modify the repro-file dimensions array from:
'''
        const dimensions = [
            { width: 16384, height: 17 },
            { width: 64, height: 55572 }
        ];
'''
to
'''
        const dimensions = [
            //{ width: 16384, height: 17 },
            { width: 64, height: 55572 }
        ];
'''
You get a different ASAN-trace:
'''
=================================================================
==3761615==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7bff241c5c80 at pc 0x7bfff35aa89a bp 0x7bff975e15e0 sp 0x7bff975e15d8
READ of size 32 at 0x7bff241c5c80 thread T36
    #0 0x7bfff35aa899 in yy_loadu_256 /builds/worker/checkouts/gecko/third_party/aom/aom_dsp/x86/synonyms_avx2.h:35:10
    #1 0x7bfff35aa899 in sse_w32_avx2 /builds/worker/checkouts/gecko/third_party/aom/aom_dsp/x86/sse_avx2.c:25:24
    #2 0x7bfff35aa899 in aom_sse_avx2 /builds/worker/checkouts/gecko/third_party/aom/aom_dsp/x86/sse_avx2.c:165:9
    #3 0x7bfff3c591dc in get_filt_error /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/pickcdef.c:428:13
    #4 0x7bfff3c591dc in av1_cdef_mse_calc_block /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/pickcdef.c:601:33
    #5 0x7bfff3b442c2 in cdef_filter_block_worker_hook /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/ethread.c:3332:5
...
0x7bff241c5c80 is located 89 bytes after 21414951-byte region [0x7bff22d59800,0x7bff241c5c27)
allocated by thread T36 here:
    #0 0x5555556c3484 in malloc /builds/worker/fetches/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:67:3
    #1 0x7bfff35fdd66 in aom_memalign /builds/worker/checkouts/gecko/third_party/aom/aom_mem/aom_mem.c:59:22
    #2 0x7bfff35fe4b1 in realloc_frame_buffer_aligned /builds/worker/checkouts/gecko/third_party/aom/aom_scale/generic/yv12config.c:132:38
    #3 0x7bfff35fe4b1 in aom_realloc_frame_buffer /builds/worker/checkouts/gecko/third_party/aom/aom_scale/generic/yv12config.c:259:12
    #4 0x7bfff3c60dcf in av1_pick_filter_level /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/picklpf.c:348:9
    #5 0x7bfff3b0304c in loopfilter_frame /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/encoder.c:2874:5
 ...
'''

I have also seen this stack-trace on my fuzzing cluster, I suspect it to be from the same root cause, but haven't been able to get that reproduced, by modifying this repro-file:
'''
==796764==ERROR: AddressSanitizer: stack-use-after-return on address 0x7bff5eed9c80 at pc 0x7bfff31aa767 bp 0x7bffad3e1600 sp 0x7bffad3e15f8
READ of size 16 at 0x7bff5eed9c80 thread T32
SCARINESS: 64 (multi-byte-read-stack-use-after-return)
    #0 0x7bfff31aa766 in xx_loadu_128 /builds/worker/checkouts/gecko/third_party/aom/aom_dsp/x86/synonyms.h:46:10
    #1 0x7bfff31aa766 in aom_sse_avx2 /builds/worker/checkouts/gecko/third_party/aom/aom_dsp/x86/sse_avx2.c:132:30
    #2 0x7bfff385944a in get_filt_error /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/pickcdef.c:461:23
    #3 0x7bfff385944a in av1_cdef_mse_calc_block /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/pickcdef.c:601:33
    #4 0x7bfff37442c2 in cdef_filter_block_worker_hook /builds/worker/checkouts/gecko/third_party/aom/av1/encoder/ethread.c:3332:5
    #5 0x7bfff3204bf5 in execute /builds/worker/checkouts/gecko/third_party/aom/aom_util/aom_thread.c:197:27
...

Address 0x7bff5eed9c80 is located in stack of thread T60 at offset 128 in frame
    #0 0x7bffd181750f in mozilla::CycleCollectedJSRuntime::DescribeGCThing(bool, JS::GCCellPtr, nsCycleCollectionTraversalCallback&) const /builds/worker/checkouts/gecko/xpcom/base/CycleCollectedJSRuntime.cpp:961:0

  This frame has 4 object(s):
    [32, 40) 'aThing'
    [64, 136) 'name' (line 967) <== Memory access at offset 128 partially overflows this variable
    [176, 328) 'chars' (line 982)
    [400, 488) 'fname' (line 984)
'''

The original report as published on Mozilla's Bugzilla, by Atte Kettunen. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the CDEF filter error calculation passes block pointers and strides that do not match the allocated frame buffer for extreme dimensions, so the AVX2 SSE routine reads past the buffer.

What the attacker needed

Victim opens a crafted HTML page; AV1 encoding is triggered

How it was found

  1. Open the attached reproducer HTML file in the AddressSanitizer build of Firefox.
  2. The page sets up frame dimensions of 16384 by 17 and 64 by 55572.
  3. The AV1 encoder runs CDEF filtering on the frames.
  4. AddressSanitizer reports an invalid read in aom_sse_avx2.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a browser encodes video, it processes frames in small blocks and compares them using fast vector instructions. Here the frame sizes were so unusual that the code read past the end of a buffer, which a memory checker flagged as an invalid read. A malicious page could trigger this to crash the browser or leak memory contents.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Atte Kettunen

View all

62 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.