Shared security patch analysis results
AI Used: DEEPSEEK deepseek-chat--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/docs/performance/tools_power_rapl.md+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/docs/performance/tools_power_rapl.md@@ -12,7 +12,7 @@ ## Invocation-First, do a [standard build of Firefox](../setup/index.html).+First, do a [standard build of Firefox](/setup/index.rst). ### Mac
Let me analyze the provided code diff for security fixes. Vulnerability Existed: no [No security vulnerability found] [docs/performance/tools_power_rapl.md] [Lines 12] [Old Code: First, do a [standard build of Firefox](../setup/index.html).] [Fixed Code: First, do a [standard build of Firefox](/setup/index.rst).] Additional Details: This appears to be a documentation update that changes the link format from a relative path with HTML extension to an absolute path with RST (reStructuredText) extension. There is no security vulnerability being fixed here - it's just a documentation formatting change. The modification doesn't involve any security-sensitive code, configuration, or functionality.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.round.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.round.html@@ -17,8 +17,8 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50);@@ -47,18 +47,18 @@ ctx.arc(75, 15, 10+tol, 0, Math.PI, true); ctx.arc(75, 35, 10+tol, Math.PI, 0, true); ctx.fill();-_assertPixel(offscreenCanvas, 17,6, 0,255,0,255, "17,6", "0,255,0,255");-_assertPixel(offscreenCanvas, 25,6, 0,255,0,255, "25,6", "0,255,0,255");-_assertPixel(offscreenCanvas, 32,6, 0,255,0,255, "32,6", "0,255,0,255");-_assertPixel(offscreenCanvas, 17,43, 0,255,0,255, "17,43", "0,255,0,255");-_assertPixel(offscreenCanvas, 25,43, 0,255,0,255, "25,43", "0,255,0,255");-_assertPixel(offscreenCanvas, 32,43, 0,255,0,255, "32,43", "0,255,0,255");-_assertPixel(offscreenCanvas, 67,6, 0,255,0,255, "67,6", "0,255,0,255");-_assertPixel(offscreenCanvas, 75,6, 0,255,0,255, "75,6", "0,255,0,255");-_assertPixel(offscreenCanvas, 82,6, 0,255,0,255, "82,6", "0,255,0,255");-_assertPixel(offscreenCanvas, 67,43, 0,255,0,255, "67,43", "0,255,0,255");-_assertPixel(offscreenCanvas, 75,43, 0,255,0,255, "75,43", "0,255,0,255");-_assertPixel(offscreenCanvas, 82,43, 0,255,0,255, "82,43", "0,255,0,255");+_assertPixel(canvas, 17,6, 0,255,0,255, "17,6", "0,255,0,255");+_assertPixel(canvas, 25,6, 0,255,0,255, "25,6", "0,255,0,255");+_assertPixel(canvas, 32,6, 0,255,0,255, "32,6", "0,255,0,255");+_assertPixel(canvas, 17,43, 0,255,0,255, "17,43", "0,255,0,255");+_assertPixel(canvas, 25,43, 0,255,0,255, "25,43", "0,255,0,255");+_assertPixel(canvas, 32,43, 0,255,0,255, "32,43", "0,255,0,255");+_assertPixel(canvas, 67,6, 0,255,0,255, "67,6", "0,255,0,255");+_assertPixel(canvas, 75,6, 0,255,0,255, "75,6", "0,255,0,255");+_assertPixel(canvas, 82,6, 0,255,0,255, "82,6", "0,255,0,255");+_assertPixel(canvas, 67,43, 0,255,0,255, "67,43", "0,255,0,255");+_assertPixel(canvas, 75,43, 0,255,0,255, "75,43", "0,255,0,255");+_assertPixel(canvas, 82,43, 0,255,0,255, "82,43", "0,255,0,255"); t.done(); });
After analyzing the provided code diff, I don't see any security-related changes. The changes appear to be purely variable renaming (from `offscreenCanvas` to `canvas`) and updating the corresponding assertions to use the new variable name. Here's the analysis: Vulnerability Existed: no No security vulnerability found [File] [Lines 17-18, 47-58] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixel(offscreenCanvas, 17,6, 0,255,0,255, "17,6", "0,255,0,255"); ... [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixel(canvas, 17,6, 0,255,0,255, "17,6", "0,255,0,255"); ... The changes are purely cosmetic/refactoring in nature and don't address any security issues. The functionality remains exactly the same, just with a different variable name.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-transforms/transform-origin-010.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-transforms/transform-origin-010.html@@ -5,7 +5,6 @@ <link rel="author" title="Jieqiong Cui" href="mailto:[email protected]"> <link rel="help" title="8. The 'transform-origin' Property" href="http://www.w3.org/TR/css-transforms-1/#transform-origin-property"> <link rel="match" href="transform-origin-007-ref.html">-<meta name="flags" content=""> <meta name="assert" content="The 'transform-origin' property set 'left' computes to 0% for the horizontal position."> <style> .div1 {
Based on the provided diff, I'll analyze it for security fixes: Vulnerability Existed: no No security vulnerability found [File] testing/web-platform/tests/css/css-transforms/transform-origin-010.html [Lines 5] Old Code: <meta name="flags" content=""> Fixed Code: (removed line) Additional Details: 1. The change simply removes an empty meta "flags" tag which doesn't appear to have any security implications. 2. This looks like a test file cleanup rather than a security fix. 3. The modification doesn't affect any security-sensitive functionality or introduce/remove any security-related features. 4. The change is more likely related to test metadata cleanup than addressing any vulnerability.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html@@ -17,8 +17,8 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); var promise = new Promise(function(resolve, reject) { var xhr = new XMLHttpRequest();@@ -34,10 +34,10 @@ var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50);- _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");- _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");- _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");- _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");+ _assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");+ _assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");+ _assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");+ _assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); }, t_fail); }).then(t_pass, t_fail);
Analyzing the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely variable renaming (from `offscreenCanvas` to `canvas`) and corresponding updates to the assertions. Here's the analysis following your requested format: Vulnerability Existed: no No security vulnerability found in this diff. The changes are variable renaming and test assertion updates. Additional Details: - The diff shows only variable name changes (`offscreenCanvas` → `canvas`) - All functional logic remains the same - The test assertions are updated to use the new variable name - No security-related patterns (XSS, injection, etc.) are present in either version The changes appear to be code style/readability improvements rather than security fixes.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/layout/base/nsLayoutUtils.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/layout/base/nsLayoutUtils.h@@ -18,6 +18,7 @@ #include "mozilla/SVGImageContext.h" #include "mozilla/ToString.h" #include "mozilla/TypedEnumBits.h"+#include "mozilla/Span.h" #include "mozilla/UniquePtr.h" #include "mozilla/WritingModes.h" #include "mozilla/layout/FrameChildList.h"@@ -993,8 +994,8 @@ NO_COMMON_ANCESTOR, NONINVERTIBLE_TRANSFORM };- static TransformResult TransformPoints(nsIFrame* aFromFrame,- nsIFrame* aToFrame,+ static TransformResult TransformPoints(RelativeTo aFromFrame,+ RelativeTo aToFrame, uint32_t aPointCount, CSSPoint* aPoints);@@ -1654,11 +1655,11 @@ DrawTarget* aDrawTarget) { return AppUnitWidthOfString(&aC, 1, aFontMetrics, aDrawTarget); }- static nscoord AppUnitWidthOfString(const nsString& aString,+ static nscoord AppUnitWidthOfString(mozilla::Span<const char16_t> aString, nsFontMetrics& aFontMetrics, DrawTarget* aDrawTarget) {- return nsLayoutUtils::AppUnitWidthOfString(aString.get(), aString.Length(),- aFontMetrics, aDrawTarget);+ return nsLayoutUtils::AppUnitWidthOfString(+ aString.Elements(), aString.Length(), aFontMetrics, aDrawTarget); } static nscoord AppUnitWidthOfString(const char16_t* aString, uint32_t aLength, nsFontMetrics& aFontMetrics,
Here's the analysis of the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential Buffer Overflow] [File: layout/base/nsLayoutUtils.h] [Lines: 1654-1658] [Old Code] static nscoord AppUnitWidthOfString(const nsString& aString, nsFontMetrics& aFontMetrics, DrawTarget* aDrawTarget) { return nsLayoutUtils::AppUnitWidthOfString(aString.get(), aString.Length(), aFontMetrics, aDrawTarget); } [Fixed Code] static nscoord AppUnitWidthOfString(mozilla::Span<const char16_t> aString, nsFontMetrics& aFontMetrics, DrawTarget* aDrawTarget) { return nsLayoutUtils::AppUnitWidthOfString( aString.Elements(), aString.Length(), aFontMetrics, aDrawTarget); } [Additional Details] The change from nsString to Span<const char16_t> could be related to preventing potential buffer overflows by using a bounds-checked span type, but without more context, we can't be certain. 2. Vulnerability Existed: not sure [Potential Type Safety Issue] [File: layout/base/nsLayoutUtils.h] [Lines: 993-996] [Old Code] static TransformResult TransformPoints(nsIFrame* aFromFrame, nsIFrame* aToFrame, uint32_t aPointCount, CSSPoint* aPoints); [Fixed Code] static TransformResult TransformPoints(RelativeTo aFromFrame, RelativeTo aToFrame, uint32_t aPointCount, CSSPoint* aPoints); [Additional Details] The change from raw pointers to RelativeTo type might be related to type safety or null pointer checks, but the exact security implication isn't clear from the diff alone. Note: The analysis shows potential security improvements, but without more context about the specific vulnerabilities being addressed or the implementation details of RelativeTo and Span, we can't definitively identify specific vulnerabilities. The changes appear to be moving toward safer programming practices (using span instead of raw strings, and wrapper types instead of raw pointers), which generally improve security.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/devtools/client/debugger/src/utils/pause/frames/collapseFrames.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/client/debugger/src/utils/pause/frames/collapseFrames.js@@ -1,14 +1,12 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */--import { findIndex } from "lodash"; // eslint-disable-next-line max-len import { getFrameUrl } from "./getFrameUrl"; function collapseLastFrames(frames) {- const index = findIndex(frames, frame =>+ const index = frames.findIndex(frame => getFrameUrl(frame).match(/webpack\/bootstrap/i) );
Analyzing the provided code diff, here's the security assessment: 1. Vulnerability Existed: no No specific vulnerability found [devtools/client/debugger/src/utils/pause/frames/collapseFrames.js] [Lines 1-14] Old Code: `import { findIndex } from "lodash";` and using lodash's findIndex Fixed Code: Using native Array.prototype.findIndex instead Additional Notes: - The change appears to be a performance optimization rather than a security fix - The modification replaces lodash's findIndex with JavaScript's native Array.findIndex - No security vulnerabilities were addressed in this change - The functionality remains the same, just implemented differently - This could be considered a dependency reduction improvement (removing lodash dependency) No security vulnerabilities were identified in this diff. The change is primarily about code optimization and reducing external dependencies.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-pseudo/first-letter-punctuation-and-space.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-pseudo/first-letter-punctuation-and-space.html@@ -6,7 +6,6 @@ <link rel="author" title="Johannes Odland" href="mailto:[email protected]"> <link rel="match" href="first-letter-punctuation-and-space-ref.html"> <link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#first-letter-pseudo">- <meta name="flags" content=""> <meta name="assert" content="Test checks that punctuation, intervening space separators and letters still have proper ::first-letter styling."> <style> div {
Based on the provided diff, I'll analyze it for security vulnerabilities: 1. Vulnerability Existed: no [No security vulnerability found] [testing/web-platform/tests/css/css-pseudo/first-letter-punctuation-and-space.html] [Lines 6] [Old Code: <meta name="flags" content="">] [Fixed Code: (line removed)] Additional details: - The diff shows only the removal of an empty meta tag for "flags" which appears to be test-related metadata - This change doesn't appear to be security-related but rather a cleanup of test configuration - No actual security vulnerability is being fixed here, just test file maintenance - The change doesn't involve any user input handling, authentication, or other security-sensitive operations Since this is just a test file modification removing an unused meta tag, there doesn't appear to be any security implication to this change.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-values/calc-min-height-block-1.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-values/calc-min-height-block-1.html@@ -5,7 +5,6 @@ <link rel="author" title="L. David Baron" href="https://dbaron.org/"> <link rel="help" href="http://www.w3.org/TR/css3-values/#calc-notation"> <link rel="match" href="calc-height-block-1-ref.html">- <meta name="flags" content=""> <style type="text/css"> body { margin: 0 } body > div { float: left; height: 100px; width: 1px; }
After analyzing the provided code diff, I don't see any security vulnerabilities being fixed. The change simply removes an empty meta tag with a "flags" attribute, which doesn't appear to have any security implications. Answer: Vulnerability Existed: no No security vulnerability found in this diff. The change is a simple HTML cleanup removing an empty meta tag. Additional Notes: - The removed line was `<meta name="flags" content="">` which had no meaningful content - This appears to be a test file cleanup rather than a security fix - No actual code changes were made to the CSS or JavaScript portions - No user input or sensitive data handling was modified
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.worker.js@@ -13,13 +13,13 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50); ctx.clearRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");+_assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0"); t.done(); });
Based on the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely variable renaming for better clarity. Here's the analysis: 1. Vulnerability Existed: no Variable Renaming [File] [Lines 13-19] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50); ctx.clearRect(0, 0, 100, 50); _assertPixel(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50); ctx.clearRect(0, 0, 100, 50); _assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0"); The changes simply rename the variable `offscreenCanvas` to `canvas` for consistency or brevity, without any security implications. No actual functionality or security-related behavior was modified.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/FileAPI/blob/Blob-stream.any.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/FileAPI/blob/Blob-stream.any.js@@ -7,8 +7,9 @@ // if perform_gc is true. async function read_and_gc(reader, perform_gc) { const read_promise = reader.read();- if (perform_gc)- garbageCollect();+ if (perform_gc) {+ await garbageCollect();+ } return read_promise; }@@ -65,7 +66,7 @@ let blob = new Blob([typed_arr]); const stream = blob.stream(); blob = null;- garbageCollect();+ await garbageCollect(); const chunks = await read_all_chunks(stream, /*perform_gc=*/true); assert_array_equals(chunks, input_arr); }, "Blob.stream() garbage collection of blob shouldn't break stream" +
Here's the analysis of the provided code diff: 1. Vulnerability Existed: not sure Potential Race Condition [File] testing/web-platform/tests/FileAPI/blob/Blob-stream.any.js [Lines 7-11] [Old Code] ```javascript const read_promise = reader.read(); if (perform_gc) garbageCollect(); ``` [Fixed Code] ```javascript const read_promise = reader.read(); if (perform_gc) { await garbageCollect(); } ``` Additional Details: The fix adds await to garbage collection, which may prevent potential race conditions between the read operation and garbage collection, though this is more of a reliability fix than a security one. 2. Vulnerability Existed: not sure Potential Resource Management Issue [File] testing/web-platform/tests/FileAPI/blob/Blob-stream.any.js [Lines 65-66] [Old Code] ```javascript blob = null; garbageCollect(); ``` [Fixed Code] ```javascript blob = null; await garbageCollect(); ``` Additional Details: Similar to the first change, this ensures proper sequencing of garbage collection, which could potentially prevent resource management issues, though not clearly a security vulnerability. Note: These changes appear to be more about test reliability and proper async handling rather than addressing specific security vulnerabilities. The main improvements are in ensuring proper sequencing of garbage collection operations.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/devtools/server/actors/descriptors/webextension.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/server/actors/descriptors/webextension.js@@ -19,6 +19,9 @@ const { connectToFrame, } = require("devtools/server/connectors/frame-connector");+const {+ createWebExtensionSessionContext,+} = require("devtools/server/actors/watcher/session-context"); loader.lazyImporter( this,@@ -111,13 +114,14 @@ await this._extensionFrameConnect(); this.watcher = new WatcherActor( this.conn,- {- type: "webextension",- addonId: this.addonId,- addonBrowsingContextID: this._form.browsingContextID,- addonInnerWindowId: this._form.innerWindowId,- },- config+ createWebExtensionSessionContext(+ {+ addonId: this.addonId,+ browsingContextID: this._form.browsingContextID,+ innerWindowId: this._form.innerWindowId,+ },+ config+ ) ); this.manage(this.watcher); }
Here's the analysis of the provided code diff: 1. Vulnerability Existed: not sure [Potential Session Context Creation Vulnerability] [devtools/server/actors/descriptors/webextension.js] [Lines 111-124] [Old Code] ```javascript this.watcher = new WatcherActor( this.conn, { type: "webextension", addonId: this.addonId, addonBrowsingContextID: this._form.browsingContextID, addonInnerWindowId: this._form.innerWindowId, }, config ) ``` [Fixed Code] ```javascript this.watcher = new WatcherActor( this.conn, createWebExtensionSessionContext( { addonId: this.addonId, browsingContextID: this._form.browsingContextID, innerWindowId: this._form.innerWindowId, }, config ) ) ``` Additional Details: The main change is the introduction of a dedicated `createWebExtensionSessionContext` function to create the session context object. While this appears to be a security improvement (centralizing and potentially validating the context creation), without seeing the implementation of `createWebExtensionSessionContext`, we can't be certain if this fixes a specific vulnerability. The change suggests there might have been concerns about how the session context was being constructed, possibly related to improper validation of the context parameters.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/third_party/rust/ash/src/extensions/khr/deferred_host_operations.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/ash/src/extensions/khr/deferred_host_operations.rs@@ -8,18 +8,16 @@ #[derive(Clone)] pub struct DeferredHostOperations { handle: vk::Device,- deferred_host_operations_fn: vk::KhrDeferredHostOperationsFn,+ fp: vk::KhrDeferredHostOperationsFn, } impl DeferredHostOperations { pub fn new(instance: &Instance, device: &Device) -> Self {- let deferred_host_operations_fn = vk::KhrDeferredHostOperationsFn::load(|name| unsafe {- mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr()))+ let handle = device.handle();+ let fp = vk::KhrDeferredHostOperationsFn::load(|name| unsafe {+ mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) });- Self {- handle: device.handle(),- deferred_host_operations_fn,- }+ Self { handle, fp } } #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateDeferredOperationKHR.html>"]@@ -28,7 +26,7 @@ allocation_callbacks: Option<&vk::AllocationCallbacks>, ) -> VkResult<vk::DeferredOperationKHR> { let mut operation = mem::zeroed();- self.deferred_host_operations_fn+ self.fp .create_deferred_operation_khr( self.handle, allocation_callbacks.as_raw_ptr(),@@ -42,7 +40,7 @@ &self, operation: vk::DeferredOperationKHR, ) -> VkResult<()> {- self.deferred_host_operations_fn+ self.fp .deferred_operation_join_khr(self.handle, operation) .result() }@@ -53,12 +51,11 @@ operation: vk::DeferredOperationKHR, allocation_callbacks: Option<&vk::AllocationCallbacks>, ) {- self.deferred_host_operations_fn- .destroy_deferred_operation_khr(- self.handle,- operation,- allocation_callbacks.as_raw_ptr(),- );+ self.fp.destroy_deferred_operation_khr(+ self.handle,+ operation,+ allocation_callbacks.as_raw_ptr(),+ ); } #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetDeferredOperationMaxConcurrencyKHR.html>"]@@ -66,7 +63,7 @@ &self, operation: vk::DeferredOperationKHR, ) -> u32 {- self.deferred_host_operations_fn+ self.fp .get_deferred_operation_max_concurrency_khr(self.handle, operation) }@@ -75,7 +72,7 @@ &self, operation: vk::DeferredOperationKHR, ) -> VkResult<()> {- self.deferred_host_operations_fn+ self.fp .get_deferred_operation_result_khr(self.handle, operation) .result() }@@ -85,7 +82,7 @@ } pub fn fp(&self) -> &vk::KhrDeferredHostOperationsFn {- &self.deferred_host_operations_fn+ &self.fp } pub fn device(&self) -> vk::Device {
Here's the analysis of the provided code diff: 1. Vulnerability Existed: no No specific vulnerability found [File] third_party/rust/ash/src/extensions/khr/deferred_host_operations.rs [Lines] Various [Old Code] Uses `deferred_host_operations_fn` as field name and in function calls [Fixed Code] Renamed to `fp` for consistency and brevity The changes appear to be primarily refactoring/renaming rather than security fixes. The main change is renaming the field `deferred_host_operations_fn` to `fp` and updating all references to it. This doesn't appear to address any security vulnerability but rather improves code consistency and readability. No actual security vulnerabilities were identified in this diff. The changes are cosmetic/structural rather than security-related. The unsafe block remains unchanged (as it's necessary for Vulkan FFI operations), and all the function calls maintain the same safety characteristics. Note: The diff doesn't show any changes that would indicate fixes for common vulnerabilities like memory safety issues, race conditions, or improper input validation. The functionality remains identical, just with renamed identifiers.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.html@@ -17,8 +17,8 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';@@ -36,7 +36,7 @@ promise.then(function(response) { createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0);- _assertPixelApprox(offscreenCanvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5);+ _assertPixelApprox(canvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5); }, t_fail); }).then(t_pass, t_fail);
Based on the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely variable renaming and don't involve any security-related modifications. Here's the analysis following your requested format: 1. Vulnerability Existed: no No security vulnerability found [testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.html] [Lines 17-18, 36] Old Code: var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); [...] _assertPixelApprox(offscreenCanvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5); Fixed Code: var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); [...] _assertPixelApprox(canvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5); The changes are: 1. Renaming variable `offscreenCanvas` to `canvas` 2. Updating the variable name in the assertion call These changes don't appear to address any security issues but rather improve code consistency or readability.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/gfx/ipc/RemoteCompositorSession.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/gfx/ipc/RemoteCompositorSession.cpp@@ -79,8 +79,10 @@ mAPZ->SetCompositorSession(nullptr); mAPZ->Destroy(); }- mCompositorBridgeChild->Destroy();- mCompositorBridgeChild = nullptr;+ if (mCompositorBridgeChild) {+ mCompositorBridgeChild->Destroy();+ mCompositorBridgeChild = nullptr;+ } mCompositorWidgetDelegate = nullptr; mWidget = nullptr; #if defined(MOZ_WIDGET_ANDROID)
Let me analyze the provided code diff for potential security fixes. Vulnerability Existed: yes Null Pointer Dereference [File] [Lines 79-82] [Old Code] mCompositorBridgeChild->Destroy(); mCompositorBridgeChild = nullptr; [Fixed Code] if (mCompositorBridgeChild) { mCompositorBridgeChild->Destroy(); mCompositorBridgeChild = nullptr; } Additional Details: - The fix adds a null check before calling Destroy() on mCompositorBridgeChild - This prevents a potential null pointer dereference which could lead to crashes or undefined behavior - While this might not be an exploitable security vulnerability in all cases, null pointer dereferences can sometimes be leveraged for security exploits depending on the context - The fix follows safer programming practices by ensuring the pointer is valid before dereferencing it
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.basic.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.basic.html@@ -17,8 +17,8 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); let fonts = (self.fonts ? self.fonts : document.fonts);
Based on the provided diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely cosmetic/refactoring (variable name change from `offscreenCanvas` to `canvas`). Here's the analysis: Vulnerability Existed: no [No security vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.basic.html] [Lines 17-18] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); The change doesn't address any security issue but rather improves code consistency by using a shorter variable name. No security-related patterns (like XSS, injection, etc.) are involved in this change.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/devtools/client/webconsole/test/node/mocha-test-setup.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/client/webconsole/test/node/mocha-test-setup.js@@ -57,6 +57,10 @@ "devtools/client/shared/telemetry", "devtools/client/shared/screenshot", "devtools/client/shared/focus",+ "devtools/shared/commands/target/legacy-target-watchers/legacy-processes-watcher",+ "devtools/shared/commands/target/legacy-target-watchers/legacy-workers-watcher",+ "devtools/shared/commands/target/legacy-target-watchers/legacy-sharedworkers-watcher",+ "devtools/shared/commands/target/legacy-target-watchers/legacy-serviceworkers-watcher", ]; if (!excluded.includes(path)) { if (!Array.isArray(names)) {@@ -64,8 +68,13 @@ } for (const name of names) {- const module = require(path);- global[name] = destruct ? module[name] : module;+ Object.defineProperty(global, name, {+ get() {+ const module = require(path);+ return destruct ? module[name] : module;+ },+ configurable: true,+ }); } } },
Let me analyze the code diff for security fixes: 1. Vulnerability Existed: yes Prototype Pollution or Global Namespace Pollution [devtools/client/webconsole/test/node/mocha-test-setup.js] [Lines 64-68] [Old Code] for (const name of names) { const module = require(path); global[name] = destruct ? module[name] : module; } [Fixed Code] for (const name of names) { Object.defineProperty(global, name, { get() { const module = require(path); return destruct ? module[name] : module; }, configurable: true, }); } Additional Details: - The fix changes how properties are added to the global object, using Object.defineProperty with a getter instead of direct assignment - This prevents potential prototype pollution attacks by making the properties non-enumerable and more controlled - The configurable: true flag allows these properties to be modified or deleted later if needed - The change also implements lazy loading of modules through the getter function 2. Vulnerability Existed: not sure Module Loading Security [devtools/client/webconsole/test/node/mocha-test-setup.js] [Lines 57-60] [Old Code] No specific module paths listed [Fixed Code] Added several legacy watcher module paths: "devtools/shared/commands/target/legacy-target-watchers/legacy-processes-watcher", "devtools/shared/commands/target/legacy-target-watchers/legacy-workers-watcher", "devtools/shared/commands/target/legacy-target-watchers/legacy-sharedworkers-watcher", "devtools/shared/commands/target/legacy-target-watchers/legacy-serviceworkers-watcher", Additional Details: - While these appear to be legitimate module additions, without more context about these modules' security implications, I can't be certain if this addresses any specific vulnerability - The addition could be related to worker/process security isolation improvements
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/dom/promise/PromiseWorkerProxy.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/promise/PromiseWorkerProxy.h@@ -174,11 +174,11 @@ bool* aSameProcessScopeRequired) override; protected:- virtual void ResolvedCallback(JSContext* aCx,- JS::Handle<JS::Value> aValue) override;-- virtual void RejectedCallback(JSContext* aCx,- JS::Handle<JS::Value> aValue) override;+ virtual void ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue,+ ErrorResult& aRv) override;++ virtual void RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue,+ ErrorResult& aRv) override; private: explicit PromiseWorkerProxy(
Analyzing the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential Error Handling Improvement] [dom/promise/PromiseWorkerProxy.h] [Lines 174-179] [Old Code] virtual void ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) override; virtual void RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) override; [Fixed Code] virtual void ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue, ErrorResult& aRv) override; virtual void RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue, ErrorResult& aRv) override; Additional Details: - The change adds ErrorResult parameters to callback methods, which suggests improved error handling - While this could potentially address unhandled error cases, there's no clear evidence of a specific vulnerability being fixed - The modification appears to be more about API consistency and better error reporting rather than fixing a known security issue
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/security/manager/ssl/tests/unit/head_psm.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/security/manager/ssl/tests/unit/head_psm.js@@ -176,6 +176,20 @@ return certList; }+function areCertsEqual(certA, certB) {+ let derA = certA.getRawDER();+ let derB = certB.getRawDER();+ if (derA.length != derB.length) {+ return false;+ }+ for (let i = 0; i < derA.length; i++) {+ if (derA[i] != derB[i]) {+ return false;+ }+ }+ return true;+}+ function areCertArraysEqual(certArrayA, certArrayB) { if (certArrayA.length != certArrayB.length) { return false;@@ -184,7 +198,7 @@ for (let i = 0; i < certArrayA.length; i++) { const certA = certArrayA[i]; const certB = certArrayB[i];- if (!certA.equals(certB)) {+ if (!areCertsEqual(certA, certB)) { return false; } }@@ -928,12 +942,7 @@ // expected error code, tests that an initial connection to the host fails // with the expected errors and that adding an override results in a subsequent // connection succeeding.-function add_cert_override_test(- aHost,- aExpectedBits,- aExpectedError,- aExpectedSecInfo = undefined-) {+function add_cert_override_test(aHost, aExpectedBits, aExpectedError) { add_connection_test( aHost, aExpectedError,@@ -946,13 +955,6 @@ Ci.nsIWebProgressListener.STATE_CERT_USER_OVERRIDDEN, "Cert override flag should be set on the security state" );- if (aExpectedSecInfo) {- if (aExpectedSecInfo.failedCertChain) {- ok(- aExpectedSecInfo.failedCertChain.equals(aSecurityInfo.failedCertChain)- );- }- } }); }
Here's the analysis of the provided code diff: 1. Vulnerability Existed: not sure [Potential Timing Attack Vulnerability] [security/manager/ssl/tests/unit/head_psm.js] [Lines 176-188] [Old Code] ```javascript function areCertArraysEqual(certArrayA, certArrayB) { if (certArrayA.length != certArrayB.length) { return false; } for (let i = 0; i < certArrayA.length; i++) { const certA = certArrayA[i]; const certB = certArrayB[i]; if (!certA.equals(certB)) { return false; } } return true; } ``` [Fixed Code] ```javascript function areCertsEqual(certA, certB) { let derA = certA.getRawDER(); let derB = certB.getRawDER(); if (derA.length != derB.length) { return false; } for (let i = 0; i < derA.length; i++) { if (derA[i] != derB[i]) { return false; } } return true; } function areCertArraysEqual(certArrayA, certArrayB) { if (certArrayA.length != certArrayB.length) { return false; } for (let i = 0; i < certArrayA.length; i++) { const certA = certArrayA[i]; const certB = certArrayB[i]; if (!areCertsEqual(certA, certB)) { return false; } } return true; } ``` Additional Details: The change introduces a new function `areCertsEqual` that performs a byte-by-byte comparison of certificate DER encodings instead of using the `equals()` method. While this might be more precise, it could potentially introduce timing attack vulnerabilities if the comparison is used in security-sensitive contexts, as the execution time may vary based on input differences. 2. Vulnerability Existed: not sure [Potential Information Leak Removal] [security/manager/ssl/tests/unit/head_psm.js] [Lines 928-955] [Old Code] ```javascript function add_cert_override_test( aHost, aExpectedBits, aExpectedError, aExpectedSecInfo = undefined ) { add_connection_test( aHost, aExpectedError, function() { check_cert_override(aHost, aExpectedBits); ok( aSecurityInfo.state & Ci.nsIWebProgressListener.STATE_CERT_USER_OVERRIDDEN, "Cert override flag should be set on the security state" ); if (aExpectedSecInfo) { if (aExpectedSecInfo.failedCertChain) { ok( aExpectedSecInfo.failedCertChain.equals(aSecurityInfo.failedCertChain) ); } } }); } ``` [Fixed Code] ```javascript function add_cert_override_test(aHost, aExpectedBits, aExpectedError) { add_connection_test( aHost, aExpectedError, function() { check_cert_override(aHost, aExpectedBits); ok( aSecurityInfo.state & Ci.nsIWebProgressListener.STATE_CERT_USER_OVERRIDDEN, "Cert override flag should be set on the security state" ); }); } ``` Additional Details: The removal of the `aExpectedSecInfo` parameter and related certificate chain comparison might indicate a security fix where sensitive certificate information was being unnecessarily exposed or compared in test code. However, without more context, it's unclear if this was actually a security vulnerability or just a test simplification. Note: Both cases are marked as "not sure" because while there are changes that could potentially relate to security, the diff alone doesn't provide enough context to definitively identify them as security fixes. The changes could also be functional improvements or test simplifications.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/mediaqueries/aspect-ratio-005.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/mediaqueries/aspect-ratio-005.html@@ -4,7 +4,6 @@ <link rel="author" title="Joel Olsson" href="mailto:[email protected]"> <link rel="help" title="aspect-ratio" href="https://drafts.csswg.org/mediaqueries-4/#aspect-ratio"> <link rel="match" href="../reference/ref-filled-green-100px-square.xht">-<meta name="flags" content=""> <meta name="assert" content="The 'aspect-ratio' property with prefix 'max' set 1280.1/720.01. Only and only if the value of the 'width' to the value of the 'height' is lower than value of 'max-aspect-ratio', the style sheet will be applied. The test runner will run this test in a 800/600 viewport (https://github.com/web-platform-tests/wpt/pull/12695)">
Based on the provided diff, I'll analyze it for security vulnerabilities: Vulnerability Existed: no No security vulnerability found [File] [Lines 4] [Old Code] <meta name="flags" content=""> [Fixed Code] (removed line) Additional Details: - The change simply removes an empty meta tag that wasn't serving any purpose - This appears to be a cleanup change rather than a security fix - No known vulnerability patterns are present in this change - The modification doesn't affect any security-related functionality The diff shows a minor HTML cleanup change where an empty meta tag was removed. This doesn't appear to be related to any security fixes or vulnerabilities. The change is likely part of general code maintenance or test standardization.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/dom/fetch/FetchStreamReader.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/fetch/FetchStreamReader.cpp@@ -8,15 +8,22 @@ #include "InternalResponse.h" #include "js/Stream.h" #include "mozilla/ConsoleReportCollector.h"+#include "mozilla/ErrorResult.h" #include "mozilla/dom/AutoEntryScript.h" #include "mozilla/dom/DOMException.h" #include "mozilla/dom/Promise.h" #include "mozilla/dom/PromiseBinding.h"+#ifdef MOZ_DOM_STREAMS+# include "mozilla/dom/ReadableStream.h"+# include "mozilla/dom/ReadableStreamDefaultController.h"+# include "mozilla/dom/ReadableStreamDefaultReader.h"+#endif #include "mozilla/dom/WorkerPrivate.h" #include "mozilla/dom/WorkerRef.h" #include "mozilla/HoldDropJSObjects.h" #include "mozilla/TaskCategory.h" #include "nsContentUtils.h"+#include "nsDebug.h" #include "nsIAsyncInputStream.h" #include "nsIPipe.h" #include "nsIScriptError.h"@@ -32,14 +39,24 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(FetchStreamReader) NS_IMPL_CYCLE_COLLECTION_UNLINK(mGlobal)+#ifdef MOZ_DOM_STREAMS+ NS_IMPL_CYCLE_COLLECTION_UNLINK(mReader)+#else+ tmp->mReader = nullptr;+#endif NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(FetchStreamReader) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mGlobal)+#ifdef MOZ_DOM_STREAMS+ NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mReader)+#endif NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(FetchStreamReader)+#ifndef MOZ_DOM_STREAMS NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mReader)+#endif NS_IMPL_CYCLE_COLLECTION_TRACE_END NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(FetchStreamReader)@@ -136,12 +153,24 @@ JS::Rooted<JS::Value> errorValue(aCx); if (ToJSValue(aCx, error, &errorValue)) {+#ifdef MOZ_DOM_STREAMS+ IgnoredErrorResult ignoredError;+ // It's currently safe to cancel an already closed reader because, per the+ // comments in ReadableStream::cancel() conveying the spec, step 2 of+ // 3.4.3 that specified ReadableStreamCancel is: If stream.[[state]] is+ // "closed", return a new promise resolved with undefined.+ RefPtr<Promise> ignoredResultPromise =+ MOZ_KnownLive(mReader)->Cancel(aCx, errorValue, ignoredError);+ NS_WARNING_ASSERTION(!ignoredError.Failed(),+ "Failed to cancel stream during close and release");+#else JS::Rooted<JSObject*> reader(aCx, mReader); // It's currently safe to cancel an already closed reader because, per the // comments in ReadableStream::cancel() conveying the spec, step 2 of // 3.4.3 that specified ReadableStreamCancel is: If stream.[[state]] is // "closed", return a new promise resolved with undefined. JS::ReadableStreamReaderCancel(aCx, reader, errorValue);+#endif } // We don't want to propagate exceptions during the cleanup.@@ -160,6 +189,31 @@ mReader = nullptr; mBuffer.Clear(); }++#ifdef MOZ_DOM_STREAMS+void FetchStreamReader::StartConsuming(JSContext* aCx, ReadableStream* aStream,+ ReadableStreamDefaultReader** aReader,+ ErrorResult& aRv) {+ MOZ_DIAGNOSTIC_ASSERT(!mReader);+ MOZ_DIAGNOSTIC_ASSERT(aStream);++ RefPtr<ReadableStreamDefaultReader> reader =+ AcquireReadableStreamDefaultReader(aCx, aStream, aRv);+ if (aRv.Failed()) {+ CloseAndRelease(aCx, NS_ERROR_DOM_INVALID_STATE_ERR);+ return;+ }++ mReader = reader;+ reader.forget(aReader);++ aRv = mPipeOut->AsyncWait(this, 0, 0, mOwningEventTarget);+ if (NS_WARN_IF(aRv.Failed())) {+ return;+ }+}++#else void FetchStreamReader::StartConsuming(JSContext* aCx, JS::HandleObject aStream, JS::MutableHandle<JSObject*> aReader,@@ -192,9 +246,10 @@ return; } }+#endif // nsIOutputStreamCallback interface-+MOZ_CAN_RUN_SCRIPT_BOUNDARY NS_IMETHODIMP FetchStreamReader::OnOutputStreamReady(nsIAsyncOutputStream* aStream) { NS_ASSERT_OWNINGTHREAD(FetchStreamReader);@@ -215,6 +270,39 @@ // Response's one. AutoEntryScript aes(mGlobal, "ReadableStreamReader.read", !mWorkerRef);+#ifdef MOZ_DOM_STREAMS+ ErrorResult rv;++ // The below very loosely tries to implement the incrementally-read-loop from+ // the fetch spec: However, because of the structure of the surrounding code,+ // it makes use of the Read_ReadRequest with one modification: For the+ // purposes of this read, we use `aForAuthorCode=false` in constructing the+ // read request. This makes the value resolve have a null prototype, hiding+ // this code from potential interference via `Object.prototype.then`.+ RefPtr<Promise> domPromise = Promise::Create(mGlobal, rv);+ if (NS_WARN_IF(rv.Failed())) {+ // Let's close the stream.+ CloseAndRelease(aes.cx(), NS_ERROR_DOM_INVALID_STATE_ERR);+ return NS_ERROR_FAILURE;+ }++ RefPtr<ReadRequest> readRequest =+ new Read_ReadRequest(domPromise, /* aForAuthorCode = */ false);++ ReadableStreamDefaultReaderRead(aes.cx(), MOZ_KnownLive(mReader), readRequest,+ rv);++ // We report the (potential) JS Exception via the AutoEntryScript above, as+ // was done in the JS Streams implementation as well.+ rv.WouldReportJSException();++ if (NS_WARN_IF(rv.Failed())) {+ // Let's close the stream.+ CloseAndRelease(aes.cx(), NS_ERROR_DOM_INVALID_STATE_ERR);+ return NS_ERROR_FAILURE;+ }++#else JS::Rooted<JSObject*> reader(aes.cx(), mReader); JS::Rooted<JSObject*> promise( aes.cx(), JS::ReadableStreamDefaultReaderRead(aes.cx(), reader));@@ -230,14 +318,15 @@ CloseAndRelease(aes.cx(), NS_ERROR_DOM_INVALID_STATE_ERR); return NS_ERROR_FAILURE; }-+#endif // Let's wait. domPromise->AppendNativeHandler(this); return NS_OK; } void FetchStreamReader::ResolvedCallback(JSContext* aCx,- JS::Handle<JS::Value> aValue) {+ JS::Handle<JS::Value> aValue,+ ErrorResult& aRv) { if (mStreamClosed) { return; }@@ -335,7 +424,8 @@ } void FetchStreamReader::RejectedCallback(JSContext* aCx,- JS::Handle<JS::Value> aValue) {+ JS::Handle<JS::Value> aValue,+ ErrorResult& aRv) { ReportErrorToConsole(aCx, aValue); CloseAndRelease(aCx, NS_ERROR_FAILURE); }
Based on the provided diff, I'll analyze the changes for potential security fixes. Here are the identified vulnerabilities: 1. Vulnerability Existed: not sure [Potential Memory Leak] [dom/fetch/FetchStreamReader.cpp] [Lines 32-54] [Old Code] NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(FetchStreamReader) NS_IMPL_CYCLE_COLLECTION_UNLINK(mGlobal) NS_IMPL_CYCLE_COLLECTION_UNLINK_END [Fixed Code] NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(FetchStreamReader) NS_IMPL_CYCLE_COLLECTION_UNLINK(mGlobal) #ifdef MOZ_DOM_STREAMS NS_IMPL_CYCLE_COLLECTION_UNLINK(mReader) #else tmp->mReader = nullptr; #endif NS_IMPL_CYCLE_COLLECTION_UNLINK_END 2. Vulnerability Existed: not sure [Potential Race Condition] [dom/fetch/FetchStreamReader.cpp] [Lines 136-149] [Old Code] JS::ReadableStreamReaderCancel(aCx, reader, errorValue); [Fixed Code] #ifdef MOZ_DOM_STREAMS IgnoredErrorResult ignoredError; RefPtr<Promise> ignoredResultPromise = MOZ_KnownLive(mReader)->Cancel(aCx, errorValue, ignoredError); NS_WARNING_ASSERTION(!ignoredError.Failed(), "Failed to cancel stream during close and release"); #else JS::ReadableStreamReaderCancel(aCx, reader, errorValue); #endif 3. Vulnerability Existed: not sure [Potential Unhandled Exception] [dom/fetch/FetchStreamReader.cpp] [Lines 324-327] [Old Code] void FetchStreamReader::RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) { [Fixed Code] void FetchStreamReader::RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue, ErrorResult& aRv) { The changes appear to be primarily focused on: 1. Adding proper cycle collection for mReader in different configurations 2. Improving error handling during stream cancellation 3. Adding better error reporting mechanisms While these changes improve robustness, I cannot definitively identify specific CVE-worthy vulnerabilities from the diff alone. The modifications seem to be more about code maintenance and adding support for MOZ_DOM_STREAMS rather than fixing specific security vulnerabilities.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.