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/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.worker.js+++ /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.canvas.destination-out.worker.js@@ -13,11 +13,11 @@ }); 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 offscreenCanvas2 = new OffscreenCanvas(offscreenCanvas.width, offscreenCanvas.height);+var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); var ctx2 = offscreenCanvas2.getContext('2d'); var promise = new Promise(function(resolve, reject) { var xhr = new XMLHttpRequest();@@ -35,7 +35,7 @@ ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'destination-out'; ctx.drawImage(offscreenCanvas2, 0, 0);- _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 5);+ _assertPixelApprox(canvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 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 code style improvements. Here's the analysis: 1. Vulnerability Existed: no No security vulnerability found [File] testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.worker.js [Lines] 13-35 [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); var offscreenCanvas2 = new OffscreenCanvas(offscreenCanvas.width, offscreenCanvas.height); _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 5); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); _assertPixelApprox(canvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 5); The changes simply rename the variable `offscreenCanvas` to `canvas` for consistency or clarity, but don't address any security issues. The functionality remains the same.
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/path-objects/2d.path.roundrect.3.radii.3.double.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.worker.js@@ -13,18 +13,18 @@ }); 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.roundRect(0, 0, 100, 50, [0, 0, 20]); ctx.fillStyle = '#0f0'; ctx.fill();-_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, 98,48, 255,0,0,255, "98,48", "255,0,0,255");-_assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,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, 98,48, 255,0,0,255, "98,48", "255,0,0,255");+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); t.done(); });
Here is the analysis of the provided code diff following the specified format: 1. Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.worker.js [Lines] 13-18 [Old Code] ```javascript var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ``` [Fixed Code] ```javascript var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ``` Additional Details: The change appears to be a variable rename from `offscreenCanvas` to `canvas` for consistency or readability, with no security implications. 2. Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.worker.js [Lines] 22-25 [Old Code] ```javascript _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, 98,48, 255,0,0,255, "98,48", "255,0,0,255"); _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); ``` [Fixed Code] ```javascript _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, 98,48, 255,0,0,255, "98,48", "255,0,0,255"); _assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); ``` Additional Details: This change is a continuation of the variable rename, updating references from `offscreenCanvas` to `canvas`. No security impact is observed. Summary: The diff shows no security-related fixes, only a variable name change for consistency. No vulnerabilities were identified 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/testing/mozharness/scripts/web_platform_tests.py+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/mozharness/scripts/web_platform_tests.py@@ -294,7 +294,6 @@ "--log-wptreport=%s" % os.path.join(dirs["abs_blob_upload_dir"], "wptreport.json"), "--log-errorsummary=%s" % error_summary_file,- "--binary=%s" % self.binary_path, "--symbols-path=%s" % self.symbols_path, "--stackwalk-binary=%s" % self.query_minidump_stackwalk(), "--stackfix-dir=%s" % os.path.join(dirs["abs_test_install_dir"], "bin"),@@ -330,6 +329,8 @@ "--device-serial=%s" % self.device_serial, "--package-name=%s" % self.query_package_name(), ]+ else:+ cmd.append("--binary=%s" % self.binary_path) if is_windows_7: # On Windows 7 --install-fonts fails, so fall back to a Firefox-specific codepath
Here's the analysis following your requested format: Vulnerability Existed: not sure Potential Command Injection Vulnerability [File] [testing/mozharness/scripts/web_platform_tests.py] [Lines 294-330] [Old Code] "--log-wptreport=%s" % os.path.join(dirs["abs_blob_upload_dir"], "wptreport.json"), "--log-errorsummary=%s" % error_summary_file, "--binary=%s" % self.binary_path, "--symbols-path=%s" % self.symbols_path, [Fixed Code] "--log-wptreport=%s" % os.path.join(dirs["abs_blob_upload_dir"], "wptreport.json"), "--log-errorsummary=%s" % error_summary_file, "--symbols-path=%s" % self.symbols_path, ... else: cmd.append("--binary=%s" % self.binary_path) Additional Details: The change moves the binary path argument to a conditional block. While this doesn't directly show a security vulnerability, there's potential for command injection if self.binary_path contains user-controlled input. The fix might be part of a larger security hardening effort, but without more context about how binary_path is set, we can't be certain. Vulnerability Existed: no Code Organization Improvement [File] [testing/mozharness/scripts/web_platform_tests.py] [Lines 294-330] [Old Code] "--binary=%s" % self.binary_path, [Fixed Code] else: cmd.append("--binary=%s" % self.binary_path) Additional Details: This appears to be a code organization improvement rather than a security fix, moving the binary path argument to only be added in non-device cases. No specific vulnerability is being addressed here.
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.fillStyle.parse.invalid.css-color-4-rgb-3.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.fillStyle.parse.invalid.css-color-4-rgb-3.html@@ -17,14 +17,14 @@ }); 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'; try { ctx.fillStyle = 'rgb(255, 0 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does ctx.fillRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); t.done(); });
Based on the provided diff, I don't see any security vulnerabilities being fixed. The changes appear to be primarily variable renaming and don't involve security-sensitive modifications. Here's the analysis following your requested format: Vulnerability Existed: no No security vulnerability found [File] [Lines 17-25] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ctx.fillStyle = '#0f0'; try { ctx.fillStyle = 'rgb(255, 0 0)'; } catch (e) { } ctx.fillRect(0, 0, 100, 50); _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ctx.fillStyle = '#0f0'; try { ctx.fillStyle = 'rgb(255, 0 0)'; } catch (e) { } ctx.fillRect(0, 0, 100, 50); _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); The changes are: 1. Renamed variable `offscreenCanvas` to `canvas` 2. Updated the variable name in the `_assertPixel` call These changes don't appear to address any security issues.
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/neqo-common/src/codec.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/neqo-common/src/codec.rs@@ -261,9 +261,7 @@ #[must_use] pub fn from_hex(s: impl AsRef<str>) -> Self { let s = s.as_ref();- if s.len() % 2 != 0 {- panic!("Needs to be even length");- }+ assert_eq!(s.len() % 2, 0, "Needs to be even length"); let cap = s.len() / 2; let mut enc = Self::with_capacity(cap);
Here's the analysis of the provided code diff: Vulnerability Existed: not sure [Potential Panic Handling Improvement] [third_party/rust/neqo-common/src/codec.rs] [Lines 261-263] [Old Code] if s.len() % 2 != 0 { panic!("Needs to be even length"); } [Fixed Code] assert_eq!(s.len() % 2, 0, "Needs to be even length"); Additional Details: - The change replaces a direct `panic!` with an `assert_eq!` macro for input validation - While this isn't fixing a known vulnerability, it's improving error handling consistency - The security impact is minimal, but using standard assertion macros is generally preferred - The change makes the code more idiomatic in Rust, but doesn't fundamentally change the behavior (both versions will panic on invalid input)
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/streams/readable-byte-streams/tee.any.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/streams/readable-byte-streams/tee.any.js@@ -1,20 +1,9 @@-// META: global=window,worker,jsshell+// META: global=window,worker // META: script=../resources/rs-utils.js // META: script=../resources/test-utils.js // META: script=../resources/recording-streams.js // META: script=../resources/rs-test-templates.js 'use strict';--function assert_typed_array_equals(actual, expected, message) {- const prefix = message === undefined ? '' : `${message} `;- assert_equals(typeof actual, 'object', `${prefix}type is object`);- assert_equals(actual.constructor, expected.constructor, `${prefix}constructor`);- assert_equals(actual.byteOffset, expected.byteOffset, `${prefix}byteOffset`);- assert_equals(actual.byteLength, expected.byteLength, `${prefix}byteLength`);- assert_equals(actual.buffer.byteLength, expected.buffer.byteLength, `${prefix}buffer.byteLength`);- assert_array_equals([...actual], [...expected], `${prefix}contents`);- assert_array_equals([...new Uint8Array(actual.buffer)], [...new Uint8Array(expected.buffer)], `${prefix}buffer contents`);-} test(() => {
Based on the provided diff, I'll analyze it for security vulnerabilities: 1. Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/streams/readable-byte-streams/tee.any.js [Lines] 1-20 [Old Code] // META: global=window,worker,jsshell // META: script=../resources/rs-utils.js // META: script=../resources/test-utils.js // META: script=../resources/recording-streams.js // META: script=../resources/rs-test-templates.js 'use strict'; function assert_typed_array_equals(actual, expected, message) { const prefix = message === undefined ? '' : `${message} `; assert_equals(typeof actual, 'object', `${prefix}type is object`); assert_equals(actual.constructor, expected.constructor, `${prefix}constructor`); assert_equals(actual.byteOffset, expected.byteOffset, `${prefix}byteOffset`); assert_equals(actual.byteLength, expected.byteLength, `${prefix}byteLength`); assert_equals(actual.buffer.byteLength, expected.buffer.byteLength, `${prefix}buffer.byteLength`); assert_array_equals([...actual], [...expected], `${prefix}contents`); assert_array_equals([...new Uint8Array(actual.buffer)], [...new Uint8Array(expected.buffer)], `${prefix}buffer contents`); } [Fixed Code] // META: global=window,worker // META: script=../resources/rs-utils.js // META: script=../resources/test-utils.js // META: script=../resources/recording-streams.js // META: script=../resources/rs-test-templates.js 'use strict'; The changes appear to be: 1. Removal of 'jsshell' from the META global declaration 2. Removal of the assert_typed_array_equals helper function Neither change appears to be security-related. The changes seem to be test environment configuration updates and code cleanup rather than security fixes. The removal of 'jsshell' might indicate it's no longer needed for testing, but this doesn't appear to be security-related. The removal of the helper function is likely just code cleanup since it wasn't being used in the test.
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/tools/profiler/core/PageInformation.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/tools/profiler/core/PageInformation.h@@ -29,7 +29,8 @@ public: NS_INLINE_DECL_THREADSAFE_REFCOUNTING(PageInformation) PageInformation(uint64_t aTabID, uint64_t aInnerWindowID,- const nsCString& aUrl, uint64_t aEmbedderInnerWindowID);+ const nsCString& aUrl, uint64_t aEmbedderInnerWindowID,+ bool aIsPrivateBrowsing); size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; bool Equals(PageInformation* aOtherPageInfo) const;@@ -39,6 +40,7 @@ uint64_t TabID() const { return mTabID; } const nsCString& Url() const { return mUrl; } uint64_t EmbedderInnerWindowID() const { return mEmbedderInnerWindowID; }+ bool IsPrivateBrowsing() const { return mIsPrivateBrowsing; } mozilla::Maybe<uint64_t> BufferPositionWhenUnregistered() const { return mBufferPositionWhenUnregistered;@@ -53,6 +55,7 @@ const uint64_t mInnerWindowID; const nsCString mUrl; const uint64_t mEmbedderInnerWindowID;+ const bool mIsPrivateBrowsing; // Holds the buffer position when page is unregistered. // It's used to determine if we still use this page in the profiler or
Here's the analysis of the provided code diff following the specified format: Vulnerability Existed: not sure [Potential Information Leak in Private Browsing] [tools/profiler/core/PageInformation.h] [Lines 29-55] [Old Code] PageInformation(uint64_t aTabID, uint64_t aInnerWindowID, const nsCString& aUrl, uint64_t aEmbedderInnerWindowID); ... const uint64_t mInnerWindowID; const nsCString mUrl; const uint64_t mEmbedderInnerWindowID; [Fixed Code] PageInformation(uint64_t aTabID, uint64_t aInnerWindowID, const nsCString& aUrl, uint64_t aEmbedderInnerWindowID, bool aIsPrivateBrowsing); ... const uint64_t mInnerWindowID; const nsCString mUrl; const uint64_t mEmbedderInnerWindowID; const bool mIsPrivateBrowsing; Additional Details: The diff shows the addition of private browsing tracking to the PageInformation class. While not a direct security vulnerability fix, this change could be related to preventing information leaks from private browsing sessions. The addition suggests the profiler will now be aware of private browsing state, which could help prevent accidental data collection or exposure of private browsing activity. However, without more context about how this flag is used, we can't be certain if it's fixing an existing vulnerability or just adding preventative measures.
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.strokeRect.globalalpha.html+++ /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.strokeRect.globalalpha.html@@ -17,14 +17,14 @@ }); 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.globalAlpha = 0; ctx.strokeStyle = '#f00'; ctx.lineWidth = 50; ctx.strokeRect(25, 24, 50, 2);-_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 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: Vulnerability Existed: no No vulnerability found [File] [Lines 17-25] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _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'); ... _assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0"); The changes simply rename the variable from `offscreenCanvas` to `canvas` throughout the test file, which doesn't represent any security fix but rather a code style/readability improvement. No security-related patterns or vulnerabilities are being addressed in this diff.
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/browser/components/newtab/test/browser/browser_asrouter_spotlight.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/browser/components/newtab/test/browser/browser_asrouter_spotlight.js@@ -14,6 +14,9 @@ ); const { SpecialMessageActions } = ChromeUtils.import( "resource://messaging-system/lib/SpecialMessageActions.jsm"+);+const { RemoteImagesTestUtils } = ChromeUtils.import(+ "resource://testing-common/RemoteImagesTestUtils.jsm" ); function waitForDialog(callback = win => win.close()) {@@ -212,6 +215,43 @@ }); });+add_task(async function test_remote_images_logo() {+ const imageInfo = RemoteImagesTestUtils.images.AboutRobots;+ const cleanup = await RemoteImagesTestUtils.serveRemoteImages(imageInfo);++ registerCleanupFunction(cleanup);++ let message = await PanelTestProvider.getMessages().then(msgs =>+ msgs.find(m => m.id === "SPOTLIGHT_MESSAGE_93")+ );++ message = {+ ...message,+ content: {+ ...message.content,+ logo: {+ imageId: imageInfo.imageId,+ },+ },+ };++ const dispatchStub = sinon.stub();+ const browser = BrowserWindowTracker.getTopWindow().gBrowser.selectedBrowser;++ await showAndWaitForDialog({ message, browser, dispatchStub }, async win => {+ await win.document.mozSubdialogReady;++ const logo = win.document.querySelector(".logo");++ ok(+ logo.src.startsWith("blob:"),+ "RemoteImages loaded a blob: URL in Spotlight"+ );++ win.document.getElementById("secondary").click();+ });+});+ add_task(async function test_contentExpanded() { let message = (await PanelTestProvider.getMessages()).find( m => m.id === "TCP_SPOTLIGHT_MESSAGE_95"
Analyzing the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be adding test functionality for remote images in spotlight messages. Here's the analysis: 1. Vulnerability Existed: no No vulnerability found [browser/components/newtab/test/browser/browser_asrouter_spotlight.js] [Lines 14-17, 212-255] Old Code: (No remote image testing utilities) Fixed Code: Added RemoteImagesTestUtils import and test case for remote images logo The changes are: 1. Adding an import for RemoteImagesTestUtils 2. Adding a new test case (test_remote_images_logo) that verifies remote images can be loaded in spotlight messages These changes appear to be test infrastructure improvements rather than security fixes. The test verifies that remote images are properly loaded as blob URLs, which is actually a security feature (loading remote content as blobs rather than direct URLs). No vulnerabilities are being fixed here - instead, the code is adding test coverage for existing security 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/css/compositing/mix-blend-mode/mix-blend-mode-overflowing-child.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/compositing/mix-blend-mode/mix-blend-mode-overflowing-child.html@@ -7,7 +7,6 @@ <link rel="reviewer" title="Horia Olaru" href="mailto:[email protected]"> <link rel="help" href="https://drafts.fxtf.org/compositing-1/#mix-blend-mode"> <meta name="assert" content="Test checks that an overflowing element with mix-blend-mode blends with the parent element.">- <meta name="flags" content=""/> <link rel="match" href="reference/mix-blend-mode-overflowing-child-ref.html"> <style type="text/css"> body {
Based on the provided code diff, I don't see any security-related changes. The modification is simply removing an empty meta tag for flags, which doesn't appear to have any security implications. Answer: Vulnerability Existed: no No security vulnerability found [testing/web-platform/tests/css/compositing/mix-blend-mode/mix-blend-mode-overflowing-child.html] [Lines 7] <meta name="flags" content=""/> [Removed line] Additional Notes: - The change appears to be a simple cleanup of an unused/empty meta tag - No actual security vulnerability was addressed in this diff - The modification doesn't affect any security-related 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/gfx/wr/glsl-to-cxx/src/lib.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/gfx/wr/glsl-to-cxx/src/lib.rs@@ -358,8 +358,9 @@ ) { write!( state,- "static void set_uniform_1i(Self *self, int index, int value) {{\n"+ "static void set_uniform_1i(VertexShaderImpl* impl, int index, int value) {{\n" );+ write!(state, " Self* self = (Self*)impl;\n"); write!(state, " if (self->samplers.set_slot(index, value)) return;\n"); write!(state, " switch (index) {{\n"); for (name, (index, tk, _)) in uniforms {@@ -385,8 +386,9 @@ ) { write!( state,- "static void set_uniform_4fv(Self *self, int index, const float *value) {{\n"+ "static void set_uniform_4fv(VertexShaderImpl* impl, int index, const float *value) {{\n" );+ write!(state, " Self* self = (Self*)impl;\n"); write!(state, " switch (index) {{\n"); for (name, (index, tk, _)) in uniforms { write!(state, " case {}:\n", index);@@ -411,8 +413,9 @@ ) { write!( state,- "static void set_uniform_matrix4fv(Self *self, int index, const float *value) {{\n"+ "static void set_uniform_matrix4fv(VertexShaderImpl* impl, int index, const float *value) {{\n" );+ write!(state, " Self* self = (Self*)impl;\n"); write!(state, " switch (index) {{\n"); for (name, (index, tk, _)) in uniforms { write!(state, " case {}:\n", index);@@ -510,8 +513,9 @@ fn write_load_attribs(state: &mut OutputState, attribs: &[hir::SymRef]) { write!(state, "static void load_attribs(\- Self *self, VertexAttrib *attribs, \- uint32_t start, int instance, int count) {{\n");+ VertexShaderImpl* impl, VertexAttrib *attribs, \+ uint32_t start, int instance, int count) {{\+ Self* self = (Self*)impl;\n"); for i in attribs { let sym = state.hir.sym(*i); match &sym.decl {@@ -622,7 +626,10 @@ write!(state, "static void read_interp_inputs(\- Self *self, const InterpInputs *init, const InterpInputs *step) {{\n");+ FragmentShaderImpl* impl, const void* init_, const void* step_) {{\+ Self* self = (Self*)impl;\+ const InterpInputs* init = (const InterpInputs*)init_;\+ const InterpInputs* step = (const InterpInputs*)step_;\n"); for i in inputs { let sym = state.hir.sym(*i); match &sym.decl {@@ -653,7 +660,10 @@ if state.use_perspective { write!(state, "static void read_perspective_inputs(\- Self *self, const InterpInputs *init, const InterpInputs *step) {{\n");+ FragmentShaderImpl* impl, const void* init_, const void* step_) {{\+ Self* self = (Self*)impl;\+ const InterpInputs* init = (const InterpInputs*)init_;\+ const InterpInputs* step = (const InterpInputs*)step_;\n"); if has_varying { write!(state, " Float w = 1.0f / self->gl_FragCoord.w;\n"); }@@ -3544,83 +3554,87 @@ fn write_abi(state: &mut OutputState) { match state.kind { ShaderKind::Fragment => {- state.write("static void run(Self *self) {\n");+ state.write("static void run(FragmentShaderImpl* impl) {\n");+ state.write(" Self* self = (Self*)impl;\n"); if state.uses_discard { state.write(" self->swgl_IsPixelDiscarded = false;\n"); } state.write(" self->main();\n"); state.write(" self->step_interp_inputs();\n"); state.write("}\n");- state.write("static void skip(Self* self, int steps) {\n");+ state.write("static void skip(FragmentShaderImpl* impl, int steps) {\n");+ state.write(" Self* self = (Self*)impl;\n"); state.write(" self->step_interp_inputs(steps);\n"); state.write("}\n"); if state.use_perspective {- state.write("static void run_perspective(Self *self) {\n");+ state.write("static void run_perspective(FragmentShaderImpl* impl) {\n");+ state.write(" Self* self = (Self*)impl;\n"); if state.uses_discard { state.write(" self->swgl_IsPixelDiscarded = false;\n"); } state.write(" self->main();\n"); state.write(" self->step_perspective_inputs();\n"); state.write("}\n");- state.write("static void skip_perspective(Self* self, int steps) {\n");+ state.write("static void skip_perspective(FragmentShaderImpl* impl, int steps) {\n");+ state.write(" Self* self = (Self*)impl;\n"); state.write(" self->step_perspective_inputs(steps);\n"); state.write("}\n"); } if state.hir.lookup("swgl_drawSpanRGBA8").is_some() {- state.write(- "static int draw_span_RGBA8(Self* self) { DISPATCH_DRAW_SPAN(self, RGBA8); }\n");+ state.write("static int draw_span_RGBA8(FragmentShaderImpl* impl) {\n");+ state.write(" Self* self = (Self*)impl; DISPATCH_DRAW_SPAN(self, RGBA8); }\n"); } if state.hir.lookup("swgl_drawSpanR8").is_some() {- state.write(- "static int draw_span_R8(Self* self) { DISPATCH_DRAW_SPAN(self, R8); }\n");+ state.write("static int draw_span_R8(FragmentShaderImpl* impl) {\n");+ state.write(" Self* self = (Self*)impl; DISPATCH_DRAW_SPAN(self, R8); }\n"); } write!(state, "public:\n{}_frag() {{\n", state.name); } ShaderKind::Vertex => {- state.write(- "static void run(Self* self, char* interps, size_t interp_stride) {\n",- );+ state.write("static void run(VertexShaderImpl* impl, char* interps, size_t interp_stride) {\n");+ state.write(" Self* self = (Self*)impl;\n"); state.write(" self->main();\n"); state.write(" self->store_interp_outputs(interps, interp_stride);\n"); state.write("}\n");- state.write("static void init_batch(Self *self) { self->bind_textures(); }\n");+ state.write("static void init_batch(VertexShaderImpl* impl) {\n");+ state.write(" Self* self = (Self*)impl; self->bind_textures(); }\n"); write!(state, "public:\n{}_vert() {{\n", state.name); } } match state.kind { ShaderKind::Fragment => {- state.write(" init_span_func = (InitSpanFunc)&read_interp_inputs;\n");- state.write(" run_func = (RunFunc)&run;\n");- state.write(" skip_func = (SkipFunc)&skip;\n");+ state.write(" init_span_func = &read_interp_inputs;\n");+ state.write(" run_func = &run;\n");+ state.write(" skip_func = &skip;\n"); if state.hir.lookup("swgl_drawSpanRGBA8").is_some() {- state.write(" draw_span_RGBA8_func = (DrawSpanRGBA8Func)&draw_span_RGBA8;\n");+ state.write(" draw_span_RGBA8_func = &draw_span_RGBA8;\n"); } if state.hir.lookup("swgl_drawSpanR8").is_some() {- state.write(" draw_span_R8_func = (DrawSpanR8Func)&draw_span_R8;\n");+ state.write(" draw_span_R8_func = &draw_span_R8;\n"); } if state.uses_discard { state.write(" enable_discard();\n"); } if state.use_perspective { state.write(" enable_perspective();\n");- state.write(" init_span_w_func = (InitSpanWFunc)&read_perspective_inputs;\n");- state.write(" run_w_func = (RunWFunc)&run_perspective;\n");- state.write(" skip_w_func = (SkipWFunc)&skip_perspective;\n");+ state.write(" init_span_w_func = &read_perspective_inputs;\n");+ state.write(" run_w_func = &run_perspective;\n");+ state.write(" skip_w_func = &skip_perspective;\n"); } else {- state.write(" init_span_w_func = (InitSpanWFunc)&read_interp_inputs;\n");- state.write(" run_w_func = (RunWFunc)&run;\n");- state.write(" skip_w_func = (SkipWFunc)&skip;\n");+ state.write(" init_span_w_func = &read_interp_inputs;\n");+ state.write(" run_w_func = &run;\n");+ state.write(" skip_w_func = &skip;\n"); } } ShaderKind::Vertex => {- state.write(" set_uniform_1i_func = (SetUniform1iFunc)&set_uniform_1i;\n");- state.write(" set_uniform_4fv_func = (SetUniform4fvFunc)&set_uniform_4fv;\n");- state.write(" set_uniform_matrix4fv_func = (SetUniformMatrix4fvFunc)&set_uniform_matrix4fv;\n");- state.write(" init_batch_func = (InitBatchFunc)&init_batch;\n");- state.write(" load_attribs_func = (LoadAttribsFunc)&load_attribs;\n");- state.write(" run_primitive_func = (RunPrimitiveFunc)&run;\n");+ state.write(" set_uniform_1i_func = &set_uniform_1i;\n");+ state.write(" set_uniform_4fv_func = &set_uniform_4fv;\n");+ state.write(" set_uniform_matrix4fv_func = &set_uniform_matrix4fv;\n");+ state.write(" init_batch_func = &init_batch;\n");+ state.write(" load_attribs_func = &load_attribs;\n");+ state.write(" run_primitive_func = &run;\n"); if state.hir.used_clip_dist != 0 { state.write(" enable_clip_distance();\n"); }
Based on the provided code diff, I'll analyze potential security vulnerabilities: 1. Vulnerability Existed: yes Improper Type Casting Vulnerability [gfx/wr/glsl-to-cxx/src/lib.rs] [Multiple locations throughout the file] [Old Code] Various functions taking `Self* self` directly as parameter [Fixed Code] Functions now take `VertexShaderImpl* impl` or `FragmentShaderImpl* impl` and cast to `Self* self` 2. Vulnerability Existed: yes Insecure Function Pointer Casting [gfx/wr/glsl-to-cxx/src/lib.rs] [Lines 3554-3629] [Old Code] Function pointer assignments using explicit casts like `(InitSpanFunc)&read_interp_inputs` [Fixed Code] Direct function pointer assignments without explicit casts like `&read_interp_inputs` 3. Vulnerability Existed: not sure Potential Type Confusion Vulnerability [gfx/wr/glsl-to-cxx/src/lib.rs] [Lines 622-629, 660-664] [Old Code] Direct use of `InterpInputs*` parameters [Fixed Code] Now takes `void*` parameters and casts to `InterpInputs*` The main security improvements appear to be: 1. Moving from direct pointer usage to interface-based access with proper casting 2. Removing potentially unsafe explicit function pointer casts 3. Making pointer type conversions more explicit and controlled These changes suggest the original code may have had potential type safety issues that could lead to memory corruption or type confusion vulnerabilities. The new version provides better type safety through the use of interface pointers and explicit casting.
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.fillStyle.invalidstring.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.fillStyle.invalidstring.html@@ -17,15 +17,15 @@ }); 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.fillStyle = '#0f0'; ctx.fillStyle = 'invalid'; ctx.fillRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); t.done(); });
Based on the provided code diff, I'll analyze it for potential security vulnerabilities: 1. Vulnerability Existed: no No security vulnerability found [File] testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.html [Lines] 17-25 [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); The changes appear to be purely cosmetic/refactoring, renaming the variable from `offscreenCanvas` to `canvas`. There's no indication of any security vulnerability being fixed in this change. 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/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.worker.js+++ /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.fillStyle.parse.css-color-4-hsla-2.worker.js@@ -13,14 +13,14 @@ }); 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.fillStyle = 'hsl(120 100.0% 50.0% / 0.2)'; ctx.fillRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 50,25, 0,255,0,51, "50,25", "0,255,0,51");+_assertPixel(canvas, 50,25, 0,255,0,51, "50,25", "0,255,0,51"); t.done(); });
Based on the provided diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely cosmetic/refactoring changes (variable renaming). Here's the analysis: Vulnerability Existed: no No vulnerability found [testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.worker.js] [Lines 13-21] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); [...] _assertPixel(offscreenCanvas, 50,25, 0,255,0,51, "50,25", "0,255,0,51"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); [...] _assertPixel(canvas, 50,25, 0,255,0,51, "50,25", "0,255,0,51"); The changes only involve: 1. Renaming `offscreenCanvas` variable to `canvas` 2. Updating the reference in `_assertPixel` call 3. No functional changes to the actual test logic or security-related code
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/pixel-manipulation/2d.imageData.put.basic.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.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'); ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50)@@ -26,7 +26,7 @@ ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50) ctx.putImageData(imgdata, 0, 0);-_assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); t.done(); });
After analyzing the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely variable name refactoring without any security implications. Here's the analysis following your requested format: Vulnerability Existed: no [No security vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.html] [17-26] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); The changes simply rename the variable `offscreenCanvas` to `canvas` throughout the file, which doesn't address any security issues but rather improves 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/js/src/jit/WarpSnapshot.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/js/src/jit/WarpSnapshot.cpp@@ -318,6 +318,7 @@ case StubField::Type::RawInt32: case StubField::Type::RawPointer: case StubField::Type::RawInt64:+ case StubField::Type::Double: break; case StubField::Type::Shape: { uintptr_t word = stubInfo_->getStubRawWord(stubData_, offset);
Let me analyze the code diff for potential security fixes. Vulnerability Existed: not sure [Potential Type Confusion Vulnerability] [js/src/jit/WarpSnapshot.cpp] [Lines 318-324] [Old Code] case StubField::Type::RawInt32: case StubField::Type::RawPointer: case StubField::Type::RawInt64: break; [Fixed Code] case StubField::Type::RawInt32: case StubField::Type::RawPointer: case StubField::Type::RawInt64: case StubField::Type::Double: break; Additional Details: The diff adds handling for StubField::Type::Double in a switch case. While this could potentially fix a type confusion issue where Double values weren't properly handled, there's no explicit evidence of a security vulnerability being fixed. This might be a completeness fix or preparatory work rather than a security fix.
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/ryu/.cargo-checksum.json+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/ryu/.cargo-checksum.json@@ -1 +1 @@-{"files":{"Cargo.lock":"78e4ede1b94fb783aa85026e765976cf849d9342bc756b9aeb634c42ebbbaa3b","Cargo.toml":"42c1fd620f2e5b485a4fed0ab1be20601b762fff1bf8c989eb526f78867d3589","LICENSE-APACHE":"c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4","LICENSE-BOOST":"c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566","README.md":"51bbf87e0aef209ddc39cc4d444d44f4805f44ed3663696eefc22a63f35fdb7e","benches/bench.rs":"ea6f919ff44d86ee26c69bf0b77d8a1502e687b26a68db8613f88d063470dd27","build.rs":"4d0cad8c0501f5b4d81eb91f693f8186db6edcc603c8906ae0305cfccd847df8","examples/upstream_benchmark.rs":"f702d3598a8fac59134a8058ebf74ba90163b1f23ebbd6c5978a7bd8a888d357","src/buffer/mod.rs":"7397b35efc3763c7c705b4d29b8777bbb7f1782698c87e721dcb0e24c99bbfd2","src/common.rs":"cae347e97fc30c50a964f80425e8c3e69ece2b8ab81f9b81b9baa7fcec64a001","src/d2s.rs":"630cea1a958a468f0f07f3748e3f52540a9e85fc667af5fef0e542b3c9b93394","src/d2s_full_table.rs":"9b0186acbc6d65dc55c17e16125be707a2bfb920d22b35d33234b4cc38566a36","src/d2s_intrinsics.rs":"56a1a53f0c418b82ca8c0d2523da70aa786c001250cdfca7847077d5d91e3b02","src/d2s_small_table.rs":"228d2e182ce940554d8d542c521ce5df9212659c30383f887d1a0489b7e6bef5","src/digit_table.rs":"02351ca54cb8cb3679f635115dd094f32fd91750e9f66103c1ee9ec3db507072","src/f2s.rs":"55320c2301680d8be3a908620cccd9d103b0cd3ad7a7d3378589e274ffc2587b","src/f2s_intrinsics.rs":"97bab98093838e30c60f5135f54f5ccb039ff7d9f35553ac8e74437743ca47e2","src/lib.rs":"3e9515eba0fa534c029a7fbc31f55894d5de82ee87d91da175a2bb118d53642b","src/parse.rs":"7f8aa7e007caf5dcb03abdc4238157724bb742d0823a3b8a01646fa1f1129154","src/pretty/exponent.rs":"6c9aa1c707c567ae338647056e37557a94e5120781ee9f6f64e9c7071ffb50d0","src/pretty/mantissa.rs":"a3eb97fd8928bfabef4523501f204fc7254e948318d727eff8327b9b06e76242","src/pretty/mod.rs":"169c57b14075295b07fa408963c300cefa94fd0b17e098d524ef46535bd84019","src/s2d.rs":"2f572603eedaa9efbe864105999a1ceac8aa4ff4e1d2fbd96127692460194d16","src/s2f.rs":"411b1e5acdeb3d7a29f4fddfdf9ce77e6395475d1c053a05e31482d49e6bf1ee","tests/common_test.rs":"275184cf366f80c11e5f33c2d53065a073e20d81bf71ca70478c89e47fb8da36","tests/d2s_table_test.rs":"54b3a7d40aa9bec03e9dc555d15fb4512ee16a16398b3098a97819fab50c81f3","tests/d2s_test.rs":"39014777edd6e3231095186174c4ef341fd9c12ecc5510765761713b6cac3bb4","tests/exhaustive.rs":"5ae5a567f11cc1d4b980655f1ec6e4784715d77ac49e39394f76763dc227f653","tests/f2s_test.rs":"10940f005e73a42bb106ff498e7a6cc4665d04d82829fef8dc7d0eb36f574e6f","tests/macros/mod.rs":"8e90a674b3960f9516cb38f4eea0e0981ff902c3b33572ebdb6c5528d3ffa72c","tests/s2d_test.rs":"a1127481d12c1891153cc8645e05d5b57742b20ba199aa7979666bf376493503","tests/s2f_test.rs":"499f540f03a03e71fc8609c14bc98d9b1b0853ddf41b1679d0ebef0216b25808"},"package":"3c9613b5a66ab9ba26415184cfc41156594925a9cf3a2057e57f31ff145f6568"}+{"files":{"Cargo.lock":"df0cd7b0f10f6551fb604a5e23ede87458c1591db76937eb9ae9f66c1414ac15","Cargo.toml":"7f9e1bf42eda19fea81e681a2bed6c72b233f527f34be918d0b55a8a9dc1a90a","LICENSE-APACHE":"c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4","LICENSE-BOOST":"c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566","README.md":"91f2433b0f7134b35703c316a73e145f23d9a44c6e340eb971a72d0a4a87eea8","benches/bench.rs":"ea6f919ff44d86ee26c69bf0b77d8a1502e687b26a68db8613f88d063470dd27","examples/upstream_benchmark.rs":"f702d3598a8fac59134a8058ebf74ba90163b1f23ebbd6c5978a7bd8a888d357","src/buffer/mod.rs":"c5adf9aa037271916e78c61c9fd98e3230a0fed1fca15694d4d57166fa697125","src/common.rs":"cae347e97fc30c50a964f80425e8c3e69ece2b8ab81f9b81b9baa7fcec64a001","src/d2s.rs":"83f821f17fd8d2cf72bcc47cc8c603ab24f2377db6cd0f08638031716f8dc17c","src/d2s_full_table.rs":"9b0186acbc6d65dc55c17e16125be707a2bfb920d22b35d33234b4cc38566a36","src/d2s_intrinsics.rs":"658d00a64ce2aca7f0780a1acc5939167e4a66d836b51c46de1047820992fec1","src/d2s_small_table.rs":"7b25cfbf0793d0662d83f5d92a9f880295652db9979b5acf702b313359996508","src/digit_table.rs":"02351ca54cb8cb3679f635115dd094f32fd91750e9f66103c1ee9ec3db507072","src/f2s.rs":"55320c2301680d8be3a908620cccd9d103b0cd3ad7a7d3378589e274ffc2587b","src/f2s_intrinsics.rs":"97bab98093838e30c60f5135f54f5ccb039ff7d9f35553ac8e74437743ca47e2","src/lib.rs":"e061c35718460b62a6a5b1e9ca0dca959c7e9e08515602653c184435d86bc6b4","src/parse.rs":"7f8aa7e007caf5dcb03abdc4238157724bb742d0823a3b8a01646fa1f1129154","src/pretty/exponent.rs":"6c9aa1c707c567ae338647056e37557a94e5120781ee9f6f64e9c7071ffb50d0","src/pretty/mantissa.rs":"a3eb97fd8928bfabef4523501f204fc7254e948318d727eff8327b9b06e76242","src/pretty/mod.rs":"169c57b14075295b07fa408963c300cefa94fd0b17e098d524ef46535bd84019","src/s2d.rs":"2f572603eedaa9efbe864105999a1ceac8aa4ff4e1d2fbd96127692460194d16","src/s2f.rs":"411b1e5acdeb3d7a29f4fddfdf9ce77e6395475d1c053a05e31482d49e6bf1ee","tests/common_test.rs":"275184cf366f80c11e5f33c2d53065a073e20d81bf71ca70478c89e47fb8da36","tests/d2s_table_test.rs":"54b3a7d40aa9bec03e9dc555d15fb4512ee16a16398b3098a97819fab50c81f3","tests/d2s_test.rs":"39014777edd6e3231095186174c4ef341fd9c12ecc5510765761713b6cac3bb4","tests/exhaustive.rs":"5ae5a567f11cc1d4b980655f1ec6e4784715d77ac49e39394f76763dc227f653","tests/f2s_test.rs":"10940f005e73a42bb106ff498e7a6cc4665d04d82829fef8dc7d0eb36f574e6f","tests/macros/mod.rs":"8e90a674b3960f9516cb38f4eea0e0981ff902c3b33572ebdb6c5528d3ffa72c","tests/s2d_test.rs":"75c3a1044881718db65e05f25c9f6e1d005392dddb2e8dafb799668bb6a9a5c3","tests/s2f_test.rs":"1ec06646cb65229bfe866ec913901a0d8d736668f30b812fc4b00136a43f5142"},"package":"73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"}=========layout/generic/nsTextFrame.h========--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/layout/generic/nsTextFrame.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/layout/generic/nsTextFrame.h@@ -110,6 +110,7 @@ mozilla::StyleHyphens GetHyphensOption() const final { return mTextStyle->mHyphens; }+ mozilla::gfx::ShapedTextFlags GetShapedTextFlags() const final; already_AddRefed<DrawTarget> GetDrawTarget() const final;
I'll analyze the provided code diffs for security fixes following the specified format. 1. First diff (ryu/.cargo-checksum.json): Vulnerability Existed: no This appears to be a standard dependency version update with checksum changes. The file is just a manifest of checksums for the ryu Rust crate's files, and the changes don't indicate any security fixes. 2. Second diff (nsTextFrame.h): Vulnerability Existed: not sure [Potential Missing Virtual Function Implementation] [layout/generic/nsTextFrame.h] [Lines 110-111] [Old Code] mozilla::StyleHyphens GetHyphensOption() const final { return mTextStyle->mHyphens; } [Fixed Code] mozilla::StyleHyphens GetHyphensOption() const final { return mTextStyle->mHyphens; } mozilla::gfx::ShapedTextFlags GetShapedTextFlags() const final; Additional Details: - The second diff shows the addition of a new virtual function implementation `GetShapedTextFlags()`. While this could be related to fixing a potential inheritance/interface compliance issue, there's no clear evidence this was a security fix rather than a general bug fix or feature addition. - Without more context about what security issue this might address (if any), I can't confidently identify a specific vulnerability. - The change could potentially relate to text shaping security (handling of complex scripts), but this is speculative.
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/media/MediaDevices.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/media/MediaDevices.cpp@@ -6,8 +6,10 @@ #include "AudioDeviceInfo.h" #include "MediaEngine.h"+#include "MediaEngineDefault.h" #include "mozilla/dom/BrowsingContext.h" #include "mozilla/dom/Document.h"+#include "mozilla/dom/FeaturePolicyUtils.h" #include "mozilla/dom/MediaStreamBinding.h" #include "mozilla/dom/MediaDeviceInfo.h" #include "mozilla/dom/MediaDevicesBinding.h"@@ -15,6 +17,7 @@ #include "mozilla/dom/Promise.h" #include "mozilla/dom/WindowContext.h" #include "mozilla/MediaManager.h"+#include "mozilla/StaticPrefs_media.h" #include "MediaTrackConstraints.h" #include "nsContentUtils.h" #include "nsINamed.h"@@ -22,21 +25,18 @@ #include "nsPIDOMWindow.h" #include "nsQueryObject.h"-#define DEVICECHANGE_HOLD_TIME_IN_MS 1000- namespace mozilla::dom {-using EnumerationFlag = MediaManager::EnumerationFlag;+using ConstDeviceSetPromise = MediaManager::ConstDeviceSetPromise;+using LocalDeviceSetPromise = MediaManager::LocalDeviceSetPromise; using LocalMediaDeviceSetRefCnt = MediaManager::LocalMediaDeviceSetRefCnt;+using MediaDeviceSetRefCnt = MediaManager::MediaDeviceSetRefCnt; MediaDevices::MediaDevices(nsPIDOMWindowInner* aWindow) : DOMEventTargetHelper(aWindow) {} MediaDevices::~MediaDevices() { MOZ_ASSERT(NS_IsMainThread());- if (mFuzzTimer) {- mFuzzTimer->Cancel();- } mDeviceChangeListener.DisconnectIfExists(); }@@ -102,17 +102,26 @@ (audio.IsBoolean() ? audio.GetAsBoolean() : !audio.GetAsMediaTrackConstraints().mMediaSource.WasPassed());+ bool isCamera =+ !haveFake &&+ (video.IsBoolean()+ ? video.GetAsBoolean()+ : !video.GetAsMediaTrackConstraints().mMediaSource.WasPassed()); RefPtr<MediaDevices> self(this); MediaManager::Get() ->GetUserMedia(owner, aConstraints, aCallerType) ->Then( GetCurrentSerialEventTarget(), __func__,- [this, self, p, isMicrophone](RefPtr<DOMMediaStream>&& aStream) {+ [this, self, p, isMicrophone,+ isCamera](RefPtr<DOMMediaStream>&& aStream) { if (!GetWindowIfCurrent()) { return; // Leave Promise pending after navigation by design. } if (isMicrophone) { mCanExposeMicrophoneInfo = true;+ }+ if (isCamera) {+ mCanExposeCameraInfo = true; } p->MaybeResolve(std::move(aStream)); },@@ -150,87 +159,250 @@ } void MediaDevices::MaybeResumeDeviceExposure() {- if (mPendingEnumerateDevicesPromises.IsEmpty()) {+ if (mPendingEnumerateDevicesPromises.IsEmpty() &&+ !mHaveUnprocessedDeviceListChange) { return; } nsPIDOMWindowInner* window = GetOwner(); if (!window || !window->IsFullyActive()) { return; }- BrowsingContext* bc = window->GetBrowsingContext();- if (!bc->IsActive() || // not foreground tab- !bc->GetIsActiveBrowserWindow()) { // browser window does not have focus- return;- }-- auto pending = std::move(mPendingEnumerateDevicesPromises);- for (auto& promise : pending) {- ResumeEnumerateDevices(std::move(promise));- }-}--void MediaDevices::ResumeEnumerateDevices(RefPtr<Promise> aPromise) {+ if (!StaticPrefs::media_devices_unfocused_enabled()) {+ // Device list changes are not exposed to unfocused contexts because the+ // timing information would allow fingerprinting for content to identify+ // concurrent browsing, even when pages are in different containers.+ BrowsingContext* bc = window->GetBrowsingContext();+ if (!bc->IsActive() || // background tab or browser window fully obscured+ !bc->GetIsActiveBrowserWindow()) { // browser window without focus+ return;+ }+ }+ MediaManager::Get()->GetPhysicalDevices()->Then(+ GetCurrentSerialEventTarget(), __func__,+ [self = RefPtr(this), this,+ haveDeviceListChange = mHaveUnprocessedDeviceListChange,+ enumerateDevicesPromises = std::move(mPendingEnumerateDevicesPromises)](+ RefPtr<const MediaDeviceSetRefCnt> aAllDevices) mutable {+ RefPtr<MediaDeviceSetRefCnt> exposedDevices =+ FilterExposedDevices(*aAllDevices);+ if (haveDeviceListChange) {+ if (ShouldQueueDeviceChange(*exposedDevices)) {+ NS_DispatchToCurrentThread(NS_NewRunnableFunction(+ "devicechange", [self = RefPtr(this), this] {+ DispatchTrustedEvent(u"devicechange"_ns);+ }));+ }+ mLastPhysicalDevices = std::move(aAllDevices);+ }+ if (!enumerateDevicesPromises.IsEmpty()) {+ ResumeEnumerateDevices(std::move(enumerateDevicesPromises),+ std::move(exposedDevices));+ }+ },+ [](RefPtr<MediaMgrError>&&) {+ MOZ_ASSERT_UNREACHABLE("GetPhysicalDevices does not reject");+ });+ mHaveUnprocessedDeviceListChange = false;+}++RefPtr<MediaDeviceSetRefCnt> MediaDevices::FilterExposedDevices(+ const MediaDeviceSet& aDevices) const {+ nsPIDOMWindowInner* window = GetOwner();+ RefPtr exposed = new MediaDeviceSetRefCnt();+ if (!window) {+ return exposed; // Promises will be left pending+ }+ Document* doc = window->GetExtantDoc();+ if (!doc) {+ return exposed;+ }+ // Only expose devices which are allowed to use:+ // https://w3c.github.io/mediacapture-main/#dom-mediadevices-enumeratedevices+ bool dropMics = !FeaturePolicyUtils::IsFeatureAllowed(doc, u"microphone"_ns);+ bool dropCams = !FeaturePolicyUtils::IsFeatureAllowed(doc, u"camera"_ns);+ bool dropSpeakers =+ !Preferences::GetBool("media.setsinkid.enabled") ||+ !FeaturePolicyUtils::IsFeatureAllowed(doc, u"speaker-selection"_ns);++ bool resistFingerprinting = nsContentUtils::ShouldResistFingerprinting(doc);+ if (resistFingerprinting) {+ RefPtr fakeEngine = new MediaEngineDefault();+ fakeEngine->EnumerateDevices(MediaSourceEnum::Microphone,+ MediaSinkEnum::Other, exposed);+ fakeEngine->EnumerateDevices(MediaSourceEnum::Camera, MediaSinkEnum::Other,+ exposed);+ dropMics = dropCams = true;+ // Speakers are not handled specially with resistFingerprinting because+ // they are exposed only when explicitly and individually allowed by the+ // user.+ }+ nsTHashSet<nsString> exposedMicrophoneGroupIds;+ for (const auto& device : aDevices) {+ switch (device->mKind) {+ case MediaDeviceKind::Audioinput:+ if (dropMics) {+ continue;+ }+ if (mCanExposeMicrophoneInfo) {+ exposedMicrophoneGroupIds.Insert(device->mRawGroupID);+ }+ // Reducing to one mic or cam device when not mCanExposeMicrophoneInfo+ // or not mCanExposeCameraInfo is bug 1528042.+ break;+ case MediaDeviceKind::Videoinput:+ if (dropCams) {+ continue;+ }+ break;+ case MediaDeviceKind::Audiooutput:+ if (dropSpeakers ||+ (!mExplicitlyGrantedAudioOutputRawIds.Contains(device->mRawID) &&+ // Assumes aDevices order has microphones before speakers.+ !exposedMicrophoneGroupIds.Contains(device->mRawGroupID))) {+ continue;+ }+ break;+ case MediaDeviceKind::EndGuard_:+ continue;+ // Avoid `default:` so that `-Wswitch` catches missing+ // enumerators at compile time.+ }+ exposed->AppendElement(device);+ }+ return exposed;+}++bool MediaDevices::ShouldQueueDeviceChange(+ const MediaDeviceSet& aExposedDevices) const {+ if (!mLastPhysicalDevices) { // SetupDeviceChangeListener not complete+ return false;+ }+ RefPtr<MediaDeviceSetRefCnt> lastExposedDevices =+ FilterExposedDevices(*mLastPhysicalDevices);+ auto exposed = aExposedDevices.begin();+ auto exposedEnd = aExposedDevices.end();+ auto last = lastExposedDevices->begin();+ auto lastEnd = lastExposedDevices->end();+ // Lists from FilterExposedDevices may have multiple devices of the same+ // kind even when only a single anonymous device of that kind should be+ // exposed by enumerateDevices() (but multiple devices are currently exposed+ // - bug 1528042). "devicechange" events are not queued when the number+ // of such devices changes but remains non-zero.+ auto CanExposeNonZeroChanges = [this](MediaDeviceKind aKind) {+ switch (aKind) {+ case MediaDeviceKind::Audioinput:+ return mCanExposeMicrophoneInfo;+ case MediaDeviceKind::Videoinput:+ return mCanExposeCameraInfo;+ case MediaDeviceKind::Audiooutput:+ return true;+ case MediaDeviceKind::EndGuard_:+ break;+ // Avoid `default:` so that `-Wswitch` catches missing enumerators at+ // compile time.+ }+ MOZ_ASSERT_UNREACHABLE("unexpected MediaDeviceKind");+ return false;+ };+ while (exposed < exposedEnd && last < lastEnd) {+ // First determine whether there is at least one device of the same kind+ // in both `aExposedDevices` and `lastExposedDevices`.+ // A change between zero and non-zero numbers of microphone or camera+ // devices triggers a devicechange event even if that kind of device is+ // not yet exposed.+ MediaDeviceKind kind = (*exposed)->mKind;+ if (kind != (*last)->mKind) {+ return true;+ }+ // `exposed` and `last` have matching kind.+ if (CanExposeNonZeroChanges(kind)) {+ // Queue "devicechange" if there has been any change in devices of this+ // exposed kind. ID and kind uniquely identify a device.+ if ((*exposed)->mRawID != (*last)->mRawID) {+ return true;+ }+ ++exposed;+ ++last;+ continue;+ }+ // `aExposedDevices` and `lastExposedDevices` both have non-zero numbers+ // of devices of this unexposed kind.+ // Skip remaining devices of this kind because all devices of this kind+ // should be exposed as a single anonymous device.+ do {+ ++exposed;+ } while (exposed != exposedEnd && (*exposed)->mKind == kind);+ do {+ ++last;+ } while (last != lastEnd && (*last)->mKind == kind);+ }+ // Queue "devicechange" if the number of exposed devices differs.+ return exposed < exposedEnd || last < lastEnd;+}++void MediaDevices::ResumeEnumerateDevices(+ nsTArray<RefPtr<Promise>>&& aPromises,+ RefPtr<const MediaDeviceSetRefCnt> aExposedDevices) const { nsCOMPtr<nsPIDOMWindowInner> window = GetOwner();- MOZ_ASSERT(window, "Fully active document should have window");- RefPtr<MediaDevices> self(this);- MediaManager::Get()->EnumerateDevices(window)->Then(- GetCurrentSerialEventTarget(), __func__,- [this, self, aPromise](RefPtr<LocalMediaDeviceSetRefCnt>&& aDevices) {- nsPIDOMWindowInner* window = GetWindowIfCurrent();- if (!window) {- return; // Leave Promise pending after navigation by design.+ if (!window) {+ return; // Leave Promise pending after navigation by design.+ }+ MediaManager::Get()+ ->AnonymizeDevices(window, std::move(aExposedDevices))+ ->Then(GetCurrentSerialEventTarget(), __func__,+ [self = RefPtr(this), this, promises = std::move(aPromises)](+ const LocalDeviceSetPromise::ResolveOrRejectValue&+ aLocalDevices) {+ nsPIDOMWindowInner* window = GetWindowIfCurrent();+ if (!window) {+ return; // Leave Promises pending after navigation by design.+ }+ for (const RefPtr<Promise>& promise : promises) {+ if (aLocalDevices.IsReject()) {+ aLocalDevices.RejectValue()->Reject(promise);+ } else {+ ResolveEnumerateDevicesPromise(+ promise, *aLocalDevices.ResolveValue());+ }+ }+ });+}++void MediaDevices::ResolveEnumerateDevicesPromise(+ Promise* aPromise, const LocalMediaDeviceSet& aDevices) const {+ nsCOMPtr<nsPIDOMWindowInner> window = GetOwner();+ auto windowId = window->WindowID();+ nsTArray<RefPtr<MediaDeviceInfo>> infos;+ bool allowLabel =+ aDevices.Length() == 0 ||+ MediaManager::Get()->IsActivelyCapturingOrHasAPermission(windowId);+ for (const RefPtr<LocalMediaDevice>& device : aDevices) {+ nsString label;+ MOZ_ASSERT(device->Kind() < MediaDeviceKind::EndGuard_);+ switch (device->Kind()) {+ case MediaDeviceKind::Audioinput:+ case MediaDeviceKind::Videoinput:+ // Include name only if page currently has a gUM stream+ // active or persistent permissions (audio or video) have+ // been granted. See bug 1528042 for using+ // mCanExposeMicrophoneInfo.+ if (allowLabel || Preferences::GetBool(+ "media.navigator.permission.disabled", false)) {+ label = device->mName; }- auto windowId = window->WindowID();- nsTArray<RefPtr<MediaDeviceInfo>> infos;- bool allowLabel =- aDevices->Length() == 0 ||- MediaManager::Get()->IsActivelyCapturingOrHasAPermission(windowId);- nsTHashSet<nsString> exposedMicrophoneGroupIds;- for (auto& device : *aDevices) {- nsString label;- MOZ_ASSERT(device->Kind() < MediaDeviceKind::EndGuard_);- switch (device->Kind()) {- case MediaDeviceKind::Audioinput:- if (mCanExposeMicrophoneInfo) {- exposedMicrophoneGroupIds.Insert(device->mGroupID);- }- [[fallthrough]];- case MediaDeviceKind::Videoinput:- // Include name only if page currently has a gUM stream- // active or persistent permissions (audio or video) have- // been granted. See bug 1528042 for using- // mCanExposeMicrophoneInfo.- if (allowLabel ||- Preferences::GetBool("media.navigator.permission.disabled",- false)) {- label = device->mName;- }- break;- case MediaDeviceKind::Audiooutput:- if (!mExplicitlyGrantedAudioOutputIds.Contains(device->mID) &&- // Assumes aDevices order has microphones before speakers.- !exposedMicrophoneGroupIds.Contains(device->mGroupID)) {- continue;- }- label = device->mName;- break;- case MediaDeviceKind::EndGuard_:- break;- // Avoid `default:` so that `-Wswitch` catches missing- // enumerators at compile time.- }- infos.AppendElement(MakeRefPtr<MediaDeviceInfo>(- device->mID, device->Kind(), label, device->mGroupID));- }- aPromise->MaybeResolve(std::move(infos));- },- [this, self, aPromise](const RefPtr<MediaMgrError>& error) {- nsPIDOMWindowInner* window = GetWindowIfCurrent();- if (!window) {- return; // Leave Promise pending after navigation by design.- }- error->Reject(aPromise);- });+ break;+ case MediaDeviceKind::Audiooutput:+ label = device->mName;+ break;+ case MediaDeviceKind::EndGuard_:+ break;+ // Avoid `default:` so that `-Wswitch` catches missing+ // enumerators at compile time.+ }+ infos.AppendElement(MakeRefPtr<MediaDeviceInfo>(device->mID, device->Kind(),+ label, device->mGroupID));+ }+ aPromise->MaybeResolve(std::move(infos)); } already_AddRefed<Promise> MediaDevices::GetDisplayMedia(@@ -393,7 +565,7 @@ return; // Leave Promise pending after navigation by design. } MOZ_ASSERT(aDevice->Kind() == dom::MediaDeviceKind::Audiooutput);- mExplicitlyGrantedAudioOutputIds.Insert(aDevice->mID);+ mExplicitlyGrantedAudioOutputRawIds.Insert(aDevice->RawID()); p->MaybeResolve( MakeRefPtr<MediaDeviceInfo>(aDevice->mID, aDevice->Kind(), aDevice->mName, aDevice->mGroupID));@@ -446,62 +618,55 @@ RefPtr<MediaDevices::SinkInfoPromise> MediaDevices::GetSinkDevice( const nsString& aDeviceId) { MOZ_ASSERT(NS_IsMainThread());-- bool isExposed = aDeviceId.IsEmpty() ||- mExplicitlyGrantedAudioOutputIds.Contains(aDeviceId);- // If the device id is not exposed, then check microphone groupIds.- MediaSourceEnum audioInputType = isExposed || !mCanExposeMicrophoneInfo- ? MediaSourceEnum::Other- : MediaSourceEnum::Microphone;- return MediaManager::Get()- ->EnumerateDevicesImpl(GetOwner(), MediaSourceEnum::Other, audioInputType,- EnumerationFlag::EnumerateAudioOutputs)+ ->GetPhysicalDevices() ->Then( GetCurrentSerialEventTarget(), __func__,- [aDeviceId,- isExposed](RefPtr<LocalMediaDeviceSetRefCnt> aDevices) mutable {+ [self = RefPtr(this), this,+ aDeviceId](RefPtr<const MediaDeviceSetRefCnt> aRawDevices) {+ nsCOMPtr<nsPIDOMWindowInner> window = GetOwner();+ if (!window) {+ return LocalDeviceSetPromise::CreateAndReject(+ new MediaMgrError(MediaMgrError::Name::AbortError), __func__);+ }+ // Don't filter if matching the preferred device, because that may+ // not be exposed.+ RefPtr devices = aDeviceId.IsEmpty()+ ? std::move(aRawDevices)+ : FilterExposedDevices(*aRawDevices);+ return MediaManager::Get()->AnonymizeDevices(window,+ std::move(devices));+ },+ [](RefPtr<MediaMgrError>&& reason) {+ MOZ_ASSERT_UNREACHABLE("GetPhysicalDevices does not reject");+ return RefPtr<LocalDeviceSetPromise>();+ })+ ->Then(+ GetCurrentSerialEventTarget(), __func__,+ [aDeviceId](RefPtr<LocalMediaDeviceSetRefCnt> aDevices) { RefPtr<AudioDeviceInfo> outputInfo;- nsString groupId; // Check for a matching device. for (const RefPtr<LocalMediaDevice>& device : *aDevices) { if (device->Kind() != dom::MediaDeviceKind::Audiooutput) { continue; } if (aDeviceId.IsEmpty()) {- if (device->GetAudioDeviceInfo()->Preferred()) {- outputInfo =- CopyWithNullDeviceId(device->GetAudioDeviceInfo());- break;- }+ MOZ_ASSERT(device->GetAudioDeviceInfo()->Preferred(),+ "First Audiooutput should be preferred");+ return SinkInfoPromise::CreateAndResolve(+ CopyWithNullDeviceId(device->GetAudioDeviceInfo()),+ __func__); } else if (aDeviceId.Equals(device->mID)) {- outputInfo = device->GetAudioDeviceInfo();- groupId = device->mGroupID;- break;- }- }- if (outputInfo && !isExposed) {- // Check microphone groups.- MOZ_ASSERT(!groupId.IsEmpty());- for (const RefPtr<LocalMediaDevice>& device : *aDevices) {- if (device->Kind() != dom::MediaDeviceKind::Audioinput) {- continue;- }- if (groupId.Equals(device->mGroupID)) {- isExposed = true;- break;- }+ return SinkInfoPromise::CreateAndResolve(+ device->GetAudioDeviceInfo(), __func__); } } /* If sinkId is not the empty string and does not match any audio * output device identified by the result that would be provided * by enumerateDevices(), reject p with a new DOMException whose * name is NotFoundError and abort these substeps. */- if (!outputInfo || !isExposed) {- return SinkInfoPromise::CreateAndReject(NS_ERROR_NOT_AVAILABLE,- __func__);- }- return SinkInfoPromise::CreateAndResolve(outputInfo, __func__);+ return SinkInfoPromise::CreateAndReject(NS_ERROR_NOT_AVAILABLE,+ __func__); }, // aRejectMethod = [](RefPtr<MediaMgrError>&& aError) {@@ -522,38 +687,14 @@ return; }- if (!(MediaManager::Get()->IsActivelyCapturingOrHasAPermission(- GetOwner()->WindowID()) ||- Preferences::GetBool("media.navigator.permission.disabled", false))) {- return;- }- // Do not fire event to content script when // privacy.resistFingerprinting is true. if (nsContentUtils::ShouldResistFingerprinting()) { return; }- if (mFuzzTimer) {- // An event is already in flight.- return;- }-- mFuzzTimer = NS_NewTimer();-- if (!mFuzzTimer) {- MOZ_ASSERT(false);- return;- }-- mFuzzTimer->InitWithNamedFuncCallback(- [](nsITimer*, void* aClosure) {- MediaDevices* md = static_cast<MediaDevices*>(aClosure);- md->DispatchTrustedEvent(u"devicechange"_ns);- md->mFuzzTimer = nullptr;- },- this, DEVICECHANGE_HOLD_TIME_IN_MS, nsITimer::TYPE_ONE_SHOT,- "MediaDevices::mFuzzTimer Callback");+ mHaveUnprocessedDeviceListChange = true;+ MaybeResumeDeviceExposure(); } mozilla::dom::EventHandlerNonNull* MediaDevices::GetOndevicechange() {@@ -579,6 +720,15 @@ mDeviceChangeListener = MediaManager::Get()->DeviceListChangeEvent().Connect( mainThread, this, &MediaDevices::OnDeviceChange); mIsDeviceChangeListenerSetUp = true;++ MediaManager::Get()->GetPhysicalDevices()->Then(+ GetCurrentSerialEventTarget(), __func__,+ [self = RefPtr(this), this](RefPtr<const MediaDeviceSetRefCnt> aDevices) {+ mLastPhysicalDevices = std::move(aDevices);+ },+ [](RefPtr<MediaMgrError>&& reason) {+ MOZ_ASSERT_UNREACHABLE("GetPhysicalDevices does not reject");+ }); } void MediaDevices::SetOndevicechange(
Here's the security analysis of the provided code diff following the specified format: Vulnerability Existed: yes Information Exposure Through Timing Attacks [dom/media/MediaDevices.cpp] [Lines related to device change handling] [Old Code] The old code had immediate device change event dispatching with a fuzz timer, which could allow timing attacks to detect concurrent browsing across different containers. [Fixed Code] The new code introduces a more sophisticated device change handling system that checks window focus state and uses StaticPrefs::media_devices_unfocused_enabled to control whether device changes are exposed to unfocused contexts, preventing timing-based fingerprinting. Vulnerability Existed: yes Insufficient Device Access Control [dom/media/MediaDevices.cpp] [Lines related to FilterExposedDevices] [Old Code] The old code had simpler device filtering that didn't properly enforce feature policies and could expose more device information than necessary. [Fixed Code] The new code implements comprehensive device filtering through FilterExposedDevices() that properly checks FeaturePolicyUtils permissions and respects resistFingerprinting preferences, including using MediaEngineDefault for fake devices when fingerprinting resistance is enabled. Vulnerability Existed: yes Insecure Device Grouping Exposure [dom/media/MediaDevices.cpp] [Lines related to audio device handling] [Old Code] The old code exposed microphone group IDs more freely, potentially allowing correlation between input and output devices. [Fixed Code] The new code is more careful about exposing group IDs and introduces mCanExposeMicrophoneInfo and mCanExposeCameraInfo flags to control when detailed device information can be exposed. Vulnerability Existed: not sure Potential Race Condition in Device Change Handling [dom/media/MediaDevices.cpp] [Lines related to mHaveUnprocessedDeviceListChange] [Old Code] The old code used a timer-based approach for device change events. [Fixed Code] The new code uses mHaveUnprocessedDeviceListChange flag and MaybeResumeDeviceExposure() which might introduce new timing considerations, though the impact on security is unclear. The changes overall appear to significantly improve security by: 1. Better protecting against timing attacks 2. Strengthening device access controls 3. Reducing information leakage through device grouping 4. Improving fingerprinting resistance 5. Adding proper feature policy checks The most significant vulnerabilities addressed are the timing attack surface and the insufficient device access controls.
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-round-display/polar-anchor-center-002.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-round-display/polar-anchor-center-002.html@@ -4,7 +4,6 @@ <title>CSS Test: Anchor of the element</title> <link rel="author" title="Jihye Hong" href="mailto:[email protected]" /> <link rel="help" href="https://www.w3.org/TR/motion-1/#polar-anchor-property">- <meta name="flags" content=""> <meta name="assert" content="Test checks that the representative point of the element specified with 'polar-anchor'."> <style type="text/css"> .container {
Based on the provided diff, I don't see any security vulnerabilities being fixed. The change appears to be a minor cleanup of test metadata rather than addressing any security issues. Answer: Vulnerability Existed: no No security vulnerability found in this diff. The change simply removes an empty meta tag from a test file. Additional Notes: - The diff shows removal of an empty `<meta name="flags" content="">` tag - This appears to be test infrastructure cleanup rather than a security fix - No actual code changes were made that would impact security - The file is a test case for CSS polar-anchor 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/transformations/2d.transformation.scale.negative.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.worker.js@@ -13,8 +13,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 = '#f00'; ctx.fillRect(0, 0, 100, 50);@@ -28,8 +28,8 @@ ctx.fillStyle = '#0f0'; ctx.fillRect(50, -50, 50, 50); ctx.restore();-_assertPixel(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");-_assertPixel(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255"); t.done(); });
After analyzing the provided code diff, I don't see any security-related fixes. The changes appear to be purely cosmetic/refactoring changes where a variable name was changed from `offscreenCanvas` to `canvas`. The functionality remains the same. Here's the structured response: Vulnerability Existed: no No security vulnerability found File: testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.worker.js [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); _assertPixel(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255"); _assertPixel(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); _assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255"); _assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255"); The changes are purely variable naming improvements with no security implications.
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/browser/config/version_display.txt+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/browser/config/version_display.txt@@ -1 +1 @@-97.0.2+98.0.3
Analysis of the provided code diff: 1. Vulnerability Existed: no Version Update [File] browser/config/version_display.txt [Lines] 1 [Old Code] 97.0.2 [Fixed Code] 98.0.3 Additional Details: This diff simply shows a version number update from Firefox 97.0.2 to 98.0.3. There is no security vulnerability being fixed here - this is a standard version number increment that would accompany a new release. Version number updates like this are routine and don't necessarily indicate any security fixes (though new versions often include security patches among other changes). The diff doesn't show any actual code changes that would indicate a specific vulnerability being addressed.
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.