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

Heap-Buffer-Overflow in AudioConverter::FramesOutToSamples via Integer Overflow on 32-bit platforms

An unchecked multiplication in AudioConverter::FramesOutToSamples() can overflow on 32-bit builds, so a buffer is allocated too small while the resampler writes the full output. A web page could trigger a heap-buffer-overflow and crash the tab.

Ameen Basha M K Follow

Originally disclosed on Mozilla

  • Fixed in 13 days
  • Paid in 13 days
  • Disclosed after 13 days

Created attachment 9568330 serve.py

HI team, Firefox 32 bit on windows vulnerable for Heap BOF from web content

AudioConverter::FramesOutToSamples() performs an unchecked frames * mOut.Channels() multiplication. When the result exceeds size_t on 32-bit (or uint32_t if truncated), the buffer allocation is undersized while the resampler writes the full (non-overflowed) output, causing a massive heap-buffer-overflow.

System requirement: 8-channel audio output (7.1 surround or virtual sink)

Vulnerable Code Path

dom/media/AudioConverter.h: Process() const-ref template
  L168: size_t resampledFrames = ResampleRecipientFrames(frames);
  L169: size_t neededSamples = FramesOutToSamples(resampledFrames);  // <-- OVERFLOW HERE
  L178: temp2.SetLength(neededSamples);  // allocates wrapped (small) size
  ...
  L190: frames = ResampleAudio(outputBuffer->Data(), temp1.Data(), frames);
        // speex writes full (non-wrapped) output to undersized buffer
dom/media/AudioConverter.cpp:
  L496: size_t AudioConverter::FramesOutToSamples(size_t aFrames) const {
  L497:   return aFrames * mOut.Channels();  // NO overflow check!
  L498: }

Steps to reproduce:

  1. Make sure the windows 32 machine have 8-channel Audio output (or) use below steps i. install voicemeeter potato on windows and restart to show the virtual output device ii. windows + r and type mmsys.cpl (it opens sound settings) iii. navigate and click Voicemeter VAIO3 Input as default device iv. and click configure in left bottom to enable 7.1 audio support Note: this is just to reproduce, usually Realtek audio and NVIDIA/AMD High Definition Sound feature automatically supports this 8 channel audio but old windows machine didnt have any such readymade, so installed this methd just for 7.1 virtual audio

  2. Open Firefox (i tested on nightly 151.0a1 as of today) and open the poc url eg: http://localhost/poc_crash.html

  3. Boom you can see the tab crash

NOte: Since we didnt have ASAN support for 32 build i have confirmed this crash with windbg analysis

I have attached the poc files for reproduce (place all file in one folder and run python3 serve.py)

The original report as published on Mozilla's Bugzilla, by Ameen Basha M K. 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 sample-count calculation multiplies frames by channel count without checking for integer overflow, so the allocation size wraps while the write does not.

Impact

A web page could cause a heap-buffer-overflow and crash the tab on 32-bit Firefox; the report does not claim code execution.

What the attacker needed

32-bit Firefox build; 8-channel audio output device; victim opens a crafted page

How it was found

  1. Set up an 8-channel audio output device on a 32-bit Windows machine.
  2. Open Firefox and load the proof-of-concept page.
  3. Observe the tab crash.

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 audio is resampled, the program calculates how much memory it needs by multiplying two numbers. On a 32-bit system that multiplication can wrap around to a small number, so too little memory is reserved, and the audio code then writes past the end of it. This corrupts memory and crashes the browser tab.

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 Ameen Basha M K

View all

23 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.