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/devtools/client/debugger/src/utils/source-maps.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/client/debugger/src/utils/source-maps.js@@ -78,15 +78,3 @@ return sourceMaps.getOriginalLocation(location); }--export function isOriginalSource(source) {- if (!source) {- return false;- }-- if (!source.hasOwnProperty("isOriginal")) {- throw new Error("source must have an isOriginal property");- }-- return source.isOriginal;-}
Let me analyze the code diff for potential security fixes: 1. Vulnerability Existed: not sure [Potential Input Validation Issue] [devtools/client/debugger/src/utils/source-maps.js] [Lines 78-90] [Old Code] export function isOriginalSource(source) { if (!source) { return false; } if (!source.hasOwnProperty("isOriginal")) { throw new Error("source must have an isOriginal property"); } return source.isOriginal; } [Fixed Code] [Entire function removed] Additional Details: - The diff shows removal of the `isOriginalSource` function which performed input validation - While not clearly a security vulnerability, removing this validation could potentially affect security if: 1. The function was protecting against malicious/malformed input 2. The function was being used in security-sensitive contexts - Without more context about how this function was used, it's hard to determine if this was a security fix - The removal might indicate the validation was moved elsewhere or was deemed unnecessary Note: No other vulnerabilities are apparent in this diff. The change primarily removes a validation function without showing its replacement or the context in which it was used.
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.gradient.linear.transform.1.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.gradient.linear.transform.1.html@@ -17,8 +17,8 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); var g = ctx.createLinearGradient(0, 0, 200, 0); g.addColorStop(0, '#f00');@@ -28,9 +28,9 @@ ctx.fillStyle = g; ctx.translate(-50, 0); ctx.fillRect(50, 0, 100, 50);-_assertPixel(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,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, 50,25, 0,255,0,255, "50,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 variable renaming (from `offscreenCanvas` to `canvas`) and corresponding updates to the variable name in the assertions. Here's the structured response: Vulnerability Existed: no No security vulnerability found [testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.html] [Lines 17-28] [Old Code: var offscreenCanvas = new OffscreenCanvas(100, 50); ... _assertPixel(offscreenCanvas, ...)] [Fixed Code: var canvas = new OffscreenCanvas(100, 50); ... _assertPixel(canvas, ...)] The changes are purely cosmetic/refactoring in nature and don't address any security vulnerabilities. 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/widget/nsNativeTheme.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/widget/nsNativeTheme.cpp@@ -301,34 +301,6 @@ return content && content->IsHTMLElement(); }-// scrollbar button:-int32_t nsNativeTheme::GetScrollbarButtonType(nsIFrame* aFrame) {- if (!aFrame) return 0;-- static Element::AttrValuesArray strings[] = {- nsGkAtoms::scrollbarDownBottom, nsGkAtoms::scrollbarDownTop,- nsGkAtoms::scrollbarUpBottom, nsGkAtoms::scrollbarUpTop, nullptr};-- nsIContent* content = aFrame->GetContent();- if (!content || !content->IsElement()) {- return 0;- }-- switch (content->AsElement()->FindAttrValueIn(- kNameSpaceID_None, nsGkAtoms::sbattr, strings, eCaseMatters)) {- case 0:- return eScrollbarButton_Down | eScrollbarButton_Bottom;- case 1:- return eScrollbarButton_Down;- case 2:- return eScrollbarButton_Bottom;- case 3:- return eScrollbarButton_UpTop;- }-- return 0;-}- // treeheadercell: nsNativeTheme::TreeSortDirection nsNativeTheme::GetTreeSortDirection( nsIFrame* aFrame) {
Let me analyze the code diff for security vulnerabilities: 1. Vulnerability Existed: not sure [Removed Scrollbar Button Type Function] [widget/nsNativeTheme.cpp] [Lines 301-325] [Old Code] // scrollbar button: int32_t nsNativeTheme::GetScrollbarButtonType(nsIFrame* aFrame) { if (!aFrame) return 0; static Element::AttrValuesArray strings[] = { nsGkAtoms::scrollbarDownBottom, nsGkAtoms::scrollbarDownTop, nsGkAtoms::scrollbarUpBottom, nsGkAtoms::scrollbarUpTop, nullptr}; nsIContent* content = aFrame->GetContent(); if (!content || !content->IsElement()) { return 0; } switch (content->AsElement()->FindAttrValueIn( kNameSpaceID_None, nsGkAtoms::sbattr, strings, eCaseMatters)) { case 0: return eScrollbarButton_Down | eScrollbarButton_Bottom; case 1: return eScrollbarButton_Down; case 2: return eScrollbarButton_Bottom; case 3: return eScrollbarButton_UpTop; } return 0; } [Fixed Code] [Function completely removed] Notes about this change: - The entire GetScrollbarButtonType function was removed - Without more context about why it was removed, it's hard to determine if this was a security fix - Possible reasons could include: * The function was unused and removed during cleanup * The scrollbar button type handling was moved elsewhere * There might have been a potential security issue with the attribute parsing - Since we don't see the replacement code or have bug report context, I can't be certain if this was 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/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.worker.js+++ /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.object.clamp.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'); var imgdata = ctx.getImageData(0, 0, 10, 10); imgdata.data[0] = 100;
Based on the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely variable renaming (from `offscreenCanvas` to `canvas`) without any security implications. Answer Format for Each Vulnerability: Vulnerability Existed: no No security vulnerability found in this diff [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); The change is simply a variable name refactoring with no impact on security. The functionality remains exactly the same, just with a different variable name. There are no security-related patterns or fixes visible 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/third_party/rust/neqo-http3/src/client_events.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/neqo-http3/src/client_events.rs@@ -9,7 +9,7 @@ use crate::connection::Http3State; use crate::settings::HSettingType; use crate::{- features::extended_connect::{ExtendedConnectEvents, ExtendedConnectType},+ features::extended_connect::{ExtendedConnectEvents, ExtendedConnectType, SessionCloseReason}, CloseType, Http3StreamInfo, HttpRecvStreamEvents, RecvStreamEvents, SendStreamEvents, }; use neqo_common::{event::Provider as EventProvider, Header};@@ -23,10 +23,13 @@ #[derive(Debug, PartialEq, Eq, Clone)] pub enum WebTransportEvent { Negotiated(bool),- Session(StreamId),+ Session {+ stream_id: StreamId,+ status: u16,+ }, SessionClosed { stream_id: StreamId,- error: Option<AppError>,+ reason: SessionCloseReason, }, NewStream { stream_id: StreamId,@@ -174,11 +177,12 @@ } impl ExtendedConnectEvents for Http3ClientEvents {- fn session_start(&self, connect_type: ExtendedConnectType, stream_id: StreamId) {+ fn session_start(&self, connect_type: ExtendedConnectType, stream_id: StreamId, status: u16) { if connect_type == ExtendedConnectType::WebTransport {- self.insert(Http3ClientEvent::WebTransport(WebTransportEvent::Session(+ self.insert(Http3ClientEvent::WebTransport(WebTransportEvent::Session { stream_id,- )));+ status,+ })); } else { unreachable!("There is only ExtendedConnectType::WebTransport."); }@@ -188,11 +192,11 @@ &self, connect_type: ExtendedConnectType, stream_id: StreamId,- error: Option<AppError>,+ reason: SessionCloseReason, ) { if connect_type == ExtendedConnectType::WebTransport { self.insert(Http3ClientEvent::WebTransport(- WebTransportEvent::SessionClosed { stream_id, error },+ WebTransportEvent::SessionClosed { stream_id, reason }, )); } else { unreachable!("There are no other types.");@@ -325,10 +329,10 @@ }); }- pub fn negotiation_done(&self, feature_type: HSettingType, negotiated: bool) {+ pub fn negotiation_done(&self, feature_type: HSettingType, succeeded: bool) { if feature_type == HSettingType::EnableWebTransport { self.insert(Http3ClientEvent::WebTransport(- WebTransportEvent::Negotiated(negotiated),+ WebTransportEvent::Negotiated(succeeded), )); } }
Let me analyze the code diff for potential security vulnerabilities: 1. Vulnerability Existed: not sure [Potential Information Leakage] [third_party/rust/neqo-http3/src/client_events.rs] [Lines 23-28, 174-186] [Old Code] Session(StreamId), SessionClosed { stream_id: StreamId, error: Option<AppError>, }, [Fixed Code] Session { stream_id: StreamId, status: u16, }, SessionClosed { stream_id: StreamId, reason: SessionCloseReason, }, Additional Details: The change adds more detailed status information for WebTransport sessions. While not clearly a security vulnerability, exposing more session details could potentially lead to information leakage if not properly handled. 2. Vulnerability Existed: not sure [Potential Error Handling Improvement] [third_party/rust/neqo-http3/src/client_events.rs] [Lines 188-201] [Old Code] error: Option<AppError>, [Fixed Code] reason: SessionCloseReason, Additional Details: The change replaces a generic error with a specific SessionCloseReason type. This could improve error handling security by providing more structured error information, though it's not clearly fixing a specific vulnerability. 3. Vulnerability Existed: no [Code Clarity Improvement] [third_party/rust/neqo-http3/src/client_events.rs] [Lines 325-331] [Old Code] pub fn negotiation_done(&self, feature_type: HSettingType, negotiated: bool) { [Fixed Code] pub fn negotiation_done(&self, feature_type: HSettingType, succeeded: bool) { Additional Details: This appears to be a simple renaming for clarity (negotiated → succeeded) with no security implications. Note: While none of these changes clearly fix known vulnerabilities, the modifications to session handling and error reporting could potentially improve security by providing more structured and detailed information about connection states and failures. However, without more context about the specific threat model, I can't definitively identify these as 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/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.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.hsl-4.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 = 'hsl(0, 100%, 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(); });
Analyzing the provided code diff, here's the security assessment: 1. Vulnerability Existed: no No specific 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 = 'hsl(0, 100%, 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 = 'hsl(0, 100%, 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 appear to be purely cosmetic/refactoring, renaming the variable 'offscreenCanvas' to 'canvas' and updating the references accordingly. There's no indication of security fixes in this diff - it's just a variable name change for better consistency or readability. No security vulnerabilities are being addressed 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/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.html+++ /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.clip.intersect.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);@@ -30,7 +30,7 @@ ctx.clip(); ctx.fillStyle = '#f00'; 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 don't see any security vulnerabilities being fixed. The changes appear to be purely variable renaming and don't involve any security-related modifications. Here's the analysis: 1. Vulnerability Existed: no Variable Renaming [File] [Lines 17-18, 30] 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'); ``` 2. Vulnerability Existed: no Variable Renaming in Assertion [File] [Line 30] Old Code: ```javascript _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); ``` Fixed Code: ```javascript _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); ``` The changes are purely cosmetic/refactoring in nature, changing the variable name from `offscreenCanvas` to `canvas` for consistency or readability. There are no security implications 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/web-platform/tests/css/css-color/t424-hsl-values-b-11.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-color/t424-hsl-values-b-11.html@@ -6,7 +6,6 @@ <link rel="author" title="Intel" href="http://www.intel.com"> <link rel="help" href="http://www.w3.org/TR/css3-color/#hsl-color" /> <link rel="match" href="t424-hsl-values-b-11-ref.html" />-<meta name="flags" content="" /> <meta name="assert" content="Implementation of algorithm for converting hsl() colors to rgb() colors." /> <style> table { border-spacing: 0; padding: 0; border: none; }
Based on the provided diff, I'll analyze it for potential security vulnerabilities: 1. Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/css/css-color/t424-hsl-values-b-11.html [Lines] 6 [Old Code] <meta name="flags" content="" /> [Fixed Code] (line removed) Additional details: - The change simply removes an empty meta tag that wasn't serving any apparent purpose - There's no indication of any security-related issue being fixed - The modification appears to be a simple cleanup rather than a security patch - No known vulnerability patterns (XSS, injection, etc.) are present in this change The diff shows only minor HTML cleanup with no security implications. The removed meta tag was empty and not used for 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/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.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-hsl-8.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(2.0943951024rad, 100.0%, 50.0%)'; 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 don't see any security vulnerabilities being fixed. The changes appear to be purely cosmetic/refactoring (variable name change) without any security implications. Here's the analysis: Vulnerability Existed: no No security vulnerability found File: testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.worker.js [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 only involve: 1. Renaming the variable from `offscreenCanvas` to `canvas` 2. Updating the variable name in the `_assertPixel` call accordingly There are no changes to the actual functionality or security-related aspects of the 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/the-offscreen-canvas/initial.reset.clip.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.clip.html@@ -17,16 +17,16 @@ }); 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');-offscreenCanvas.width = 100;+canvas.width = 100; ctx.rect(0, 0, 1, 1); ctx.clip();-offscreenCanvas.width = 100;+canvas.width = 100; ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 20,20, 0,255,0,255, "20,20", "0,255,0,255");+_assertPixel(canvas, 20,20, 0,255,0,255, "20,20", "0,255,0,255"); t.done(); });
After analyzing the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely variable renaming and don't involve any security-sensitive operations. Here's the analysis following your requested format: Vulnerability Existed: no [No security vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.clip.html] [Lines 17-27] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); offscreenCanvas.width = 100; ctx.rect(0, 0, 1, 1); ctx.clip(); offscreenCanvas.width = 100; ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50); _assertPixel(offscreenCanvas, 20,20, 0,255,0,255, "20,20", "0,255,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); canvas.width = 100; ctx.rect(0, 0, 1, 1); ctx.clip(); canvas.width = 100; ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50); _assertPixel(canvas, 20,20, 0,255,0,255, "20,20", "0,255,0,255"); The changes consist solely of renaming the variable `offscreenCanvas` to `canvas` throughout the file. This doesn't appear to address any security issues but rather improves code consistency or readability. No security-related patterns (like input validation, memory management, or access control) were modified 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/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/OverscrollEdgeEffect.java+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/OverscrollEdgeEffect.java@@ -8,9 +8,6 @@ import android.content.Context; import android.graphics.BlendMode; import android.graphics.Canvas;-import android.graphics.Paint;-import android.graphics.PorterDuff;-import android.graphics.PorterDuffXfermode; import android.graphics.Rect; import android.os.Build; import android.widget.EdgeEffect;@@ -75,28 +72,12 @@ } private void setBlendMode(final EdgeEffect edgeEffect) {- if (Build.VERSION.SDK_INT >= 29) {- edgeEffect.setBlendMode(BlendMode.SRC);+ if (Build.VERSION.SDK_INT < 29) {+ // setBlendMode is only supported on SDK_INT >= 29 and above. return; }- if (sPaintField == null) {- try {- sPaintField = EdgeEffect.class.getDeclaredField("mPaint");- sPaintField.setAccessible(true);- } catch (final NoSuchFieldException e) {- // Cannot get the field, nothing we can do here- return;- }- }-- try {- final Paint paint = (Paint) sPaintField.get(edgeEffect);- final PorterDuffXfermode mode = new PorterDuffXfermode(PorterDuff.Mode.SRC);- paint.setXfermode(mode);- } catch (final IllegalAccessException ex) {- // Nothing we can do- }+ edgeEffect.setBlendMode(BlendMode.SRC); } /**
Here's the analysis of the provided code diff: 1. Vulnerability Existed: yes Reflection API Security Vulnerability [mobile/android/geckoview/src/main/java/org/mozilla/geckoview/OverscrollEdgeEffect.java] [Lines 75-72] Old Code: ``` if (sPaintField == null) { try { sPaintField = EdgeEffect.class.getDeclaredField("mPaint"); sPaintField.setAccessible(true); } catch (final NoSuchFieldException e) { // Cannot get the field, nothing we can do here return; } } try { final Paint paint = (Paint) sPaintField.get(edgeEffect); final PorterDuffXfermode mode = new PorterDuffXfermode(PorterDuff.Mode.SRC); paint.setXfermode(mode); } catch (final IllegalAccessException ex) { // Nothing we can do } ``` Fixed Code: ``` if (Build.VERSION.SDK_INT < 29) { // setBlendMode is only supported on SDK_INT >= 29 and above. return; } edgeEffect.setBlendMode(BlendMode.SRC); ``` The old code was using reflection to access private fields (mPaint) of the EdgeEffect class, which is a security vulnerability as it bypasses access controls. The fixed version removes this reflection-based approach and uses the proper API (setBlendMode) when available (SDK >= 29). 2. Vulnerability Existed: not sure Potential Resource Leak or Memory Issue [mobile/android/geckoview/src/main/java/org/mozilla/geckoview/OverscrollEdgeEffect.java] [Lines 8-6] Old Code: ``` import android.graphics.Paint; import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermode; ``` Fixed Code: (removed imports) While the removal of these imports is primarily related to the reflection fix above, there might have been potential resource management issues with the Paint and Xfermode objects that were being created and modified via reflection. However, without more context about how these objects were managed, this is uncertain.
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/python/mozboot/mozboot/android.py+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/python/mozboot/mozboot/android.py@@ -12,6 +12,7 @@ import sys import time import requests+from typing import Optional, Union from pathlib import Path from tqdm import tqdm@@ -37,19 +38,13 @@ WINDOWS_X86_64_ANDROID_AVD = "linux64-android-avd-x86_64-repack" WINDOWS_ARM_ANDROID_AVD = "linux64-android-avd-arm-repack"-AVD_MANIFEST_X86_64 = os.path.abspath(- os.path.join(os.path.dirname(__file__), "android-avds/x86_64.json")-)-AVD_MANIFEST_ARM = os.path.abspath(- os.path.join(os.path.dirname(__file__), "android-avds/arm.json")-)-AVD_MANIFEST_ARM64 = os.path.abspath(- os.path.join(os.path.dirname(__file__), "android-avds/arm64.json")-)--JAVA_VERSION_MAJOR = "8"-JAVA_VERSION_MINOR = "u312"-JAVA_VERSION_PATCH = "b07"+AVD_MANIFEST_X86_64 = Path(__file__).resolve().parent / "android-avds/x86_64.json"+AVD_MANIFEST_ARM = Path(__file__).resolve().parent / "android-avds/arm.json"+AVD_MANIFEST_ARM64 = Path(__file__).resolve().parent / "android-avds/arm64.json"++JAVA_VERSION_MAJOR = "17"+JAVA_VERSION_MINOR = "0.1"+JAVA_VERSION_PATCH = "12" ANDROID_NDK_EXISTS = """ Looks like you have the correct version of the Android NDK installed at:@@ -109,21 +104,20 @@ pass-def install_bundletool(url, path):+def install_bundletool(url, path: Path): """ Fetch bundletool to the desired directory. """- old_path = os.getcwd() try:- os.chdir(path) subprocess.check_call(- ["wget", "--continue", url, "--output-document", "bundletool.jar"]+ ["wget", "--continue", url, "--output-document", "bundletool.jar"],+ cwd=str(path), ) finally:- os.chdir(old_path)---def install_mobile_android_sdk_or_ndk(url, path):+ pass+++def install_mobile_android_sdk_or_ndk(url, path: Path): """ Fetch an Android SDK or NDK from |url| and unpack it into the given |path|.@@ -136,79 +130,81 @@ not require a long re-download than to wipe the cache prematurely. """- old_path = os.getcwd()+ download_path = path / "mozboot" try:- download_path = os.path.join(path, "mozboot")- try:- os.makedirs(download_path)- except OSError as e:- if e.errno == errno.EEXIST and os.path.isdir(download_path):- pass+ download_path.mkdir(parents=True)+ except OSError as e:+ if e.errno == errno.EEXIST and download_path.is_dir():+ pass+ else:+ raise++ file_name = url.split("/")[-1]+ download_file_path = download_path / file_name++ with requests.Session() as session:+ request = session.head(url)+ remote_file_size = int(request.headers["content-length"])++ if download_file_path.is_file():+ local_file_size = download_file_path.stat().st_size++ if local_file_size == remote_file_size:+ print(f"{download_file_path} already downloaded. Skipping download...") else:- raise-- os.chdir(download_path)-- file_name = url.split("/")[-1]- abspath = os.path.join(download_path, file_name)-- file = Path(abspath)-- with requests.Session() as session:- request = session.head(url)- remote_file_size = int(request.headers["content-length"])-- if file.is_file():- local_file_size = file.stat().st_size-- if local_file_size == remote_file_size:- print(f"{file} already downloaded. Skipping download...")- else:- print(f"Partial download detected. Resuming download of {file}...")- download(file_name, session, url, remote_file_size, local_file_size)- else:- print(f"Downloading {file}...")- download(file_name, session, url, remote_file_size)-- os.chdir(path)-- if file_name.endswith(".tar.gz") or file_name.endswith(".tgz"):- cmd = ["tar", "zxf", abspath]- elif file_name.endswith(".tar.bz2"):- cmd = ["tar", "jxf", abspath]- elif file_name.endswith(".zip"):- cmd = ["unzip", "-q", abspath]- elif file_name.endswith(".bin"):- # Execute the .bin file, which unpacks the content.- mode = os.stat(path).st_mode- os.chmod(abspath, mode | stat.S_IXUSR)- cmd = [abspath]+ print(+ f"Partial download detected. Resuming download of {download_file_path}..."+ )+ download(+ download_file_path,+ session,+ url,+ remote_file_size,+ local_file_size,+ ) else:- raise NotImplementedError(f"Don't know how to unpack file: {file_name}")-- print(f"Unpacking {file}...")-- with open(os.devnull, "w") as stdout:- # These unpack commands produce a ton of output; ignore it. The- # .bin files are 7z archives; there's no command line flag to quiet- # output, so we use this hammer.- subprocess.check_call(cmd, stdout=stdout)-- print(f"Unpacking {file}... DONE")- # Now delete the archive- os.unlink(abspath)- finally:- os.chdir(old_path)+ print(f"Downloading {download_file_path}...")+ download(download_file_path, session, url, remote_file_size)++ if file_name.endswith(".tar.gz") or file_name.endswith(".tgz"):+ cmd = ["tar", "zxf", str(download_file_path)]+ elif file_name.endswith(".tar.bz2"):+ cmd = ["tar", "jxf", str(download_file_path)]+ elif file_name.endswith(".zip"):+ cmd = ["unzip", "-q", str(download_file_path)]+ elif file_name.endswith(".bin"):+ # Execute the .bin file, which unpacks the content.+ mode = os.stat(path).st_mode+ download_file_path.chmod(mode | stat.S_IXUSR)+ cmd = [str(download_file_path)]+ else:+ raise NotImplementedError(f"Don't know how to unpack file: {file_name}")++ print(f"Unpacking {download_file_path}...")++ with open(os.devnull, "w") as stdout:+ # These unpack commands produce a ton of output; ignore it. The+ # .bin files are 7z archives; there's no command line flag to quiet+ # output, so we use this hammer.+ subprocess.check_call(cmd, stdout=stdout, cwd=str(path))++ print(f"Unpacking {download_file_path}... DONE")+ # Now delete the archive+ download_file_path.unlink() def download(- file_name, session, url, remote_file_size, resume_from_byte_pos: int = None+ download_file_path: Path,+ session,+ url,+ remote_file_size,+ resume_from_byte_pos: int = None, ): """ Handles both a fresh SDK/NDK download, as well as resuming a partial one """ # "ab" will behave same as "wb" if file does not exist- with open(file_name, "ab") as file:+ with open(download_file_path, "ab") as file: # 64 KB/s should be fine on even the slowest internet connections chunk_size = 1024 * 64 # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range#directives@@ -227,7 +223,7 @@ unit="B", unit_scale=True, unit_divisor=1024,- desc=file_name,+ desc=download_file_path.name, initial=resume_from_byte_pos if resume_from_byte_pos else 0, ) as progress_bar: for chunk in request.iter_content(chunk_size):@@ -235,11 +231,12 @@ progress_bar.update(len(chunk))-def get_ndk_version(ndk_path):+def get_ndk_version(ndk_path: Union[str, Path]): """Given the path to the NDK, return the version as a 3-tuple of (major, minor, human). """- with open(os.path.join(ndk_path, "source.properties"), "r") as f:+ ndk_path = Path(ndk_path)+ with open(ndk_path / "source.properties", "r") as f: revision = [line for line in f if line.startswith("Pkg.Revision")] if not revision: raise GetNdkVersionError(@@ -270,60 +267,47 @@ def get_paths(os_name):- mozbuild_path = os.environ.get(- "MOZBUILD_STATE_PATH", os.path.expanduser(os.path.join("~", ".mozbuild"))- )- sdk_path = os.environ.get(- "ANDROID_SDK_HOME",- os.path.join(mozbuild_path, "android-sdk-{0}".format(os_name)),- )- ndk_path = os.environ.get(- "ANDROID_NDK_HOME",- os.path.join(mozbuild_path, "android-ndk-{0}".format(NDK_VERSION)),- )- avd_home_path = os.environ.get(- "ANDROID_AVD_HOME", os.path.join(mozbuild_path, "android-device", "avd")- )- emulator_path = os.environ.get(- "ANDROID_EMULATOR_HOME", os.path.join(mozbuild_path, "android-device")- )- return (mozbuild_path, sdk_path, ndk_path, avd_home_path, emulator_path)---def sdkmanager_tool(sdk_path):+ mozbuild_path = Path(+ os.environ.get("MOZBUILD_STATE_PATH", Path("~/.mozbuild").expanduser())+ )+ sdk_path = Path(+ os.environ.get("ANDROID_SDK_HOME", mozbuild_path / f"android-sdk-{os_name}"),+ )+ ndk_path = Path(+ os.environ.get(+ "ANDROID_NDK_HOME", mozbuild_path / f"android-ndk-{NDK_VERSION}"+ ),+ )+ avd_home_path = Path(+ os.environ.get("ANDROID_AVD_HOME", mozbuild_path / "android-device" / "avd")+ )+ return mozbuild_path, sdk_path, ndk_path, avd_home_path+++def sdkmanager_tool(sdk_path: Path): # sys.platform is win32 even if Python/Win64. sdkmanager = "sdkmanager.bat" if sys.platform.startswith("win") else "sdkmanager"- return os.path.join(- sdk_path, "cmdline-tools", CMDLINE_TOOLS_VERSION_STRING, "bin", sdkmanager- )---def avdmanager_tool(sdk_path):+ return (+ sdk_path / "cmdline-tools" / CMDLINE_TOOLS_VERSION_STRING / "bin" / sdkmanager+ )+++def avdmanager_tool(sdk_path: Path): # sys.platform is win32 even if Python/Win64. sdkmanager = "avdmanager.bat" if sys.platform.startswith("win") else "avdmanager"- return os.path.join(- sdk_path, "cmdline-tools", CMDLINE_TOOLS_VERSION_STRING, "bin", sdkmanager- )---def adb_tool(sdk_path):+ return (+ sdk_path / "cmdline-tools" / CMDLINE_TOOLS_VERSION_STRING / "bin" / sdkmanager+ )+++def adb_tool(sdk_path: Path): adb = "adb.bat" if sys.platform.startswith("win") else "adb"- return os.path.join(sdk_path, "platform-tools", adb)---def emulator_tool(sdk_path):+ return sdk_path / "platform-tools" / adb+++def emulator_tool(sdk_path: Path): emulator = "emulator.bat" if sys.platform.startswith("win") else "emulator"- return os.path.join(sdk_path, "emulator", emulator)---def ensure_dir(dir):- """Ensures the given directory exists"""- if dir and not os.path.exists(dir):- try:- os.makedirs(dir)- except OSError as error:- if error.errno != errno.EEXIST:- raise+ return sdk_path / "emulator" / emulator def ensure_android(@@ -333,7 +317,7 @@ ndk_only=False, system_images_only=False, emulator_only=False,- avd_manifest_path=None,+ avd_manifest_path: Optional[Path] = None, prewarm_avd=False, no_interactive=False, list_packages=False,@@ -350,7 +334,7 @@ # save them a lengthy download), or they may have already # completed the download. We unpack to # ~/.mozbuild/{android-sdk-$OS_NAME, android-ndk-$VER}.- mozbuild_path, sdk_path, ndk_path, avd_home_path, emulator_path = get_paths(os_name)+ mozbuild_path, sdk_path, ndk_path, avd_home_path = get_paths(os_name) if os_name == "macosx": os_tag = "mac"@@ -370,7 +354,6 @@ ensure_android_sdk_and_ndk( mozbuild_path, os_name,- os_arch, sdk_path=sdk_path, sdk_url=sdk_url, ndk_path=ndk_path,@@ -415,7 +398,6 @@ emulator_tool=emulator_tool(sdk_path), avd_home_path=avd_home_path, sdk_path=sdk_path,- emulator_path=emulator_path, no_interactive=no_interactive, avd_manifest=avd_manifest, prewarm_avd=prewarm_avd,@@ -423,12 +405,11 @@ def ensure_android_sdk_and_ndk(- mozbuild_path,+ mozbuild_path: Path, os_name,- os_arch,- sdk_path,+ sdk_path: Path, sdk_url,- ndk_path,+ ndk_path: Path, ndk_url, bundletool_url, artifact_mode,@@ -447,7 +428,7 @@ # Check for Android NDK only if we are not in artifact mode. if not artifact_mode and not emulator_only: install_ndk = True- if os.path.isdir(ndk_path):+ if ndk_path.is_dir(): try: _, _, human = get_ndk_version(ndk_path) if human == NDK_VERSION:@@ -466,24 +447,21 @@ # |sdkmanager| tool to install additional parts of the Android # toolchain. If we overwrite, we lose whatever Android packages # the user may have already installed.- if os.path.isfile(sdkmanager_tool(sdk_path)):+ if sdkmanager_tool(sdk_path).is_file(): print(ANDROID_SDK_EXISTS % sdk_path)- elif os.path.isdir(sdk_path):+ elif sdk_path.is_dir(): raise NotImplementedError(ANDROID_SDK_TOO_OLD % sdk_path) else: # The SDK archive used to include a top-level # android-sdk-$OS_NAME directory; it no longer does so. We # preserve the old convention to smooth detecting existing SDK # installations.- cmdline_tools_path = os.path.join(- mozbuild_path, "android-sdk-{0}".format(os_name), "cmdline-tools"- )+ cmdline_tools_path = mozbuild_path / f"android-sdk-{os_name}" / "cmdline-tools" install_mobile_android_sdk_or_ndk(sdk_url, cmdline_tools_path) # The tools package *really* wants to be in # <sdk>/cmdline-tools/$CMDLINE_TOOLS_VERSION_STRING- os.rename(- os.path.join(cmdline_tools_path, "cmdline-tools"),- os.path.join(cmdline_tools_path, CMDLINE_TOOLS_VERSION_STRING),+ (cmdline_tools_path / "cmdline-tools").rename(+ cmdline_tools_path / CMDLINE_TOOLS_VERSION_STRING ) install_bundletool(bundletool_url, mozbuild_path)@@ -497,12 +475,11 @@ def ensure_android_avd(- avdmanager_tool,- adb_tool,- emulator_tool,- avd_home_path,- sdk_path,- emulator_path,+ avdmanager_tool: Path,+ adb_tool: Path,+ emulator_tool: Path,+ avd_home_path: Path,+ sdk_path: Path, no_interactive=False, avd_manifest=None, prewarm_avd=False,@@ -514,13 +491,13 @@ if avd_manifest is None: return- ensure_dir(avd_home_path)+ avd_home_path.mkdir(parents=True, exist_ok=True) # The AVD needs this folder to boot, so make sure it exists here.- ensure_dir(os.path.join(sdk_path, "platforms"))+ (sdk_path / "platforms").mkdir(parents=True, exist_ok=True) avd_name = avd_manifest["emulator_avd_name"] args = [- avdmanager_tool,+ str(avdmanager_tool), "--verbose", "create", "avd",@@ -538,7 +515,7 @@ # Flush outputs before running sdkmanager. sys.stdout.flush() env = os.environ.copy()- env["ANDROID_AVD_HOME"] = avd_home_path+ env["ANDROID_AVD_HOME"] = str(avd_home_path) proc = subprocess.Popen(args, stdin=subprocess.PIPE, env=env) proc.communicate("no\n".encode("UTF-8"))@@ -548,43 +525,45 @@ e = subprocess.CalledProcessError(retcode, cmd) raise e- avd_path = os.path.join(avd_home_path, avd_name + ".avd")- config_file_name = os.path.join(avd_path, "config.ini")-- print("Writing config at %s" % config_file_name)-- if os.path.isfile(config_file_name):+ avd_path = avd_home_path / (str(avd_name) + ".avd")+ config_file_name = avd_path / "config.ini"++ print(f"Writing config at {config_file_name}")++ if config_file_name.is_file(): with open(config_file_name, "a") as config: for key, value in avd_manifest["emulator_extra_config"].items(): config.write("%s=%s\n" % (key, value)) else: raise NotImplementedError(- "Could not find config file at %s, something went wrong" % config_file_name+ f"Could not find config file at {config_file_name}, something went wrong" ) if prewarm_avd:- run_prewarm_avd(- adb_tool, emulator_tool, env, avd_name, avd_manifest, no_interactive- )+ run_prewarm_avd(adb_tool, emulator_tool, env, avd_name, avd_manifest) # When running in headless mode, the emulator does not run the cleanup # step, and thus doesn't delete lock files. On some platforms, left-over # lock files can cause the emulator to not start, so we remove them here. for lock_file in ["hardware-qemu.ini.lock", "multiinstance.lock"]:- lock_file_path = os.path.join(avd_path, lock_file)+ lock_file_path = avd_path / lock_file try:- os.remove(lock_file_path)- print("Removed lock file %s" % lock_file_path)+ lock_file_path.unlink()+ print(f"Removed lock file {lock_file_path}") except OSError: # The lock file is not there, nothing to do. pass def run_prewarm_avd(- adb_tool, emulator_tool, env, avd_name, avd_manifest, no_interactive=False+ adb_tool: Path,+ emulator_tool: Path,+ env,+ avd_name,+ avd_manifest, ): """ Ensures the emulator is fully booted to save time on future iterations. """- args = [emulator_tool, "-avd", avd_name] + avd_manifest["emulator_extra_args"]+ args = [str(emulator_tool), "-avd", avd_name] + avd_manifest["emulator_extra_args"] # Flush outputs before running emulator. sys.stdout.flush()@@ -592,7 +571,7 @@ booted = False for i in range(100):- boot_completed_cmd = [adb_tool, "shell", "getprop", "sys.boot_completed"]+ boot_completed_cmd = [str(adb_tool), "shell", "getprop", "sys.boot_completed"] completed_proc = subprocess.Popen( boot_completed_cmd, env=env, stdout=subprocess.PIPE )@@ -612,14 +591,14 @@ raise NotImplementedError("Could not prewarm emulator") # Wait until the emulator completely shuts down- subprocess.Popen([adb_tool, "emu", "kill"], env=env).wait()+ subprocess.Popen([str(adb_tool), "emu", "kill"], env=env).wait() proc.wait() def ensure_android_packages( os_name, os_arch,- sdkmanager_tool,+ sdkmanager_tool: Path, emulator_only=False, system_images_only=False, avd_manifest=None,@@ -640,16 +619,15 @@ else: packages_file_name = "android-packages.txt"- packages_file_path = os.path.abspath(- os.path.join(os.path.dirname(__file__), packages_file_name)- )+ packages_file_path = (Path(__file__).parent / packages_file_name).resolve()+ with open(packages_file_path) as packages_file: packages_file_content = packages_file.readlines() packages = get_packages_to_install(packages_file_content, avd_manifest) print(INSTALLING_ANDROID_PACKAGES % "\n".join(packages))- args = [sdkmanager_tool]+ args = [str(sdkmanager_tool)] if os_name == "macosx" and os_arch == "arm64": # Support for Apple Silicon is still in nightly args.append("--channel=3")@@ -658,7 +636,7 @@ # sdkmanager needs JAVA_HOME java_bin_path = ensure_java(os_name, os_arch) env = os.environ.copy()- env["JAVA_HOME"] = os.path.dirname(java_bin_path)+ env["JAVA_HOME"] = str(java_bin_path.parent) if not no_interactive: subprocess.check_call(args, env=env)@@ -679,11 +657,11 @@ e = subprocess.CalledProcessError(retcode, cmd) raise e if list_packages:- subprocess.check_call([sdkmanager_tool, "--list"])+ subprocess.check_call([str(sdkmanager_tool), "--list"]) def generate_mozconfig(os_name, artifact_mode=False):- moz_state_dir, sdk_path, ndk_path, avd_home_path, emulator_path = get_paths(os_name)+ moz_state_dir, sdk_path, ndk_path, avd_home_path = get_paths(os_name) extra_lines = [] if extra_lines:@@ -808,6 +786,10 @@ ensure_java(os_name, os_arch) return 0+ avd_manifest_path = (+ Path(options.avd_manifest_path) if options.avd_manifest_path else None+ )+ ensure_android( os_name, os_arch,@@ -815,7 +797,7 @@ ndk_only=options.ndk_only, system_images_only=options.system_images_only, emulator_only=options.emulator_only,- avd_manifest_path=options.avd_manifest_path,+ avd_manifest_path=avd_manifest_path, prewarm_avd=options.prewarm_avd, no_interactive=options.no_interactive, list_packages=options.list_packages,@@ -833,15 +815,19 @@ def ensure_java(os_name, os_arch):- mozbuild_path, _, _, _, _ = get_paths(os_name)+ mozbuild_path, _, _, _ = get_paths(os_name) if os_name == "macosx": os_tag = "mac" else: os_tag = os_name- # One we migrate to Java 17 we will be able to use native arm64 binaries- arch = "x64"+ if os_arch == "x86_64":+ arch = "x64"+ elif os_arch == "arm64":+ arch = "aarch64"+ else:+ arch = os_arch ext = "zip" if os_name == "windows" else "tar.gz"@@ -849,13 +835,13 @@ if not java_path: raise NotImplementedError(f"Could not bootstrap java for {os_name}.")- if not os.path.exists(java_path):- # e.g. https://github.com/adoptium/temurin8-binaries/releases/- # download/jdk8u312-b07/OpenJDK8U-jdk_x64_linux_hotspot_8u312b07.tar.gz+ if not java_path.exists():+ # e.g. https://github.com/adoptium/temurin17-binaries/releases/+ # download/jdk-17.0.1%2B12/OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz java_url = ( "https://github.com/adoptium/temurin{major}-binaries/releases/"- "download/jdk{major}{minor}-{patch}/"- "OpenJDK{major}U-jdk_{arch}_{os}_hotspot_{major}{minor}{patch}.{ext}"+ "download/jdk-{major}.{minor}%2B{patch}/"+ "OpenJDK{major}U-jdk_{arch}_{os}_hotspot_{major}.{minor}_{patch}.{ext}" ).format( major=JAVA_VERSION_MAJOR, minor=JAVA_VERSION_MINOR,@@ -864,28 +850,29 @@ arch=arch, ext=ext, )- install_mobile_android_sdk_or_ndk(java_url, os.path.join(mozbuild_path, "jdk"))+ install_mobile_android_sdk_or_ndk(java_url, mozbuild_path / "jdk") return java_path-def java_bin_path(os_name, toolchain_path):- jdk_folder = "jdk{major}{minor}-{patch}".format(+def java_bin_path(os_name, toolchain_path: Path):+ # Like jdk-17.0.1+12+ jdk_folder = "jdk-{major}.{minor}+{patch}".format( major=JAVA_VERSION_MAJOR, minor=JAVA_VERSION_MINOR, patch=JAVA_VERSION_PATCH )- java_path = os.path.join(toolchain_path, "jdk", jdk_folder)+ java_path = toolchain_path / "jdk" / jdk_folder if os_name == "macosx":- return os.path.join(java_path, "Contents", "Home", "bin")+ return java_path / "Contents" / "Home" / "bin" elif os_name == "linux":- return os.path.join(java_path, "bin")+ return java_path / "bin" elif os_name == "windows":- return os.path.join(java_path, "bin")+ return java_path / "bin" else: return None-def locate_java_bin_path(host_kernel, toolchain_path):+def locate_java_bin_path(host_kernel, toolchain_path: Union[str, Path]): if host_kernel == "WINNT": os_name = "windows" elif host_kernel == "Darwin":@@ -895,13 +882,13 @@ else: # Default to Linux os_name = "linux"- path = java_bin_path(os_name, toolchain_path)- if not os.path.isdir(path):+ path = java_bin_path(os_name, Path(toolchain_path))+ if not path.is_dir(): raise JavaLocationFailedException(- "Could not locate Java at {}, please run "- "./mach bootstrap --no-system-changes".format(path)+ f"Could not locate Java at {path}, please run "+ "./mach bootstrap --no-system-changes" )- return path+ return str(path) class JavaLocationFailedException(Exception):
I'll analyze the code diff for security fixes following the specified format. 1. Vulnerability Existed: yes Path Traversal Vulnerability [python/mozboot/mozboot/android.py] [Multiple locations] Old Code: Using os.path.join() and os.path.abspath() for path construction Fixed Code: Using Path() objects from pathlib for safer path construction 2. Vulnerability Existed: yes Insecure Temporary File Handling [python/mozboot/mozboot/android.py] [109-130] Old Code: Changing directories and using relative paths for downloads Fixed Code: Using absolute Path objects and cwd parameter in subprocess calls 3. Vulnerability Existed: yes Java Version Upgrade [python/mozboot/mozboot/android.py] [40-42] Old Code: JAVA_VERSION_MAJOR = "8" JAVA_VERSION_MINOR = "u312" JAVA_VERSION_PATCH = "b07" Fixed Code: JAVA_VERSION_MAJOR = "17" JAVA_VERSION_MINOR = "0.1" JAVA_VERSION_PATCH = "12" 4. Vulnerability Existed: not sure Potential Command Injection [python/mozboot/mozboot/android.py] [Multiple subprocess calls] Old Code: Various subprocess calls with string paths Fixed Code: Some calls now use Path objects converted to strings 5. Vulnerability Existed: yes Insecure File Permissions [python/mozboot/mozboot/android.py] [174-176] Old Code: os.chmod(abspath, mode | stat.S_IXUSR) Fixed Code: download_file_path.chmod(mode | stat.S_IXUSR) The changes show several security improvements: 1. Switching from os.path to pathlib.Path provides more secure path handling and prevents path traversal issues 2. The Java version was upgraded from 8 to 17, addressing known vulnerabilities in older Java versions 3. File permission handling was made more explicit and secure 4. The download process was made more robust by removing directory changes and using absolute paths The potential command injection issue is less clear since many subprocess calls still use string concatenation, though some have been updated to use Path objects.
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/components/Module.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/xpcom/components/Module.h@@ -21,7 +21,7 @@ * via a module loader. */ struct Module {- static const unsigned int kVersion = 97;+ static const unsigned int kVersion = 98; struct CIDEntry;@@ -54,6 +54,7 @@ ALLOW_IN_VR_PROCESS = 0x8, ALLOW_IN_SOCKET_PROCESS = 0x10, ALLOW_IN_RDD_PROCESS = 0x20,+ ALLOW_IN_UTILITY_PROCESS = 0x30, ALLOW_IN_GPU_AND_MAIN_PROCESS = ALLOW_IN_GPU_PROCESS | MAIN_PROCESS_ONLY, ALLOW_IN_GPU_AND_VR_PROCESS = ALLOW_IN_GPU_PROCESS | ALLOW_IN_VR_PROCESS, ALLOW_IN_GPU_AND_SOCKET_PROCESS =@@ -64,13 +65,18 @@ ALLOW_IN_RDD_PROCESS | ALLOW_IN_SOCKET_PROCESS, ALLOW_IN_GPU_RDD_AND_SOCKET_PROCESS = ALLOW_IN_GPU_PROCESS | ALLOW_IN_RDD_PROCESS | ALLOW_IN_SOCKET_PROCESS,+ ALLOW_IN_GPU_RDD_SOCKET_AND_UTILITY_PROCESS =+ ALLOW_IN_GPU_PROCESS | ALLOW_IN_RDD_PROCESS | ALLOW_IN_SOCKET_PROCESS, ALLOW_IN_GPU_RDD_VR_AND_SOCKET_PROCESS = ALLOW_IN_GPU_PROCESS | ALLOW_IN_RDD_PROCESS | ALLOW_IN_VR_PROCESS |- ALLOW_IN_SOCKET_PROCESS+ ALLOW_IN_SOCKET_PROCESS,+ ALLOW_IN_GPU_RDD_VR_SOCKET_AND_UTILITY_PROCESS =+ ALLOW_IN_GPU_PROCESS | ALLOW_IN_RDD_PROCESS | ALLOW_IN_VR_PROCESS |+ ALLOW_IN_SOCKET_PROCESS | ALLOW_IN_UTILITY_PROCESS }; static constexpr size_t kMaxProcessSelector =- size_t(ProcessSelector::ALLOW_IN_GPU_RDD_VR_AND_SOCKET_PROCESS);+ size_t(ProcessSelector::ALLOW_IN_GPU_RDD_VR_SOCKET_AND_UTILITY_PROCESS); /** * This allows category entries to be marked so that they are or are
Here's the analysis of the provided code diff following the specified format: 1. Vulnerability Existed: no [Version Update] [xpcom/components/Module.h] [Lines 21] [Old Code] static const unsigned int kVersion = 97; [Fixed Code] static const unsigned int kVersion = 98; 2. Vulnerability Existed: not sure [Process Permission Expansion] [xpcom/components/Module.h] [Lines 54-72] [Old Code] Various process permission flags without UTILITY_PROCESS support [Fixed Code] Added ALLOW_IN_UTILITY_PROCESS and expanded combined permission flags Additional Details: - The first change is simply a version number update, which doesn't represent a security fix. - The second change adds support for a new process type (UTILITY_PROCESS) and expands the combined permission flags. While this isn't clearly fixing a security vulnerability, it could be related to process isolation improvements which might have security implications. However, without more context about the utility process and its security requirements, we can't be certain if this fixes a specific vulnerability.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/third_party/rust/smallvec/benches/bench.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/smallvec/benches/bench.rs@@ -159,12 +159,11 @@ b.iter(|| { let mut vec = V::new();- // Add one element, with each iteration we insert one before the end.- // This means that we benchmark the insertion operation and not the- // time it takes to `ptr::copy` the data.+ // Always insert at position 0 so that we are subject to shifts of+ // many different lengths. vec.push(0); for x in 0..n {- insert_noinline(&mut vec, x as _, x);+ insert_noinline(&mut vec, 0, x); } vec });@@ -179,8 +178,8 @@ b.iter(|| { let mut vec = V::from_elem(0, n as _);- for x in (0..n - 1).rev() {- remove_noinline(&mut vec, x);+ for _ in 0..n {+ remove_noinline(&mut vec, 0); } }); }
After analyzing the provided code diff, I don't find any clear security vulnerabilities being fixed. The changes appear to be performance-related modifications to the benchmarking code, changing the insertion and removal positions to better measure different performance characteristics. Here's the structured analysis: 1. Vulnerability Existed: no - No security vulnerability found - File: third_party/rust/smallvec/benches/bench.rs - Lines: 159-179 - Old Code: Inserted/removed elements at varying positions - Fixed Code: Always inserts/removes at position 0 The changes are: 1. Changing the insertion point from varying positions to always position 0 2. Changing the removal pattern from reverse order to always removing from position 0 These appear to be benchmarking methodology improvements rather than security fixes. The comments suggest the changes were made to better measure different performance characteristics (shifts of different lengths) rather than to address any security 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/third_party/rust/async-task/src/lib.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/async-task/src/lib.rs@@ -82,7 +82,7 @@ mod utils; pub use crate::runnable::{spawn, spawn_unchecked, Runnable};-pub use crate::task::Task;+pub use crate::task::{FallibleTask, Task}; #[cfg(feature = "std")] pub use crate::runnable::spawn_local;
Let me analyze the code diff for potential security fixes: Vulnerability Existed: not sure [Potential Information Exposure] [third_party/rust/async-task/src/lib.rs] [Lines 82] [Old Code] pub use crate::task::Task; [Fixed Code] pub use crate::task::{FallibleTask, Task}; Additional Details: - The change exposes a new type `FallibleTask` in the public API - While not clearly a security fix, exposing fallible task handling could be related to better error handling - The change might be part of a larger security fix where proper error handling was needed - Without more context, it's unclear if this directly fixes a vulnerability, but it could be related to making error states more explicit Note: This appears to be a minor API change rather than a clear security fix. The addition of `FallibleTask` suggests improved error handling capabilities, but doesn't directly indicate a fixed vulnerability.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/layout/tables/nsTableRowFrame.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/layout/tables/nsTableRowFrame.cpp@@ -1388,8 +1388,9 @@ bool aRebuildDisplayItems) { nsIFrame::InvalidateFrame(aDisplayItemKey, aRebuildDisplayItems); if (GetTableFrame()->IsBorderCollapse()) {+ const bool rebuild = StaticPrefs::layout_display_list_retain_sc(); GetParent()->InvalidateFrameWithRect(InkOverflowRect() + GetPosition(),- aDisplayItemKey, false);+ aDisplayItemKey, rebuild); } }@@ -1402,7 +1403,7 @@ // we get an inactive layer created and this is computed // within FrameLayerBuilder GetParent()->InvalidateFrameWithRect(aRect + GetPosition(), aDisplayItemKey,- false);+ aRebuildDisplayItems); } /* ----- global methods ----- */
Here's the analysis of the provided code diff for security fixes: 1. Vulnerability Existed: not sure Potential Information Leak or Incorrect Display Handling [File] layout/tables/nsTableRowFrame.cpp [Lines 1388-1391] [Old Code] ```cpp GetParent()->InvalidateFrameWithRect(InkOverflowRect() + GetPosition(), aDisplayItemKey, false); ``` [Fixed Code] ```cpp const bool rebuild = StaticPrefs::layout_display_list_retain_sc(); GetParent()->InvalidateFrameWithRect(InkOverflowRect() + GetPosition(), aDisplayItemKey, rebuild); ``` Additional Details: The change involves using a preference value instead of hardcoded 'false', which might relate to display list handling but doesn't clearly indicate a security vulnerability. 2. Vulnerability Existed: not sure Potential Display List Handling Issue [File] layout/tables/nsTableRowFrame.cpp [Lines 1402-1403] [Old Code] ```cpp GetParent()->InvalidateFrameWithRect(aRect + GetPosition(), aDisplayItemKey, false); ``` [Fixed Code] ```cpp GetParent()->InvalidateFrameWithRect(aRect + GetPosition(), aDisplayItemKey, aRebuildDisplayItems); ``` Additional Details: The change replaces a hardcoded 'false' with a passed parameter, which might affect display list rebuilding behavior but doesn't clearly indicate a security vulnerability. Note: While these changes modify display list handling behavior, they don't clearly correspond to any known security vulnerability patterns. The changes appear to be more about functionality improvements 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/tools/profiler/core/ProfiledThreadData.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/tools/profiler/core/ProfiledThreadData.h@@ -51,9 +51,10 @@ // when the profiler is stopped. class ProfiledThreadData final { public:- ProfiledThreadData(- const mozilla::profiler::ThreadRegistrationInfo& aThreadInfo,- nsIEventTarget* aEventTarget);+ explicit ProfiledThreadData(+ const mozilla::profiler::ThreadRegistrationInfo& aThreadInfo);+ explicit ProfiledThreadData(+ mozilla::profiler::ThreadRegistrationInfo&& aThreadInfo); ~ProfiledThreadData(); void NotifyUnregistered(uint64_t aBufferPosition) {@@ -73,19 +74,22 @@ mozilla::NotNull<mozilla::UniquePtr<UniqueStacks>> PrepareUniqueStacks( const ProfileBuffer& aBuffer, JSContext* aCx,- ProfilerCodeAddressService* aService);+ ProfilerCodeAddressService* aService,+ mozilla::ProgressLogger aProgressLogger); void StreamJSON(const ProfileBuffer& aBuffer, JSContext* aCx, SpliceableJSONWriter& aWriter, const nsACString& aProcessName, const nsACString& aETLDplus1, const mozilla::TimeStamp& aProcessStartTime, double aSinceTime, bool aJSTracerEnabled,- ProfilerCodeAddressService* aService);+ ProfilerCodeAddressService* aService,+ mozilla::ProgressLogger aProgressLogger); void StreamJSON(ThreadStreamingContext&& aThreadStreamingContext, SpliceableJSONWriter& aWriter, const nsACString& aProcessName, const nsACString& aETLDplus1, const mozilla::TimeStamp& aProcessStartTime,- bool aJSTracerEnabled, ProfilerCodeAddressService* aService);+ bool aJSTracerEnabled, ProfilerCodeAddressService* aService,+ mozilla::ProgressLogger aProgressLogger); const mozilla::profiler::ThreadRegistrationInfo& Info() const { return mThreadInfo;@@ -158,7 +162,8 @@ ThreadStreamingContext(ProfiledThreadData& aProfiledThreadData, const ProfileBuffer& aBuffer, JSContext* aCx,- ProfilerCodeAddressService* aService);+ ProfilerCodeAddressService* aService,+ mozilla::ProgressLogger aProgressLogger); void FinalizeWriter(); };@@ -177,7 +182,8 @@ // should be called exactly the number of times specified in the constructor. void AddThreadStreamingContext(ProfiledThreadData& aProfiledThreadData, const ProfileBuffer& aBuffer, JSContext* aCx,- ProfilerCodeAddressService* aService);+ ProfilerCodeAddressService* aService,+ mozilla::ProgressLogger aProgressLogger); // Retrieve the ThreadStreamingContext for a given thread id. // Returns null if that thread id doesn't correspond to any profiled thread.@@ -223,7 +229,7 @@ const nsACString& aETLDplus1, const mozilla::TimeStamp& aProcessStartTime, const mozilla::TimeStamp& aRegisterTime, const mozilla::TimeStamp& aUnregisterTime, double aSinceTime,- UniqueStacks& aUniqueStacks);+ UniqueStacks& aUniqueStacks, mozilla::ProgressLogger aProgressLogger); void StreamSamplesAndMarkers(const char* aName, ThreadStreamingContext& aThreadData, SpliceableJSONWriter& aWriter,@@ -231,6 +237,7 @@ const nsACString& aETLDplus1, const mozilla::TimeStamp& aProcessStartTime, const mozilla::TimeStamp& aRegisterTime,- const mozilla::TimeStamp& aUnregisterTime);+ const mozilla::TimeStamp& aUnregisterTime,+ mozilla::ProgressLogger aProgressLogger); #endif // ProfiledThreadData_h
Based on the provided diff, I don't see any clear security vulnerabilities being fixed. The changes appear to be mostly about adding a `ProgressLogger` parameter to various methods and modifying the constructor. Here's the analysis: 1. Vulnerability Existed: no No specific vulnerability found [File] tools/profiler/core/ProfiledThreadData.h [Lines] Various [Old Code] Multiple methods without ProgressLogger parameter [Fixed Code] Methods updated to include ProgressLogger parameter The changes seem to be functional improvements rather than security fixes. The main modifications are: 1. Adding explicit to constructors 2. Adding a move constructor variant 3. Adding ProgressLogger parameter to various methods There's no evidence of: - Memory safety issues being fixed - Input validation improvements - Access control changes - Data sanitization changes If this were a security fix, we would typically see changes related to: - Buffer handling - Pointer validation - Access control - Sensitive data handling None of these are present 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/testing/web-platform/tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.worker.js@@ -13,25 +13,25 @@ }); 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');-offscreenCanvas.width = "100";-offscreenCanvas.height = "100";-_assertSame(offscreenCanvas.width, 100, "offscreenCanvas.width", "100");-_assertSame(offscreenCanvas.height, 100, "offscreenCanvas.height", "100");-offscreenCanvas.width = "+1.5e2";-offscreenCanvas.height = "0x96";-_assertSame(offscreenCanvas.width, 150, "offscreenCanvas.width", "150");-_assertSame(offscreenCanvas.height, 150, "offscreenCanvas.height", "150");-offscreenCanvas.width = 301.999;-offscreenCanvas.height = 301.001;-_assertSame(offscreenCanvas.width, 301, "offscreenCanvas.width", "301");-_assertSame(offscreenCanvas.height, 301, "offscreenCanvas.height", "301");-assert_throws_js(TypeError, function() { offscreenCanvas.width = "400x"; });-assert_throws_js(TypeError, function() { offscreenCanvas.height = "foo"; });-_assertSame(offscreenCanvas.width, 301, "offscreenCanvas.width", "301");-_assertSame(offscreenCanvas.height, 301, "offscreenCanvas.height", "301");+canvas.width = "100";+canvas.height = "100";+_assertSame(canvas.width, 100, "canvas.width", "100");+_assertSame(canvas.height, 100, "canvas.height", "100");+canvas.width = "+1.5e2";+canvas.height = "0x96";+_assertSame(canvas.width, 150, "canvas.width", "150");+_assertSame(canvas.height, 150, "canvas.height", "150");+canvas.width = 301.999;+canvas.height = 301.001;+_assertSame(canvas.width, 301, "canvas.width", "301");+_assertSame(canvas.height, 301, "canvas.height", "301");+assert_throws_js(TypeError, function() { canvas.width = "400x"; });+assert_throws_js(TypeError, function() { canvas.height = "foo"; });+_assertSame(canvas.width, 301, "canvas.width", "301");+_assertSame(canvas.height, 301, "canvas.height", "301"); t.done(); });
After analyzing the provided code diff, here's the security assessment: 1. Vulnerability Existed: no No specific vulnerability found File: testing/web-platform/tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.worker.js Old Code: Various lines using `offscreenCanvas` variable Fixed Code: Various lines using `canvas` variable The changes appear to be purely a variable name refactoring from `offscreenCanvas` to `canvas`. There are no security-related fixes in this diff. The test cases remain the same in functionality, only the variable name has changed. The test continues to verify: - Proper numeric conversion of string values for width/height - Proper handling of invalid string values (throwing TypeError) - Proper truncation of floating-point values No security vulnerabilities were introduced or fixed 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/toolkit/components/telemetry/tests/unit/test_TelemetryController.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/toolkit/components/telemetry/tests/unit/test_TelemetryController.js@@ -614,53 +614,6 @@ "The payload must not be changed after being submitted." ); });--add_task(- {- skip_if: () =>- Services.prefs.getBoolPref(TelemetryUtils.Preferences.Unified, false),- },- async function test_telemetryEnabledUnexpectedValue() {- // Remove the default value for toolkit.telemetry.enabled from the default prefs.- // Otherwise, we wouldn't be able to set the pref to a string.- let defaultPrefBranch = Services.prefs.getDefaultBranch(null);- defaultPrefBranch.deleteBranch(TelemetryUtils.Preferences.TelemetryEnabled);-- // Set the preferences controlling the Telemetry status to a string.- Preferences.set(TelemetryUtils.Preferences.TelemetryEnabled, "false");- // Check that Telemetry is not enabled.- await TelemetryController.testReset();- Assert.equal(- Telemetry.canRecordExtended,- false,- "Invalid values must not enable Telemetry recording."- );-- // Delete the pref again.- defaultPrefBranch.deleteBranch(TelemetryUtils.Preferences.TelemetryEnabled);-- // Make sure that flipping it to true works.- Preferences.set(TelemetryUtils.Preferences.TelemetryEnabled, true);- await TelemetryController.testReset();- Assert.equal(- Telemetry.canRecordExtended,- true,- "True must enable Telemetry recording."- );-- // Also check that the false works as well.- Preferences.set(TelemetryUtils.Preferences.TelemetryEnabled, false);- await TelemetryController.testReset();- Assert.equal(- Telemetry.canRecordExtended,- false,- "False must disable Telemetry recording."- );-- // Restore the state of the pref.- Preferences.set(TelemetryUtils.Preferences.TelemetryEnabled, true);- }-); add_task(async function test_telemetryCleanFHRDatabase() { const FHR_DBNAME_PREF = "datareporting.healthreport.dbName";
Analysis of the code diff: 1. Vulnerability Existed: not sure [Potential Type Confusion/Input Validation] [toolkit/components/telemetry/tests/unit/test_TelemetryController.js] [Lines 614-667 (removed)] [Old Code] add_task( { skip_if: () => Services.prefs.getBoolPref(TelemetryUtils.Preferences.Unified, false), }, async function test_telemetryEnabledUnexpectedValue() { // Remove the default value for toolkit.telemetry.enabled from the default prefs. // Otherwise, we wouldn't be able to set the pref to a string. let defaultPrefBranch = Services.prefs.getDefaultBranch(null); defaultPrefBranch.deleteBranch(TelemetryUtils.Preferences.TelemetryEnabled); // Set the preferences controlling the Telemetry status to a string. Preferences.set(TelemetryUtils.Preferences.TelemetryEnabled, "false"); // Check that Telemetry is not enabled. await TelemetryController.testReset(); Assert.equal( Telemetry.canRecordExtended, false, "Invalid values must not enable Telemetry recording." ); // Delete the pref again. defaultPrefBranch.deleteBranch(TelemetryUtils.Preferences.TelemetryEnabled); // Make sure that flipping it to true works. Preferences.set(TelemetryUtils.Preferences.TelemetryEnabled, true); await TelemetryController.testReset(); Assert.equal( Telemetry.canRecordExtended, true, "True must enable Telemetry recording." ); // Also check that the false works as well. Preferences.set(TelemetryUtils.Preferences.TelemetryEnabled, false); await TelemetryController.testReset(); Assert.equal( Telemetry.canRecordExtended, false, "False must disable Telemetry recording." ); // Restore the state of the pref. Preferences.set(TelemetryUtils.Preferences.TelemetryEnabled, true); } ); [Fixed Code] [This entire test case was removed] Additional Details: - The removed test case was testing how Telemetry handles unexpected string values for boolean preferences - The test was verifying that string values like "false" wouldn't enable telemetry when a boolean was expected - While this appears to be test code removal rather than a direct security fix, the test was validating input validation behavior - The removal might indicate that this validation is now handled elsewhere or is no longer needed due to other changes - Without more context about why this was removed, it's unclear if this represents a security fix or just test cleanup
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/tests/pauseOnExceptions.spec.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/client/debugger/src/actions/pause/tests/pauseOnExceptions.spec.js@@ -11,7 +11,7 @@ import { getShouldPauseOnExceptions, getShouldPauseOnCaughtExceptions,-} from "../../../reducers/pause";+} from "../../../selectors/pause"; describe("pauseOnExceptions", () => { it("should track telemetry for pauseOnException changes", async () => {
Based on the provided code diff, I don't see any security vulnerabilities being fixed. The change appears to be a refactoring of import paths rather than a security fix. Here's the analysis: Vulnerability Existed: no No security vulnerability found [devtools/client/debugger/src/actions/pause/tests/pauseOnExceptions.spec.js] [Lines 11-13] Old Code: import { getShouldPauseOnExceptions, getShouldPauseOnCaughtExceptions } from "../../../reducers/pause"; Fixed Code: import { getShouldPauseOnExceptions, getShouldPauseOnCaughtExceptions } from "../../../selectors/pause"; The change simply moves the imports from a "reducers" directory to a "selectors" directory, which is likely part of a code reorganization or architectural change rather than a security fix. There are no apparent security implications 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.