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/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.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.invalid.hsl-5.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 = '#0f0'; try { ctx.fillStyle = 'hsl(0, 100.%, 50%)'; } 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 purely cosmetic/refactoring changes where a variable name was changed from `offscreenCanvas` to `canvas` for consistency or readability. The actual functionality remains the same. Here's the analysis following your format: Vulnerability Existed: no [No security vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.worker.js] [Lines 13-14, 20] [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 are purely variable name changes with no security implications. The test behavior remains identical.
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/base/content/browser-sync.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/browser/base/content/browser-sync.js@@ -419,7 +419,7 @@ targets.push(d); } }- return targets.sort((a, b) => a.name.localeCompare(b.name));+ return targets.sort((a, b) => b.lastAccessTime - a.lastAccessTime); }, _definePrefGetters() {
Analysis of the provided code diff: 1. Vulnerability Existed: not sure [Potential Timing Attack or Information Disclosure] [browser/base/content/browser-sync.js] [Lines 419] [Old Code: return targets.sort((a, b) => a.name.localeCompare(b.name));] [Fixed Code: return targets.sort((a, b) => b.lastAccessTime - a.lastAccessTime);] Additional Details: - The change modifies the sorting mechanism from alphabetical (by name) to chronological (by lastAccessTime) - While not clearly a security fix, changing from string comparison to numeric comparison could potentially address: * Timing attacks if localeCompare() had timing variations * Information disclosure if name sorting revealed sensitive patterns - However, without more context about the data being sorted, this is uncertain - The change might simply be a functional improvement 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/js/src/jsapi-tests/testGCWeakCache.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/js/src/jsapi-tests/testGCWeakCache.cpp@@ -249,7 +249,7 @@ CHECK(IsIncrementalGCInProgress(cx)); PrepareForIncrementalGC(cx);- IncrementalGCSlice(cx, JS::GCReason::API);+ IncrementalGCSlice(cx, JS::GCReason::API, SliceBudget::unlimited()); JS::Zone* zone = JS::GetObjectZone(global); CHECK(!IsIncrementalGCInProgress(cx));
Analyzing the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential Memory Management Issue] [js/src/jsapi-tests/testGCWeakCache.cpp] [Lines 249] [Old Code] IncrementalGCSlice(cx, JS::GCReason::API); [Fixed Code] IncrementalGCSlice(cx, JS::GCReason::API, SliceBudget::unlimited()); Additional Details: - The change adds a SliceBudget parameter to the IncrementalGCSlice call, specifying unlimited budget - This appears to be a change in garbage collection behavior, but it's unclear if this was fixing a specific security vulnerability - The modification might relate to memory management or garbage collection timing, but without more context about the impact, we can't be certain if this was fixing a security issue - The test file context suggests this is related to weak cache garbage collection testing
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-media-capture/META.yml+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html-media-capture/META.yml@@ -1,3 +1,3 @@ spec: https://w3c.github.io/html-media-capture/ suggested_reviewers:- - zqzhang+ - anssiko
Analysis of the provided code diff: 1. Vulnerability Existed: no No specific vulnerability [File] testing/web-platform/tests/html-media-capture/META.yml [Lines] 1-3 [Old Code] ``` suggested_reviewers: - zqzhang ``` [Fixed Code] ``` suggested_reviewers: - anssiko ``` Additional Details: This change only updates a suggested reviewer in a test file's metadata. There is no security implication or vulnerability being fixed here. The modification is purely administrative/organizational. The diff shows only a change in the suggested reviewer for the test file, which doesn't relate to any security fixes or vulnerabilities. This appears to be a routine maintenance update rather than a security patch.
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/actions/pause/mapScopes.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/client/debugger/src/actions/pause/mapScopes.js@@ -17,7 +17,7 @@ import assert from "../../utils/assert"; import { log } from "../../utils/log";-import { isGenerated, isOriginal } from "../../utils/source";+import { isGenerated } from "../../utils/source"; import { buildMappedScopes } from "../../utils/pause/mapScopes"; import { isFulfilled } from "../../utils/async-value";@@ -148,7 +148,7 @@ } await dispatch(loadSourceText({ cx, source }));- if (isOriginal(source)) {+ if (source.isOriginal) { await dispatch(loadSourceText({ cx, source: generatedSource })); }
I'll analyze the provided code diff for security fixes following the specified format. Vulnerability Existed: not sure [Potential Information Leak] [devtools/client/debugger/src/actions/pause/mapScopes.js] [Lines 17, 148] [Old Code] import { isGenerated, isOriginal } from "../../utils/source"; ... if (isOriginal(source)) { [Fixed Code] import { isGenerated } from "../../utils/source"; ... if (source.isOriginal) { Additional Details: 1. The diff shows removal of the `isOriginal` import and replacement with `source.isOriginal` property check. 2. While this doesn't appear to be a direct security vulnerability fix, it could potentially relate to: - More accurate source type checking - Preventing possible incorrect scope mapping - Ensuring proper source text loading behavior 3. Without more context about the `source` object and its properties, it's hard to determine if this was fixing a specific security issue or just a code improvement. Note: There isn't enough context to identify a specific CVE or vulnerability name, but the change appears to be related to source mapping functionality which could have security implications in the debugger context.
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/docs/contributor/tests/debugging-intermittents.md+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/docs/contributor/tests/debugging-intermittents.md@@ -36,7 +36,7 @@ Sometimes reproducing the failure can only be done in automation, but it's worth trying locally, because this makes it much simpler to debug.-First, try running the test in isolation. You can use the `--repeat` and `--run-until-failure` flags to `mach mochitest` to automate this a bit. It's nice to do this sort of thing in headless mode (`--headless`) or in a VM (or using Xnest on Linux) to avoid locking up your machine. Mozilla provides an [easy-to-use VM](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Using_the_VM).+First, try running the test in isolation. You can use the `--repeat` and `--run-until-failure` flags to `mach mochitest` to automate this a bit. It's nice to do this sort of thing in headless mode (`--headless`) or in a VM (or using Xnest on Linux) to avoid locking up your machine. Sometimes, though, a test will only fail if it is run in conjunction with one or more other tests. You can use the `--start-at` and `--end-at` flags with `mach mochitest` to run a group of tests together.
After analyzing the provided code diff, I can see that this is a documentation change rather than a code change. The modification removes a reference to a Mozilla VM resource. Here's my analysis: Vulnerability Existed: no No security vulnerability found [File] devtools/docs/contributor/tests/debugging-intermittents.md [Lines 36] [Old Code] First, try running the test in isolation. You can use the `--repeat` and `--run-until-failure` flags to `mach mochitest` to automate this a bit. It's nice to do this sort of thing in headless mode (`--headless`) or in a VM (or using Xnest on Linux) to avoid locking up your machine. Mozilla provides an [easy-to-use VM](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Using_the_VM). [Fixed Code] First, try running the test in isolation. You can use the `--repeat` and `--run-until-failure` flags to `mach mochitest` to automate this a bit. It's nice to do this sort of thing in headless mode (`--headless`) or in a VM (or using Xnest on Linux) to avoid locking up your machine. This change appears to be purely documentation-related, removing a reference to an external resource (the Mozilla VM documentation). There are no security vulnerabilities being fixed here - it's simply a documentation update that removes a link. The change doesn't affect any actual code execution or 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/toolkit/components/prompts/content/selectDialog.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/toolkit/components/prompts/content/selectDialog.js@@ -61,7 +61,7 @@ try { if (!args.openedWithTabDialog) { Cc["@mozilla.org/sound;1"]- .createInstance(Ci.nsISound)+ .getService(Ci.nsISound) .playEventSound(Ci.nsISound.EVENT_SELECT_DIALOG_OPEN); } } catch (e) {}
Here's the analysis following the requested format: Vulnerability Existed: not sure [Potential Improper Error Handling] [selectDialog.js] [Lines 61-65] [Old Code] try { if (!args.openedWithTabDialog) { Cc["@mozilla.org/sound;1"] .createInstance(Ci.nsISound) .playEventSound(Ci.nsISound.EVENT_SELECT_DIALOG_OPEN); } } catch (e) {} [Fixed Code] try { if (!args.openedWithTabDialog) { Cc["@mozilla.org/sound;1"] .getService(Ci.nsISound) .playEventSound(Ci.nsISound.EVENT_SELECT_DIALOG_OPEN); } } catch (e) {} Additional Details: 1. The main change is from `createInstance` to `getService` for the sound component, which is likely a performance optimization rather than a security fix. 2. There's a typo fix in `openedWithTabDialog` (was `openedWithTabDialog`), but this appears to be a bug fix rather than a security vulnerability. 3. The empty catch block remains, which could potentially hide important errors, but this isn't a new vulnerability. 4. No clear security vulnerability is being fixed in this diff. The changes appear to be code improvements rather than security patches.
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/xpcom/tests/gtest/TestStrings.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/xpcom/tests/gtest/TestStrings.cpp@@ -2050,6 +2050,23 @@ } }+template <typename T>+void InsertSpanHelper() {+ T str1, str2;+ str1.AssignLiteral("hello world");+ str2.AssignLiteral("span ");++ T expect;+ expect.AssignLiteral("hello span world");++ Span span(str2);+ str1.Insert(span, 6);+ EXPECT_TRUE(str1.Equals(expect));+}++TEST_F(Strings, InsertSpan) { InsertSpanHelper<nsCString>(); }+TEST_F(Strings, InsertSpanW) { InsertSpanHelper<nsString>(); }+ TEST_F(Strings, TokenizedRangeEmpty) { // 8-bit strings {
Analyzing the provided code diff, I don't see any security fixes - it appears to be adding new test functionality rather than fixing vulnerabilities. Here's my analysis: Vulnerability Existed: no No security vulnerability found [File] xpcom/tests/gtest/TestStrings.cpp [Lines] 2050-2067 [Old Code] (No code existed in this location) [Fixed Code] template <typename T> void InsertSpanHelper() { T str1, str2; str1.AssignLiteral("hello world"); str2.AssignLiteral("span "); T expect; expect.AssignLiteral("hello span world"); Span span(str2); str1.Insert(span, 6); EXPECT_TRUE(str1.Equals(expect)); } TEST_F(Strings, InsertSpan) { InsertSpanHelper<nsCString>(); } TEST_F(Strings, InsertSpanW) { InsertSpanHelper<nsString>(); } The changes simply add new test cases for string span insertion functionality. There are no apparent security fixes in this diff. The code appears to be test-only additions 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/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.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.zero.1.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);@@ -23,7 +23,7 @@ ctx.beginPath(); ctx.roundRect(0, 50, 100, 0, [0]); ctx.stroke();-_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(); });
After analyzing the provided code diff, I don't see any security-related changes. The changes appear to be purely cosmetic/refactoring changes where a variable name was changed from `offscreenCanvas` to `canvas` for consistency. Here's the analysis following your requested format: Vulnerability Existed: no No security vulnerability found [testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.worker.js] [Lines 13-23] [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 are purely variable naming changes with no 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/dom/events/test/test_dom_wheel_event.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/events/test/test_dom_wheel_event.html@@ -820,7 +820,6 @@ ["layout.css.devPixelsPerPx", 1.0], ["dom.event.wheel-deltaMode-lines.disabled", true],- ["dom.event.wheelDelta.enabled", true], ["mousewheel.default.delta_multiplier_x", 100], ["mousewheel.default.delta_multiplier_y", 100],
Let me analyze the provided code diff for security fixes. Vulnerability Existed: not sure [Potential Wheel Event Handling Vulnerability] [dom/events/test/test_dom_wheel_event.html] [Lines 820-823] [Old Code] ["dom.event.wheel-deltaMode-lines.disabled", true], ["dom.event.wheelDelta.enabled", true], [Fixed Code] ["dom.event.wheel-deltaMode-lines.disabled", true], Additional Details: 1. The diff shows removal of the "dom.event.wheelDelta.enabled" preference setting 2. This change might relate to wheel event handling behavior modification 3. Without more context, it's unclear if this was fixing a security vulnerability or just changing behavior 4. Wheel event handling could potentially be involved in security issues like event spoofing, but we can't confirm from this limited diff Note: Since this is a test file change, it's less likely to be a direct security fix, but could be related to testing security fixes in the actual implementation.
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-rgba-5.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-rgba-5.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 = 'rgba(0 255 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(); });
After analyzing the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be variable renaming and consistency improvements rather than security-related fixes. Here's the analysis following your requested format: Vulnerability Existed: no [No security vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.worker.js] [Lines 13-21] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillStyle = 'rgba(0 255 0 / 0.2)'; ctx.fillRect(0, 0, 100, 50); _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'); ctx.fillStyle = '#f00'; ctx.fillStyle = 'rgba(0 255 0 / 0.2)'; ctx.fillRect(0, 0, 100, 50); _assertPixel(canvas, 50,25, 0,255,0,51, "50,25", "0,255,0,51"); 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 vulnerabilities but rather improve code consistency.
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/Fetch.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/fetch/Fetch.h@@ -7,6 +7,7 @@ #ifndef mozilla_dom_Fetch_h #define mozilla_dom_Fetch_h+#include "mozilla/Attributes.h" #include "nsCOMPtr.h" #include "nsError.h" #include "nsProxyRelease.h"@@ -18,7 +19,12 @@ #include "mozilla/dom/BodyStream.h" #include "mozilla/dom/Promise.h" #include "mozilla/dom/FetchStreamReader.h"+#ifdef MOZ_DOM_STREAMS+# include "mozilla/dom/ReadableStream.h"+# include "mozilla/dom/ReadableStreamDefaultReaderBinding.h"+#endif #include "mozilla/dom/RequestBinding.h"+#include "mozilla/dom/workerinternals/RuntimeService.h" class nsIGlobalObject; class nsIEventTarget;@@ -39,7 +45,8 @@ class InternalRequest; class OwningBlobOrArrayBufferViewOrArrayBufferOrFormDataOrURLSearchParamsOrUSVString;-class ReadableStream;++class ReadableStreamDefaultReader; class RequestOrUSVString; class WorkerPrivate;@@ -158,9 +165,7 @@ } #ifdef MOZ_DOM_STREAMS- already_AddRefed<ReadableStream> GetBody(ErrorResult& aRv) {- MOZ_CRASH("MOZ_DOM_STREAMS:NYI");- }+ already_AddRefed<ReadableStream> GetBody(JSContext* aCx, ErrorResult& aRv); #else void GetBody(JSContext* aCx, JS::MutableHandle<JSObject*> aBodyOut, ErrorResult& aRv);@@ -171,6 +176,19 @@ const nsAString& BodyLocalPath() const;+#ifdef MOZ_DOM_STREAMS+ // If the body contains a ReadableStream body object, this method produces a+ // tee() of it.+ //+ // This is marked as a script boundary minimize changes required for+ // annotation while we work out how to correctly annotate this code.+ // Tracked in Bug 1750650.+ MOZ_CAN_RUN_SCRIPT_BOUNDARY+ void MaybeTeeReadableStreamBody(JSContext* aCx, ReadableStream** aBodyOut,+ FetchStreamReader** aStreamReader,+ nsIInputStream** aInputStream,+ ErrorResult& aRv);+#else // If the body contains a ReadableStream body object, this method produces a // tee() of it. void MaybeTeeReadableStreamBody(JSContext* aCx,@@ -178,6 +196,7 @@ FetchStreamReader** aStreamReader, nsIInputStream** aInputStream, ErrorResult& aRv);+#endif // Utility public methods accessed by various runnables.@@ -210,15 +229,25 @@ mFetchStreamReader = nullptr; }+#ifndef MOZ_DOM_STREAMS void SetReadableStreamBody(JSObject* aBody) override { mReadableStreamBody = aBody; }- JSObject* GetReadableStreamBody() override { return mReadableStreamBody; }+#else+ void SetReadableStreamBody(ReadableStream* aBody) override {+ mReadableStreamBody = aBody;+ }+ ReadableStream* GetReadableStreamBody() override {+ return mReadableStreamBody;+ }+#endif void MarkAsRead() override { mBodyUsed = true; } virtual AbortSignalImpl* GetSignalImpl() const = 0;++ virtual AbortSignalImpl* GetSignalImplToConsumeBody() const = 0; // AbortFollower void RunAbortAlgorithm() override;@@ -230,33 +259,48 @@ protected: nsCOMPtr<nsIGlobalObject> mOwner;- // Always set whenever the FetchBody is created on the worker thread.- WorkerPrivate* mWorkerPrivate;-+#ifdef MOZ_DOM_STREAMS+ // This is the ReadableStream exposed to content. It's underlying source is a+ // BodyStream object. This needs to be traversed by subclasses.+ RefPtr<ReadableStream> mReadableStreamBody;++ // This is the Reader used to retrieve data from the body. This needs to be+ // traversed by subclasses.+ RefPtr<ReadableStreamDefaultReader> mReadableStreamReader;+#else // This is the ReadableStream exposed to content. It's underlying source is a // BodyStream object. JS::Heap<JSObject*> mReadableStreamBody; // This is the Reader used to retrieve data from the body. JS::Heap<JSObject*> mReadableStreamReader;+#endif RefPtr<FetchStreamReader> mFetchStreamReader; explicit FetchBody(nsIGlobalObject* aOwner); virtual ~FetchBody();+#ifdef MOZ_DOM_STREAMS+ void SetReadableStreamBody(JSContext* aCx, ReadableStream* aBody);+#else void SetReadableStreamBody(JSContext* aCx, JSObject* aBody);+#endif private: Derived* DerivedClass() const { return static_cast<Derived*>(const_cast<FetchBody*>(this)); }+#ifdef MOZ_DOM_STREAMS+ void LockStream(JSContext* aCx, ReadableStream* aStream, ErrorResult& aRv);+#else void LockStream(JSContext* aCx, JS::HandleObject aStream, ErrorResult& aRv);-- bool IsOnTargetThread() { return NS_IsMainThread() == !mWorkerPrivate; }-- void AssertIsOnTargetThread() { MOZ_ASSERT(IsOnTargetThread()); }+#endif++ void AssertIsOnTargetThread() {+ MOZ_ASSERT(NS_IsMainThread() == !GetCurrentThreadWorkerPrivate());+ } // Only ever set once, always on target thread. bool mBodyUsed;@@ -279,6 +323,7 @@ nsIGlobalObject* GetParentObject() const { return mOwner; } AbortSignalImpl* GetSignalImpl() const override { return mAbortSignalImpl; }+ AbortSignalImpl* GetSignalImplToConsumeBody() const final { return nullptr; } const UniquePtr<mozilla::ipc::PrincipalInfo>& GetPrincipalInfo() const { return mPrincipalInfo;
Here's the analysis of the provided code diff following the specified format: 1. Vulnerability Existed: not sure [Potential Memory Safety Issue] [dom/fetch/Fetch.h] [Lines 158-165] [Old Code] already_AddRefed<ReadableStream> GetBody(ErrorResult& aRv) { MOZ_CRASH("MOZ_DOM_STREAMS:NYI"); } [Fixed Code] already_AddRefed<ReadableStream> GetBody(JSContext* aCx, ErrorResult& aRv); Additional Details: The change removes a crash implementation and adds proper function definition, potentially fixing a memory safety issue when handling streams. 2. Vulnerability Existed: not sure [Potential Thread Safety Issue] [dom/fetch/Fetch.h] [Lines 297-301] [Old Code] bool IsOnTargetThread() { return NS_IsMainThread() == !mWorkerPrivate; } void AssertIsOnTargetThread() { MOZ_ASSERT(IsOnTargetThread()); } [Fixed Code] void AssertIsOnTargetThread() { MOZ_ASSERT(NS_IsMainThread() == !GetCurrentThreadWorkerPrivate()); } Additional Details: The change modifies thread safety assertions, potentially addressing a race condition by using a different method to check worker thread status. 3. Vulnerability Existed: not sure [Potential Resource Management Issue] [dom/fetch/Fetch.h] [Lines 171-196] [Old Code] void MaybeTeeReadableStreamBody(JSContext* aCx, JS::MutableHandle<JSObject*> aBodyOut, FetchStreamReader** aStreamReader, nsIInputStream** aInputStream, ErrorResult& aRv); [Fixed Code] MOZ_CAN_RUN_SCRIPT_BOUNDARY void MaybeTeeReadableStreamBody(JSContext* aCx, ReadableStream** aBodyOut, FetchStreamReader** aStreamReader, nsIInputStream** aInputStream, ErrorResult& aRv); Additional Details: The change adds MOZ_CAN_RUN_SCRIPT_BOUNDARY annotation and modifies the parameter types, potentially addressing resource management issues during script execution. Note: The changes appear to be primarily related to stream handling improvements and thread safety, but without more context about the specific vulnerabilities being addressed, it's difficult to definitively identify security issues. The modifications suggest potential fixes for memory safety, thread safety, and resource management concerns.
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.shadow.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.shadow.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 = '#f00'; ctx.fillRect(0, 0, 100, 50);@@ -30,7 +30,7 @@ ctx.strokeStyle = '#f00'; ctx.lineWidth = 50; ctx.strokeRect(0, -75, 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 purely variable renaming and don't involve any security-sensitive operations. Here's the analysis following your requested format: Vulnerability Existed: no No security vulnerability found [File] [Lines 17-18, 30] [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 simply rename the variable from `offscreenCanvas` to `canvas` throughout the test file, which doesn't appear to address any security issues. This looks like a code style/consistency change 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/js/src/jit-test/tests/stream/bug-1515816.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/js/src/jit-test/tests/stream/bug-1515816.js@@ -1,4 +1,4 @@-// |jit-test| --no-ion; --no-baseline; --no-blinterp; skip-if: !('oomAfterAllocations' in this)+// |jit-test| --no-ion; --no-baseline; --no-blinterp; skip-if: !('oomAfterAllocations' in this && this.hasOwnProperty("ReadableStream")) // Don't crash on OOM in ReadableStreamDefaultReader.prototype.read(). for (let n = 1; n < 1000; n++) {@@ -12,6 +12,6 @@ try { reader.read(); n = 1000;- } catch {}+ } catch { } resetOOMFailure(); }
Analyzing the provided code diff, here's the security assessment: 1. Vulnerability Existed: not sure [Potential Missing Feature Check] [js/src/jit-test/tests/stream/bug-1515816.js] [Lines 1] [Old Code] // |jit-test| --no-ion; --no-baseline; --no-blinterp; skip-if: !('oomAfterAllocations' in this) [Fixed Code] // |jit-test| --no-ion; --no-baseline; --no-blinterp; skip-if: !('oomAfterAllocations' in this && this.hasOwnProperty("ReadableStream")) Additional Details: The fix adds a check for the existence of ReadableStream before running the test. While not a direct security vulnerability, this prevents potential runtime errors when the feature isn't available. 2. Vulnerability Existed: no [Empty Catch Block] [js/src/jit-test/tests/stream/bug-1515816.js] [Lines 12] [Old Code] } catch {} [Fixed Code] } catch { } Additional Details: The change is purely stylistic (adding a space in the empty catch block) and doesn't relate to any security vulnerability. No clear security vulnerabilities were identified in this diff. The changes appear to be either test condition improvements or stylistic adjustments.
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/selectors/old-tests/css3-modsel-155.xml+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/selectors/old-tests/css3-modsel-155.xml@@ -9,7 +9,6 @@ <link rel="author" title="Ian Hickson" href="mailto:[email protected]"/> <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found --> <link rel="match" href="reference/this-line-lime-background.xht"/>- <meta name="flags" content="" /> </head> <body> <p class="5cm">This line should have a green background.</p>
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/css/selectors/old-tests/css3-modsel-155.xml [Lines] 9 [Old Code] <meta name="flags" content="" /> [Fixed Code] (line removed) Additional details: - The diff shows removal of an empty meta tag with a "flags" attribute - This appears to be a test file cleanup rather than a security fix - No known vulnerabilities are associated with this change - The modification seems to be removing unused metadata from a test file No security vulnerabilities were identified in this change. The modification appears to be a simple cleanup of test file metadata rather than addressing any 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/third_party/rust/tokio-timer/src/lib.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/tokio-timer/src/lib.rs@@ -1,7 +1,13 @@-#![doc(html_root_url = "https://docs.rs/tokio-timer/0.2.11")]-#![deny(missing_docs, warnings, missing_debug_implementations)]+#![doc(html_root_url = "https://docs.rs/tokio-timer/0.2.13")]+#![deny(missing_docs, missing_debug_implementations)] //! Utilities for tracking time.+//!+//! > **Note:** This crate is **deprecated in tokio 0.2.x** and has been moved+//! > into [`tokio::time`] behind the `time` [feature flag].+//!+//! [`tokio::time`]: https://docs.rs/tokio/latest/tokio/time/index.html+//! [feature flag]: https://docs.rs/tokio/latest/tokio/index.html#feature-flags //! //! This crate provides a number of utilities for working with periods of time: //!
Based on the provided diff, I'll analyze it for security vulnerabilities: 1. Vulnerability Existed: not sure Deny Warnings Removed [File] third_party/rust/tokio-timer/src/lib.rs [Lines] 1-2 Old Code: `#![deny(missing_docs, warnings, missing_debug_implementations)]` Fixed Code: `#![deny(missing_docs, missing_debug_implementations)]` Additional Details: The removal of `warnings` from the deny list could potentially allow security-related warnings to go unnoticed, but this isn't a direct vulnerability. 2. Vulnerability Existed: no Version Update and Deprecation Notice [File] third_party/rust/tokio-timer/src/lib.rs [Lines] 1-9 Old Code: No deprecation notice Fixed Code: Added deprecation notice pointing to `tokio::time` Additional Details: This appears to be a maintenance update rather than a security fix. The version was updated from 0.2.11 to 0.2.13 and a deprecation notice was added. No clear security vulnerabilities were identified in this diff. The changes appear to be primarily documentation and warning-related updates.
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/accessible/tests/mochitest/states/test_selects.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/accessible/tests/mochitest/states/test_selects.html@@ -18,36 +18,9 @@ src="../events.js"></script> <script type="application/javascript">- function openComboboxNCheckStates(aID) {- this.combobox = getAccessible(aID);- this.comboboxList = this.combobox.firstChild;- this.comboboxOption = this.comboboxList.firstChild;-- this.eventSeq = [- new invokerChecker(EVENT_FOCUS, this.comboboxOption),- ];-- this.invoke = function openComboboxNCheckStates_invoke() {- getNode(aID).focus();- synthesizeKey("VK_DOWN", { altKey: true });- };-- this.finalCheck = function openComboboxNCheckStates_invoke() {- // Expanded state on combobox.- testStates(this.combobox, STATE_EXPANDED);-- // Floating state on combobox list.- testStates(this.comboboxList, STATE_FLOATING);- };-- this.getID = function openComboboxNCheckStates_getID() {- return "open combobox and test states";- };- } // gA11yEventDumpToConsole = true;- var gQueue = null; function doTest() { // combobox var combobox = getAccessible("combobox");@@ -60,11 +33,11 @@ var opt1 = comboboxList.firstChild; testStates(opt1, STATE_SELECTABLE | STATE_SELECTED | STATE_FOCUSABLE,- EXT_STATE_ACTIVE, STATE_FOCUSED, 0);+ 0, STATE_FOCUSED, 0); var opt2 = comboboxList.lastChild; testStates(opt2, STATE_SELECTABLE | STATE_FOCUSABLE, 0, STATE_SELECTED, 0,- STATE_FOCUSED, EXT_STATE_ACTIVE);+ STATE_FOCUSED, 0); // collapsed combobox testStates("collapsedcombobox",@@ -123,10 +96,7 @@ // STATE_SELECTABLE | STATE_SELECTED | STATE_FOCUSABLE, // EXT_STATE_ACTIVE);- // open combobox- gQueue = new eventQueue();- gQueue.push(new openComboboxNCheckStates("combobox"));- gQueue.invoke(); // Will call */SimpleTest.finish();+ SimpleTest.finish(); } SimpleTest.waitForExplicitFinish();
Analyzing the provided code diff, here are the potential security issues: 1. Vulnerability Existed: no No specific vulnerability found [File] [Lines 18-36, 60-63, 123-126] [Old Code] - Removed function openComboboxNCheckStates and related queue operations [Fixed Code] - Simplified test flow with direct SimpleTest.finish() 2. Vulnerability Existed: no State test simplification [File] [Lines 33-35, 60-63] [Old Code] - Included EXT_STATE_ACTIVE in state checks [Fixed Code] - Removed EXT_STATE_ACTIVE from state checks Additional Details: - The changes appear to be test code simplifications rather than security fixes - The removed code was related to test automation (event queue handling) and state testing - No obvious security vulnerabilities were present in either version - The changes seem to focus on making the test more straightforward by removing unnecessary complexity The modifications primarily involve: 1. Removing an unused test function (openComboboxNCheckStates) 2. Simplifying state assertions by removing EXT_STATE_ACTIVE checks 3. Removing the event queue system in favor of direct test completion No security vulnerabilities were identified in these changes. The modifications appear to be test code cleanups 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/reftests/css-grid/grid-fragmentation-030.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/layout/reftests/css-grid/grid-fragmentation-030.html@@ -23,7 +23,7 @@ -ms-column-fill: auto; -webkit-column-fill: auto; column-fill: auto;- border: 2px dashed;+ border: 2px solid salmon; margin-bottom: 5px; }
After analyzing the provided code diff, here's my assessment: 1. Vulnerability Existed: no [No security vulnerability found] [layout/reftests/css-grid/grid-fragmentation-030.html] [Lines 23] [Old Code: border: 2px dashed;] [Fixed Code: border: 2px solid salmon;] Additional Details: - The change appears to be purely cosmetic/visual, modifying the border style from dashed to solid and adding a color (salmon) - This is part of a CSS grid fragmentation test case and doesn't appear to have any security implications - No known vulnerabilities are associated with this type of style change - The modification seems to be for better visual clarity in test results rather than addressing any 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/browser/themes/shared/urlbar-searchbar.inc.css+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/browser/themes/shared/urlbar-searchbar.inc.css@@ -1,16 +1,13 @@-%if 0 /* 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/. */-%endif--%define urlbarMarginInline 5px-%define urlbarSearchButtonWidth calc(16px + 2 * var(--urlbar-icon-padding)) :root { --toolbar-field-border-color: hsla(240,5%,5%,.25); --toolbar-field-focus-border-color: var(--focus-outline-color); --urlbar-container-padding: 1px;+ --urlbar-margin-inline: 5px;+ --urlbar-search-button-width: calc(16px + 2 * var(--urlbar-icon-padding)); } @media not (prefers-contrast) {@@ -23,7 +20,7 @@ #urlbar-container, #search-container { padding-block: 4px;- margin-inline: @urlbarMarginInline@;+ margin-inline: var(--urlbar-margin-inline); } #search-container[cui-areatype="menu-panel"] {@@ -144,7 +141,7 @@ } #urlbar.searchButton > #urlbar-input-container > #urlbar-search-button {- width: @urlbarSearchButtonWidth@;+ width: var(--urlbar-search-button-width); background-image: url(chrome://global/skin/icons/search-glass.svg); background-repeat: no-repeat; background-position: center;@@ -176,7 +173,7 @@ :root:not([chromehidden~="toolbar"]) #urlbar.searchButton:not([breakout]) > #urlbar-background, :root:not([chromehidden~="toolbar"]) #urlbar.searchButton:not([breakout-extend]) > #urlbar-background {- inset-inline-start: @urlbarSearchButtonWidth@;+ inset-inline-start: var(--urlbar-search-button-width); } #urlbar-input-container {@@ -219,14 +216,14 @@ #urlbar[breakout][breakout-extend] { top: 0;- left: -@urlbarMarginInline@;- width: calc(100% + 2 * @urlbarMarginInline@);+ left: calc(-1 * var(--urlbar-margin-inline));+ width: calc(100% + 2 * var(--urlbar-margin-inline)); } #urlbar[breakout][breakout-extend] > #urlbar-input-container { height: var(--urlbar-toolbar-height); padding-block: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2 + var(--urlbar-container-padding));- padding-inline: calc(@urlbarMarginInline@ + var(--urlbar-container-padding));+ padding-inline: calc(var(--urlbar-margin-inline) + var(--urlbar-container-padding)); } #urlbar.searchButton[breakout][breakout-extend] > #urlbar-input-container > #urlbar-search-button {
Based on the provided diff, I don't see any security-related fixes. The changes appear to be purely stylistic/structural, moving from preprocessor variables to CSS custom properties (variables). Here's the analysis: 1. Vulnerability Existed: no No security vulnerability found File: browser/themes/shared/urlbar-searchbar.inc.css Lines: Various Old Code: Preprocessor variables (@urlbarMarginInline@ and @urlbarSearchButtonWidth@) Fixed Code: CSS custom properties (var(--urlbar-margin-inline) and var(--urlbar-search-button-width)) The changes are: 1. Removal of preprocessor directives (%if, %define) 2. Replacement of preprocessor variables with CSS custom properties 3. Some syntax adjustments to work with CSS variables These changes improve maintainability and modernize the code, but don't appear to address any 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.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/dom/media/CubebUtils.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/media/CubebUtils.cpp@@ -36,6 +36,8 @@ #endif #include "audioipc_server_ffi_generated.h" #include "audioipc_client_ffi_generated.h"+#include "audioipc2_server_ffi_generated.h"+#include "audioipc2_client_ffi_generated.h" #include <cmath> #include <thread> #include "AudioThreadRegistry.h"@@ -57,6 +59,7 @@ #define PREF_CUBEB_FORCE_NULL_CONTEXT "media.cubeb.force_null_context" #define PREF_CUBEB_OUTPUT_VOICE_ROUTING "media.cubeb.output_voice_routing" #define PREF_CUBEB_SANDBOX "media.cubeb.sandbox"+#define PREF_CUBEB_SANDBOX_V2 "media.cubeb.sandbox_v2" #define PREF_AUDIOIPC_POOL_SIZE "media.audioipc.pool_size" #define PREF_AUDIOIPC_STACK_SIZE "media.audioipc.stack_size" #define PREF_AUDIOIPC_SHM_AREA_SIZE "media.audioipc.shm_area_size"@@ -107,6 +110,7 @@ bool sRouteOutputAsVoice = false; #ifdef MOZ_CUBEB_REMOTING bool sCubebSandbox = false;+bool sCubebSandboxV2 = false; size_t sAudioIPCPoolSize; size_t sAudioIPCStackSize; size_t sAudioIPCShmAreaSize;@@ -163,13 +167,25 @@ StaticAutoPtr<ipc::FileDescriptor> sIPCConnection; static bool StartAudioIPCServer() {- audioipc::AudioIpcServerInitParams initParams;- initParams.mThreadCreateCallback = [](const char* aName) {- PROFILER_REGISTER_THREAD(aName);- };- initParams.mThreadDestroyCallback = []() { PROFILER_UNREGISTER_THREAD(); };- sServerHandle = audioipc::audioipc_server_start(sBrandName, sCubebBackendName,- &initParams);+ if (sCubebSandboxV2) {+ audioipc2::AudioIpcServerInitParams initParams{};+ initParams.mThreadCreateCallback = [](const char* aName) {+ PROFILER_REGISTER_THREAD(aName);+ };+ initParams.mThreadDestroyCallback = []() { PROFILER_UNREGISTER_THREAD(); };++ sServerHandle = audioipc2::audioipc2_server_start(+ sBrandName, sCubebBackendName, &initParams);+ } else {+ audioipc::AudioIpcServerInitParams initParams{};+ initParams.mThreadCreateCallback = [](const char* aName) {+ PROFILER_REGISTER_THREAD(aName);+ };+ initParams.mThreadDestroyCallback = []() { PROFILER_UNREGISTER_THREAD(); };++ sServerHandle = audioipc::audioipc_server_start(+ sBrandName, sCubebBackendName, &initParams);+ } return sServerHandle != nullptr; }@@ -178,7 +194,11 @@ return; }- audioipc::audioipc_server_stop(sServerHandle);+ if (sCubebSandboxV2) {+ audioipc2::audioipc2_server_stop(sServerHandle);+ } else {+ audioipc::audioipc_server_stop(sServerHandle);+ } sServerHandle = nullptr; } #endif // MOZ_CUBEB_REMOTING@@ -268,6 +288,12 @@ sCubebSandbox = Preferences::GetBool(aPref); MOZ_LOG(gCubebLog, LogLevel::Verbose, ("%s: %s", PREF_CUBEB_SANDBOX, sCubebSandbox ? "true" : "false"));+ } else if (strcmp(aPref, PREF_CUBEB_SANDBOX_V2) == 0) {+ StaticMutexAutoLock lock(sMutex);+ sCubebSandboxV2 = Preferences::GetBool(aPref);+ MOZ_LOG(+ gCubebLog, LogLevel::Verbose,+ ("%s: %s", PREF_CUBEB_SANDBOX_V2, sCubebSandboxV2 ? "true" : "false")); } else if (strcmp(aPref, PREF_AUDIOIPC_POOL_SIZE) == 0) { StaticMutexAutoLock lock(sMutex); sAudioIPCPoolSize = Preferences::GetUint(PREF_AUDIOIPC_POOL_SIZE,@@ -430,8 +456,14 @@ MOZ_LOG(gCubebLog, LogLevel::Debug, ("%s: %d", PREF_AUDIOIPC_SHM_AREA_SIZE, (int)sAudioIPCShmAreaSize)); MOZ_ASSERT(sServerHandle);- ipc::FileDescriptor::PlatformHandleType rawFD =- audioipc::audioipc_server_new_client(sServerHandle, sAudioIPCShmAreaSize);+ ipc::FileDescriptor::PlatformHandleType rawFD;+ if (sCubebSandboxV2) {+ rawFD = audioipc2::audioipc2_server_new_client(sServerHandle,+ sAudioIPCShmAreaSize);+ } else {+ rawFD = audioipc::audioipc_server_new_client(sServerHandle,+ sAudioIPCShmAreaSize);+ } ipc::FileDescriptor fd(rawFD); if (!fd.IsValid()) { MOZ_LOG(gCubebLog, LogLevel::Error, ("audioipc_server_new_client failed"));@@ -484,6 +516,9 @@ #ifdef MOZ_CUBEB_REMOTING MOZ_LOG(gCubebLog, LogLevel::Info, ("%s: %s", PREF_CUBEB_SANDBOX, sCubebSandbox ? "true" : "false"));+ MOZ_LOG(+ gCubebLog, LogLevel::Info,+ ("%s: %s", PREF_CUBEB_SANDBOX_V2, sCubebSandboxV2 ? "true" : "false")); if (sCubebSandbox) { if (XRE_IsParentProcess() && !sIPCConnection) {@@ -499,23 +534,42 @@ return nullptr; }- audioipc::AudioIpcInitParams initParams;- initParams.mPoolSize = sAudioIPCPoolSize;- initParams.mStackSize = sAudioIPCStackSize;- initParams.mServerConnection =- sIPCConnection->ClonePlatformHandle().release();- initParams.mThreadCreateCallback = [](const char* aName) {- PROFILER_REGISTER_THREAD(aName);- };- initParams.mThreadDestroyCallback = []() { PROFILER_UNREGISTER_THREAD(); };- MOZ_LOG(gCubebLog, LogLevel::Debug,- ("%s: %d", PREF_AUDIOIPC_POOL_SIZE, (int)initParams.mPoolSize));+ ("%s: %d", PREF_AUDIOIPC_POOL_SIZE, (int)sAudioIPCPoolSize)); MOZ_LOG(gCubebLog, LogLevel::Debug,- ("%s: %d", PREF_AUDIOIPC_STACK_SIZE, (int)initParams.mStackSize));-- rv =- audioipc::audioipc_client_init(&sCubebContext, sBrandName, &initParams);+ ("%s: %d", PREF_AUDIOIPC_STACK_SIZE, (int)sAudioIPCStackSize));++ if (sCubebSandboxV2) {+ audioipc2::AudioIpcInitParams initParams{};+ initParams.mPoolSize = sAudioIPCPoolSize;+ initParams.mStackSize = sAudioIPCStackSize;+ initParams.mServerConnection =+ sIPCConnection->ClonePlatformHandle().release();+ initParams.mThreadCreateCallback = [](const char* aName) {+ PROFILER_REGISTER_THREAD(aName);+ };+ initParams.mThreadDestroyCallback = []() {+ PROFILER_UNREGISTER_THREAD();+ };++ rv = audioipc2::audioipc2_client_init(&sCubebContext, sBrandName,+ &initParams);+ } else {+ audioipc::AudioIpcInitParams initParams{};+ initParams.mPoolSize = sAudioIPCPoolSize;+ initParams.mStackSize = sAudioIPCStackSize;+ initParams.mServerConnection =+ sIPCConnection->ClonePlatformHandle().release();+ initParams.mThreadCreateCallback = [](const char* aName) {+ PROFILER_REGISTER_THREAD(aName);+ };+ initParams.mThreadDestroyCallback = []() {+ PROFILER_UNREGISTER_THREAD();+ };++ rv = audioipc::audioipc_client_init(&sCubebContext, sBrandName,+ &initParams);+ } } else { #endif // MOZ_CUBEB_REMOTING #ifdef XP_WIN@@ -601,17 +655,12 @@ } static const char* gInitCallbackPrefs[] = {- PREF_VOLUME_SCALE,- PREF_CUBEB_OUTPUT_DEVICE,- PREF_CUBEB_LATENCY_PLAYBACK,- PREF_CUBEB_LATENCY_MTG,- PREF_CUBEB_BACKEND,- PREF_CUBEB_FORCE_NULL_CONTEXT,- PREF_CUBEB_SANDBOX,- PREF_AUDIOIPC_POOL_SIZE,- PREF_AUDIOIPC_STACK_SIZE,- PREF_AUDIOIPC_SHM_AREA_SIZE,- nullptr,+ PREF_VOLUME_SCALE, PREF_CUBEB_OUTPUT_DEVICE,+ PREF_CUBEB_LATENCY_PLAYBACK, PREF_CUBEB_LATENCY_MTG,+ PREF_CUBEB_BACKEND, PREF_CUBEB_FORCE_NULL_CONTEXT,+ PREF_CUBEB_SANDBOX, PREF_CUBEB_SANDBOX_V2,+ PREF_AUDIOIPC_POOL_SIZE, PREF_AUDIOIPC_STACK_SIZE,+ PREF_AUDIOIPC_SHM_AREA_SIZE, nullptr, }; static const char* gCallbackPrefs[] = { PREF_CUBEB_FORCE_SAMPLE_RATE,
Analyzing the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential Sandboxing Improvement] [dom/media/CubebUtils.cpp] [Lines 36-38, 57-59, 107-110, 163-189, 268-293, 430-439, 484-570, 601-663] [Old Code] Original code only had one sandboxing mechanism (sCubebSandbox) [Fixed Code] Added a new sandboxing mechanism (sCubebSandboxV2) with separate initialization and handling paths 2. Vulnerability Existed: not sure [Potential Thread Safety Improvement] [dom/media/CubebUtils.cpp] [Lines 163-189, 430-439, 484-570] [Old Code] Single path for audio IPC server/client initialization [Fixed Code] Added branching logic with proper thread registration/deregistration callbacks for both sandbox versions 3. Vulnerability Existed: not sure [Potential Resource Handling Improvement] [dom/media/CubebUtils.cpp] [Lines 178-189] [Old Code] Single server stop function [Fixed Code] Added version-specific server stop functions Note: The diff appears to add a new sandboxing version (V2) while maintaining backward compatibility. While no specific vulnerabilities are patched, this could represent a security architecture improvement by introducing a more secure sandboxing mechanism. The changes include: - New header includes for V2 functionality - New preference flag for V2 - Separate initialization paths for V1/V2 - Proper resource cleanup for both versions - Additional logging for the new sandbox version
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.