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

Heap buffer overflow in RtpPacket::SetCsrcs — missing upstream security fix

A source code review found that RtpPacket::SetCsrcs() writes attacker-controlled CSRC values past the heap buffer boundary because its bounds checks are debug-only assertions compiled out in release builds. A malicious WebRTC peer could send crafted RTP packets with more than 15 CSRCs to trigger a heap buffer overflow with attacker-controlled content.

jmwebdevelopement Follow

Originally disclosed on Mozilla

  • Fixed in 9 days
  • Paid in 25 days
  • Disclosed after 9 days
Text
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36

Steps to reproduce:

Manual source code review of third_party/libwebrtc/modules/rtp_rtcp/source/rtp_packet.cc identified that RtpPacket::SetCsrcs() (lines 227-241) performs heap buffer writes with only RTC_DCHECK bounds checking — compiled out in release builds. Firefox's libwebrtc was last synced 2026-03-24, missing upstream Chromium security fix commit 5560f13 (chromium:486317116) authored 2026-03-25.



Actual results:

SetCsrcs() writes attacker-controlled uint32_t CSRC values past the heap buffer boundary via WriteAt() BEFORE SetSize() resizes the buffer. All 5 guard conditions are RTC_DCHECK (no-ops in release Firefox). A malicious WebRTC peer can deliver crafted RTP packets with >15 CSRCs, causing heap buffer overflow with attacker-controlled content. Adjacent heap objects include SRTP contexts and audio frame buffers.



Expected results:

SetCsrcs() should perform runtime bounds checking (RTC_CHECK, not RTC_DCHECK) and resize the buffer BEFORE writing. The upstream fix (commit 5560f13) adds runtime truncation and resize-before-write ordering. Firefox should import this fix.

The original report as published on Mozilla's Bugzilla, by jmwebdevelopement. 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 buffer resize happens after the write and the only bounds checks are RTC_DCHECK assertions that are removed in release builds, so oversized CSRC lists are written out of bounds.

Impact

A malicious WebRTC peer could cause a heap buffer overflow with attacker-controlled content, potentially corrupting adjacent objects such as SRTP contexts and audio frame buffers; the text does not demonstrate code execution.

What the attacker needed

Malicious WebRTC peer; release build without debug checks

The fix

SetCsrcs() should use runtime bounds checking and resize the buffer before writing, as the upstream Chromium fix does; Firefox should import that fix.

How it was found

  1. Review the SetCsrcs() implementation in the RTP packet source file.
  2. Note that the five guard conditions are RTC_DCHECK and therefore no-ops in release builds.
  3. Observe that WriteAt() writes before SetSize() resizes the buffer.
  4. Conclude that a peer sending more than 15 CSRCs overflows the heap buffer.

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.

WebRTC is the technology browsers use for video calls. When a call is set up, small data packets carry a list of identifiers, and the code that stores that list did not check how many identifiers arrived. Because the safety checks only exist in special test builds, a normal release build would happily write past the end of a memory buffer, which can crash the browser or potentially let an attacker run their own code.

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 jmwebdevelopement

View all

1 more disclosed report, 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.