High firefox Integer Overflow 🔧 Commit mapped

Overview

High
Severity
CVSS
No
Exploited ITW
Fixed
Fix Status
Impacthigh
DescriptionInteger overflow in the Audio/Video component
ComponentDOM
Bug ClassInteger Overflow
Tracker2014883
Fix commit032f025e28ea (firefox) +6/-2
CISA KEVNot listed
CreditedEvyatar Ben Asher, Keane Lucas, Nicholas Carlini, Newton Cheng, Daniel Freeman, Alex Gaynor, and Joel Weinberger using Claude from Anthropic
Disclosed2026-02-24

Changed Functions

FunctionChangeNotes
for
dom/media/webm/WebMDemuxer.cpp
modified
if
dom/media/webm/WebMDemuxer.cpp
modified

Files Changed

  • dom/media/webm/WebMDemuxer.cpp
diff --git a/dom/media/webm/WebMDemuxer.cpp b/dom/media/webm/WebMDemuxer.cpp
index 779f0d42211..ed1718862be 100644
--- a/dom/media/webm/WebMDemuxer.cpp
+++ b/dom/media/webm/WebMDemuxer.cpp
@@ -925,6 +925,12 @@ nsresult WebMDemuxer::GetNextPacket(TrackInfo::TrackType aType,
 
           for (uint8_t i = 0; i < numPartitions; i++) {
             uint32_t partition = partitions[i];
+            if (partition > length || partition < lastOffset) {
+              WEBM_DEBUG(
+                  "Invalid partition offset: %u (length: %zu, lastOffset: %u)",
+                  partition, length, lastOffset);
+              return NS_ERROR_DOM_MEDIA_DEMUXER_ERR;
+            }
             uint32_t currentLength = partition - lastOffset;
 
             if (encrypted) {
@@ -935,8 +941,6 @@ nsresult WebMDemuxer::GetNextPacket(TrackInfo::TrackType aType,
 
             encrypted = !encrypted;
             lastOffset = partition;
-
-            MOZ_ASSERT(lastOffset <= length);
           }
 
           // Add the data between the last offset and the end of the data.
Loading diff…