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/third_party/rust/warp/src/filter/mod.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/warp/src/filter/mod.rs@@ -177,7 +177,7 @@ /// /// Even worse, the tuples would shuffle the types around depending on /// the exact invocation of `and`s. So, `unit.and(int).and(int)` would- /// result in a different extracted type from `unit.and(int.and(int)`,+ /// result in a different extracted type from `unit.and(int.and(int))`, /// or from `int.and(unit).and(int)`. If you changed around the order /// of filters, while still having them be semantically equivalent, you'd /// need to update all your `map`s as well.
Analyzing the provided code diff: 1. Vulnerability Existed: no [Typo Fix] [third_party/rust/warp/src/filter/mod.rs] [Lines 177] Old Code: `result in a different extracted type from `unit.and(int.and(int)`, Fixed Code: `result in a different extracted type from `unit.and(int.and(int))`, Additional Details: - This appears to be a simple typo fix (missing closing parenthesis) in a documentation comment - No security vulnerability is being addressed here - The change improves code/documentation accuracy but doesn't relate to security No other vulnerabilities or potential security issues are apparent 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/css/css-shapes/shape-outside/shape-box/shape-outside-margin-box-border-radius-002.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-shapes/shape-outside/shape-box/shape-outside-margin-box-border-radius-002.html@@ -9,7 +9,6 @@ <link rel="author" title="Mozilla" href="http://www.mozilla.org/"> <link rel="help" href="https://drafts.csswg.org/css-shapes-1/#shapes-from-box-values"> <link rel="match" href="reference/shape-outside-margin-box-border-radius-002-ref.html">- <meta name="flags" content=""> <meta name="assert" content="Test the boxes are wrapping around the left float shape defined by the margin-box and border-radius value."> <style> .container {
Based on the provided code diff, I don't see any security vulnerabilities being fixed. The change appears to be a simple removal of an empty meta tag for flags, which doesn't have security implications. Answer: Vulnerability Existed: no No security vulnerability found in this diff. The change is a minor HTML cleanup removing an empty meta tag. Additional Notes: - The diff shows removal of `<meta name="flags" content="">` which was likely unnecessary in the test file - No security-related changes are visible in this diff - The modification appears to be purely cosmetic/cleanup related
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/extensions/parent/ext-userScripts.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/toolkit/components/extensions/parent/ext-userScripts.js@@ -48,7 +48,17 @@ userScriptOptions: { scriptMetadata: details.scriptMetadata, },+ originAttributesPatterns: null, };++ if (details.cookieStoreId != null) {+ const cookieStoreIds = Array.isArray(details.cookieStoreId)+ ? details.cookieStoreId+ : [details.cookieStoreId];+ options.originAttributesPatterns = cookieStoreIds.map(cookieStoreId =>+ getOriginAttributesPatternForCookieStoreId(cookieStoreId)+ );+ } return options; }
Here's the analysis of the provided code diff: 1. Vulnerability Existed: not sure [Potential Origin Attributes Misconfiguration] [File: toolkit/components/extensions/parent/ext-userScripts.js] [Lines: 48-58] [Old Code] ```javascript userScriptOptions: { scriptMetadata: details.scriptMetadata, }, ``` [Fixed Code] ```javascript userScriptOptions: { scriptMetadata: details.scriptMetadata, }, originAttributesPatterns: null, }; if (details.cookieStoreId != null) { const cookieStoreIds = Array.isArray(details.cookieStoreId) ? details.cookieStoreId : [details.cookieStoreId]; options.originAttributesPatterns = cookieStoreIds.map(cookieStoreId => getOriginAttributesPatternForCookieStoreId(cookieStoreId) ); } ``` Additional Details: The change introduces handling of `cookieStoreId` by properly converting it to an array (if it isn't already) and mapping it to origin attributes patterns. While this appears to be a security improvement by properly handling origin attributes for cookie stores, I can't be certain if this was fixing a specific known vulnerability or just improving security practices. The change could potentially prevent issues related to cookie store isolation or origin misattribution, but without more context about the threat model, this remains 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/browser/themes/shared/downloads/indicator.inc.css+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/browser/themes/shared/downloads/indicator.inc.css@@ -36,8 +36,12 @@ left: calc(50% - 10px); /* Horizontally center the 20px wide animatable image */ width: 20px; /* Width of each frame within the SVG sprite */ height: 20px; /* Height of each frame within the SVG sprite */- /* animation is not directional and shouldn't be reversed in RTL */+ /* Animation is not directional and shouldn't be reversed in RTL */ direction: ltr;+ /* Revert to the xul.css user agent stylesheet's z-index value (auto) for+ stack children, to ensure the badge (the last child of the stack) appears in+ front of the animatable boxes */+ z-index: revert; } /* Hide progress and state animations in customize mode */
Let me analyze the CSS diff for potential security vulnerabilities. Vulnerability Existed: not sure [Potential Z-index Stacking Context Issue] [browser/themes/shared/downloads/indicator.inc.css] [Lines 36-44] [Old Code] direction: ltr; } [Fixed Code] direction: ltr; /* Revert to the xul.css user agent stylesheet's z-index value (auto) for stack children, to ensure the badge (the last child of the stack) appears in front of the animatable boxes */ z-index: revert; } Additional Details: The change adds a `z-index: revert` property to fix a potential stacking order issue where the badge might not appear in front of animatable boxes. While this isn't a traditional security vulnerability, incorrect z-index values could potentially be exploited in clickjacking attacks if elements are stacked in unexpected ways. However, in this specific case, it appears to be more of a visual/layout fix rather than a security fix. No other obvious security vulnerabilities were identified in this CSS diff. The other changes are purely stylistic (comment formatting) and don't affect security.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/browser/components/extensions/test/browser/browser_ext_tabs_executeScript.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/browser/components/extensions/test/browser/browser_ext_tabs_executeScript.js@@ -287,7 +287,7 @@ }, error => { browser.test.assertEq(- `Frame not found, or missing host permission`,+ `Invalid frame IDs: [${Number.MAX_SAFE_INTEGER}].`, error.message, "Got expected error" );
Here's the analysis following your requested format: Vulnerability Existed: not sure [Potential Error Message Information Leak] [browser/components/extensions/test/browser/browser_ext_tabs_executeScript.js] [Lines 287-291] [Old Code] `Frame not found, or missing host permission` [Fixed Code] `Invalid frame IDs: [${Number.MAX_SAFE_INTEGER}].` Additional Details: 1. The change appears to be modifying an error message to be more specific about the nature of the failure (invalid frame IDs rather than a generic "not found" message) 2. While this could be considered an improvement in error reporting, it's not clear if the previous message was actually a security vulnerability 3. The change might be related to better error handling rather than fixing a specific security issue 4. The modification could potentially prevent information leakage by being more precise about the error condition, but this is speculative Note: Without more context about the surrounding code and the actual security implications, this appears to be more of an error message refinement than a clear security fix. The change makes the error more specific but doesn't clearly address a known vulnerability pattern.
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/shared/heapsnapshot/HeapSnapshot.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/shared/heapsnapshot/HeapSnapshot.cpp@@ -695,10 +695,13 @@ // If `boundaries` is incoherent, or we encounter an error while trying to // handle it, or we run out of memory, set `rv` appropriately and return // `false`.-static bool EstablishBoundaries(JSContext* cx, ErrorResult& rv,- const HeapSnapshotBoundaries& boundaries,- ubi::RootList& roots,- CompartmentSet& compartments) {+//+// Return value is a pair of the status and an AutoCheckCannotGC token,+// forwarded from ubi::RootList::init(), to ensure that the caller does+// not GC while the RootList is live and initialized.+static std::pair<bool, AutoCheckCannotGC> EstablishBoundaries(+ JSContext* cx, ErrorResult& rv, const HeapSnapshotBoundaries& boundaries,+ ubi::RootList& roots, CompartmentSet& compartments) { MOZ_ASSERT(!roots.initialized()); MOZ_ASSERT(compartments.empty());@@ -709,48 +712,49 @@ if (!boundaries.mRuntime.Value()) { rv.Throw(NS_ERROR_INVALID_ARG);- return false;- }-- if (!roots.init()) {+ return {false, AutoCheckCannotGC(cx)};+ }++ auto [ok, nogc] = roots.init();+ if (!ok) { rv.Throw(NS_ERROR_OUT_OF_MEMORY);- return false;+ return {false, nogc}; } } if (boundaries.mDebugger.WasPassed()) { if (foundBoundaryProperty) { rv.Throw(NS_ERROR_INVALID_ARG);- return false;+ return {false, AutoCheckCannotGC(cx)}; } foundBoundaryProperty = true; JSObject* dbgObj = boundaries.mDebugger.Value(); if (!dbgObj || !dbg::IsDebugger(*dbgObj)) { rv.Throw(NS_ERROR_INVALID_ARG);- return false;+ return {false, AutoCheckCannotGC(cx)}; } RootedObjectVector globals(cx); if (!dbg::GetDebuggeeGlobals(cx, *dbgObj, &globals) || !PopulateCompartmentsWithGlobals(compartments, globals) ||- !roots.init(compartments) || !AddGlobalsAsRoots(globals, roots)) {+ !roots.init(compartments).first || !AddGlobalsAsRoots(globals, roots)) { rv.Throw(NS_ERROR_OUT_OF_MEMORY);- return false;+ return {false, AutoCheckCannotGC(cx)}; } } if (boundaries.mGlobals.WasPassed()) { if (foundBoundaryProperty) { rv.Throw(NS_ERROR_INVALID_ARG);- return false;+ return {false, AutoCheckCannotGC(cx)}; } foundBoundaryProperty = true; uint32_t length = boundaries.mGlobals.Value().Length(); if (length == 0) { rv.Throw(NS_ERROR_INVALID_ARG);- return false;+ return {false, AutoCheckCannotGC(cx)}; } RootedObjectVector globals(cx);@@ -758,28 +762,29 @@ JSObject* global = boundaries.mGlobals.Value().ElementAt(i); if (!JS_IsGlobalObject(global)) { rv.Throw(NS_ERROR_INVALID_ARG);- return false;+ return {false, AutoCheckCannotGC(cx)}; } if (!globals.append(global)) { rv.Throw(NS_ERROR_OUT_OF_MEMORY);- return false;+ return {false, AutoCheckCannotGC(cx)}; } } if (!PopulateCompartmentsWithGlobals(compartments, globals) ||- !roots.init(compartments) || !AddGlobalsAsRoots(globals, roots)) {+ !roots.init(compartments).first || !AddGlobalsAsRoots(globals, roots)) { rv.Throw(NS_ERROR_OUT_OF_MEMORY);- return false;- }- }+ return {false, AutoCheckCannotGC(cx)};+ }+ }+ AutoCheckCannotGC nogc(cx); if (!foundBoundaryProperty) { rv.Throw(NS_ERROR_INVALID_ARG);- return false;+ return {false, nogc}; } MOZ_ASSERT(roots.initialized());- return true;+ return {true, nogc}; } // A variant covering all the various two-byte strings that we can get from the@@ -1473,15 +1478,16 @@ JSContext* cx = global.Context(); {- Maybe<AutoCheckCannotGC> maybeNoGC;- ubi::RootList rootList(cx, maybeNoGC, wantNames);- if (!EstablishBoundaries(cx, rv, boundaries, rootList, compartments))+ ubi::RootList rootList(cx, wantNames);+ auto [ok, nogc] =+ EstablishBoundaries(cx, rv, boundaries, rootList, compartments);+ if (!ok) { return;+ } StreamWriter writer(cx, gzipStream, wantNames, !compartments.empty() ? &compartments : nullptr);- MOZ_ASSERT(maybeNoGC.isSome()); ubi::Node roots(&rootList); // Serialize the initial heap snapshot metadata to the core dump.@@ -1489,8 +1495,8 @@ // Serialize the heap graph to the core dump, starting from our list of // roots. !WriteHeapGraph(cx, roots, writer, wantNames,- !compartments.empty() ? &compartments : nullptr,- maybeNoGC.ref(), nodeCount, edgeCount)) {+ !compartments.empty() ? &compartments : nullptr, nogc,+ nodeCount, edgeCount)) { rv.Throw(zeroCopyStream.failed() ? zeroCopyStream.result() : NS_ERROR_UNEXPECTED); return;
Let me analyze the code diff for security fixes: 1. Vulnerability Existed: yes Memory Safety Issue [File] devtools/shared/heapsnapshot/HeapSnapshot.cpp [Lines 695-1495] [Old Code] The original code used Maybe<AutoCheckCannotGC> and didn't consistently ensure GC protection while RootList was live. The error handling paths could return without proper GC protection. [Fixed Code] The new code ensures consistent GC protection by returning an AutoCheckCannotGC token from EstablishBoundaries and using it throughout the call chain. This prevents potential GC-related memory safety issues. 2. Vulnerability Existed: yes Potential Use-After-Free [File] devtools/shared/heapsnapshot/HeapSnapshot.cpp [Lines 1473-1495] [Old Code] The old implementation could potentially lead to use-after-free if garbage collection occurred while RootList was being used, since the GC protection wasn't consistently maintained. [Fixed Code] The new code ensures GC protection is maintained throughout the entire operation by passing the AutoCheckCannotGC token through all operations that use RootList. 3. Vulnerability Existed: not sure Error Handling Consistency [File] devtools/shared/heapsnapshot/HeapSnapshot.cpp [Lines 695-1495] [Old Code] Error handling paths returned simple boolean values without maintaining GC protection state. [Fixed Code] All error paths now consistently return both a status and GC protection token, ensuring proper cleanup in error cases. The main security improvements appear to be around memory safety and preventing potential use-after-free scenarios by ensuring consistent garbage collection protection throughout the heap snapshot operations. The changes make the GC protection state more explicit and ensure it's properly maintained across all execution paths.
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-shapes/shape-outside/shape-box/shape-outside-border-box-border-radius-004.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-shapes/shape-outside/shape-box/shape-outside-border-box-border-radius-004.html@@ -9,7 +9,6 @@ <link rel="author" title="Mozilla" href="http://www.mozilla.org/"> <link rel="help" href="https://drafts.csswg.org/css-shapes-1/#shapes-from-box-values"> <link rel="match" href="reference/shape-outside-border-box-border-radius-004-ref.html">- <meta name="flags" content=""> <meta name="assert" content="Test the boxes are wrapping around the right float shape defined by the border-box and border-radius value."> <style> .container {
Based on the provided diff, I'll analyze it for security vulnerabilities: Vulnerability Existed: no No security vulnerability found [testing/web-platform/tests/css/css-shapes/shape-outside/shape-box/shape-outside-border-box-border-radius-004.html] [Lines 9] [Old Code] <meta name="flags" content=""> [Fixed Code] (line removed) Explanation: 1. The change simply removes an empty meta tag with a "flags" attribute, which was likely used for test configuration. 2. This appears to be a cleanup change rather than a security fix. 3. There's no indication of any security vulnerability being addressed here. 4. The "flags" attribute in this context doesn't appear to have any 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/third_party/rust/strsim/benches/benches.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/strsim/benches/benches.rs@@ -5,17 +5,17 @@ extern crate strsim; mod benches {+ use self::test::Bencher; use super::*; extern crate test;- use self::test::Bencher; #[bench] fn bench_hamming(bencher: &mut Bencher) { let a = "ACAAGATGCCATTGTCCCCCGGCCTCCTGCTGCTGCTGCTCTCCGGGG"; let b = "CCTGGAGGGTGGCCCCACCGGCCGAGACAGCGAGCATATGCAGGAAGC"; bencher.iter(|| {- strsim::hamming(&a, &b).unwrap();+ strsim::hamming(a, b).unwrap(); }) }@@ -43,6 +43,13 @@ let b = "Philosopher Jean-Paul Sartre"; bencher.iter(|| { strsim::levenshtein(&a, &b);+ })+ }++ #[bench]+ fn bench_levenshtein_on_u8(bencher: &mut Bencher) {+ bencher.iter(|| {+ strsim::generic_levenshtein(&vec![0u8; 30], &vec![7u8; 31]); }) }@@ -81,4 +88,13 @@ strsim::normalized_damerau_levenshtein(&a, &b); }) }++ #[bench]+ fn bench_sorensen_dice(bencher: &mut Bencher) {+ let a = "Philosopher Friedrich Nietzsche";+ let b = "Philosopher Jean-Paul Sartre";+ bencher.iter(|| {+ strsim::sorensen_dice(&a, &b);+ })+ } }
After analyzing the provided code diff, I don't find any security vulnerabilities. The changes appear to be related to benchmark improvements and additions rather than security fixes. Here's the analysis: 1. Vulnerability Existed: no No security vulnerability found [third_party/rust/strsim/benches/benches.rs] [Various lines] The changes include: - Reordering of imports - Removal of redundant references (&) in hamming benchmark - Addition of new benchmarks (levenshtein_on_u8 and sorensen_dice) - No security-related changes were made The diff shows typical maintenance changes to benchmarking code, including: - Code style improvements - Adding new benchmark tests - Optimizing existing benchmarks - No changes to actual security-sensitive functionality No CVE or known vulnerability patterns were identified in these changes. The modifications are focused on test/benchmark functionality rather than addressing security issues.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/gfx/layers/FrameMetrics.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/gfx/layers/FrameMetrics.h@@ -87,7 +87,6 @@ mCompositionBounds(0, 0, 0, 0), mCompositionBoundsWidthIgnoringScrollbars(0), mDisplayPort(0, 0, 0, 0),- mCriticalDisplayPort(0, 0, 0, 0), mScrollableRect(0, 0, 0, 0), mCumulativeResolution(), mDevPixelsPerCSSPixel(1),@@ -116,7 +115,6 @@ mCompositionBoundsWidthIgnoringScrollbars == aOther.mCompositionBoundsWidthIgnoringScrollbars && mDisplayPort.IsEqualEdges(aOther.mDisplayPort) &&- mCriticalDisplayPort.IsEqualEdges(aOther.mCriticalDisplayPort) && mScrollableRect.IsEqualEdges(aOther.mScrollableRect) && mCumulativeResolution == aOther.mCumulativeResolution && mDevPixelsPerCSSPixel == aOther.mDevPixelsPerCSSPixel &&@@ -300,12 +298,6 @@ const CSSRect& GetDisplayPort() const { return mDisplayPort; }- void SetCriticalDisplayPort(const CSSRect& aCriticalDisplayPort) {- mCriticalDisplayPort = aCriticalDisplayPort;- }-- const CSSRect& GetCriticalDisplayPort() const { return mCriticalDisplayPort; }- void SetCumulativeResolution( const LayoutDeviceToLayerScale& aCumulativeResolution) { mCumulativeResolution = aCumulativeResolution;@@ -355,11 +347,14 @@ const CSSToParentLayerScale& GetZoom() const { return mZoom; }- void SetScrollGeneration(const ScrollGeneration& aScrollGeneration) {+ void SetScrollGeneration(+ const MainThreadScrollGeneration& aScrollGeneration) { mScrollGeneration = aScrollGeneration; }- ScrollGeneration GetScrollGeneration() const { return mScrollGeneration; }+ MainThreadScrollGeneration GetScrollGeneration() const {+ return mScrollGeneration;+ } ViewID GetScrollId() const { return mScrollId; }@@ -541,14 +536,6 @@ // width = scrollPort.width + 200, height = scrollPort.height + 200 } // where scrollPort = CalculateCompositedSizeInCssPixels(). CSSRect mDisplayPort;-- // If non-empty, the area of a frame's contents that is considered critical- // to paint. Area outside of this area (i.e. area inside mDisplayPort, but- // outside of mCriticalDisplayPort) is considered low-priority, and may be- // painted with lower precision, or not painted at all.- //- // The same restrictions for mDisplayPort apply here.- CSSRect mCriticalDisplayPort; // The scrollable bounds of a frame. This is determined by reflow. // Ordinarily the x and y will be 0 and the width and height will be the@@ -610,7 +597,7 @@ CSSToParentLayerScale mZoom; // The scroll generation counter used to acknowledge the scroll offset update.- ScrollGeneration mScrollGeneration;+ MainThreadScrollGeneration mScrollGeneration; // A bounding size for our composition bounds (no larger than the // cross-process RCD-RSF's composition size), in local CSS pixels.@@ -822,6 +809,8 @@ mIsRDMTouchSimulationActive(false), mDidContentGetPainted(true), mPrefersReducedMotion(false),+ mForceMousewheelAutodir(false),+ mForceMousewheelAutodirHonourRoot(false), mOverscrollBehavior() {} bool operator==(const ScrollMetadata& aOther) const {@@ -839,6 +828,9 @@ mIsRDMTouchSimulationActive == aOther.mIsRDMTouchSimulationActive && mDidContentGetPainted == aOther.mDidContentGetPainted && mPrefersReducedMotion == aOther.mPrefersReducedMotion &&+ mForceMousewheelAutodir == aOther.mForceMousewheelAutodir &&+ mForceMousewheelAutodirHonourRoot ==+ aOther.mForceMousewheelAutodirHonourRoot && mDisregardedDirection == aOther.mDisregardedDirection && mOverscrollBehavior == aOther.mOverscrollBehavior && mScrollUpdates == aOther.mScrollUpdates;@@ -912,6 +904,18 @@ void SetPrefersReducedMotion(bool aValue) { mPrefersReducedMotion = aValue; } bool PrefersReducedMotion() const { return mPrefersReducedMotion; }++ void SetForceMousewheelAutodir(bool aValue) {+ mForceMousewheelAutodir = aValue;+ }+ bool ForceMousewheelAutodir() const { return mForceMousewheelAutodir; }++ void SetForceMousewheelAutodirHonourRoot(bool aValue) {+ mForceMousewheelAutodirHonourRoot = aValue;+ }+ bool ForceMousewheelAutodirHonourRoot() const {+ return mForceMousewheelAutodirHonourRoot;+ } bool DidContentGetPainted() const { return mDidContentGetPainted; }@@ -1023,6 +1027,11 @@ // media query). bool mPrefersReducedMotion : 1;+ // Whether privileged code has requested that autodir behaviour be+ // enabled for the scroll frame.+ bool mForceMousewheelAutodir : 1;+ bool mForceMousewheelAutodirHonourRoot : 1;+ // The disregarded direction means the direction which is disregarded anyway, // even if the scroll frame overflows in that direction and the direction is // specified as scrollable. This could happen in some scenarios, for instance,
Here is the analysis of the provided code diff following the specified format: 1. Vulnerability Existed: not sure [Removal of CriticalDisplayPort] [gfx/layers/FrameMetrics.h] [Lines 87, 116, 300-306, 541-548] [Old Code] ```cpp mCriticalDisplayPort(0, 0, 0, 0), mCriticalDisplayPort.IsEqualEdges(aOther.mCriticalDisplayPort) && void SetCriticalDisplayPort(const CSSRect& aCriticalDisplayPort) { mCriticalDisplayPort = aCriticalDisplayPort; } const CSSRect& GetCriticalDisplayPort() const { return mCriticalDisplayPort; } CSSRect mCriticalDisplayPort; ``` [Fixed Code] (All references and member removed) 2. Vulnerability Existed: not sure [ScrollGeneration Type Change] [gfx/layers/FrameMetrics.h] [Lines 355-361, 597] [Old Code] ```cpp void SetScrollGeneration(const ScrollGeneration& aScrollGeneration) { mScrollGeneration = aScrollGeneration; } ScrollGeneration GetScrollGeneration() const { return mScrollGeneration; } ScrollGeneration mScrollGeneration; ``` [Fixed Code] ```cpp void SetScrollGeneration( const MainThreadScrollGeneration& aScrollGeneration) { mScrollGeneration = aScrollGeneration; } MainThreadScrollGeneration GetScrollGeneration() const { return mScrollGeneration; } MainThreadScrollGeneration mScrollGeneration; ``` 3. Vulnerability Existed: not sure [Mousewheel Autodir Flags Addition] [gfx/layers/FrameMetrics.h] [Lines 809-810, 828-830, 904-915, 1027-1028] [Old Code] (No previous flags existed) [Fixed Code] ```cpp mForceMousewheelAutodir(false), mForceMousewheelAutodirHonourRoot(false), mForceMousewheelAutodir == aOther.mForceMousewheelAutodir && mForceMousewheelAutodirHonourRoot == aOther.mForceMousewheelAutodirHonourRoot && void SetForceMousewheelAutodir(bool aValue) { mForceMousewheelAutodir = aValue; } bool ForceMousewheelAutodir() const { return mForceMousewheelAutodir; } void SetForceMousewheelAutodirHonourRoot(bool aValue) { mForceMousewheelAutodirHonourRoot = aValue; } bool ForceMousewheelAutodirHonourRoot() const { return mForceMousewheelAutodirHonourRoot; } bool mForceMousewheelAutodir : 1; bool mForceMousewheelAutodirHonourRoot : 1; ``` Notes: 1. The removal of CriticalDisplayPort might relate to performance optimizations rather than security fixes, but could potentially affect rendering security. 2. The ScrollGeneration type change to MainThreadScrollGeneration might indicate thread safety improvements. 3. The new mousewheel autodir flags appear to be feature additions rather than security fixes, but could have security implications for input handling.
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/inspector/markup/views/element-container.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/client/inspector/markup/views/element-container.js@@ -75,7 +75,26 @@ const toolbox = this.markup.toolbox; // Create the EventTooltip which will populate the tooltip content.- const eventTooltip = new EventTooltip(tooltip, listenerInfo, toolbox);+ const eventTooltip = new EventTooltip(+ tooltip,+ listenerInfo,+ toolbox,+ this.node+ );++ // Add specific styling to the "event" badge when at least one event is disabled.+ // The eventTooltip will take care of clearing the event listener when it's destroyed.+ eventTooltip.on(+ "event-tooltip-listener-toggled",+ ({ hasDisabledEventListeners }) => {+ const className = "has-disabled-events";+ if (hasDisabledEventListeners) {+ this.editor._eventBadge.classList.add(className);+ } else {+ this.editor._eventBadge.classList.remove(className);+ }+ }+ ); // Disable the image preview tooltip while we display the event details this.markup._disableImagePreviewTooltip();
I'll analyze the provided code diff for security fixes following the specified format. Vulnerability Existed: no [No specific vulnerability found] [devtools/client/inspector/markup/views/element-container.js] [Lines 75-75] [Old Code] const eventTooltip = new EventTooltip(tooltip, listenerInfo, toolbox); [Fixed Code] const eventTooltip = new EventTooltip( tooltip, listenerInfo, toolbox, this.node ); Additional Details: The changes appear to be functional improvements rather than security fixes. The main changes are: 1. Adding `this.node` as a new parameter to the EventTooltip constructor 2. Adding event handling for toggling event listener states and updating UI classes accordingly 3. No obvious security vulnerabilities are being fixed in this diff Vulnerability Existed: no [No specific vulnerability found] [devtools/client/inspector/markup/views/element-container.js] [Lines 75-96] [Old Code] // Create the EventTooltip which will populate the tooltip content. const eventTooltip = new EventTooltip(tooltip, listenerInfo, toolbox); [Fixed Code] // ... (extended code as shown in the diff) Additional Details: The added code for handling event listener toggling and UI updates doesn't appear to address any security issues but rather adds new functionality for managing disabled event listeners. The changes seem focused on improving user experience and feature completeness rather than fixing 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/testing/web-platform/tests/css/css-pseudo/active-selection-056.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-pseudo/active-selection-056.html@@ -16,7 +16,6 @@ -->- <meta content="" name="flags"> <meta name="assert" content="The <br> element is an empty element. Its background color can be painted but specifying its color should generate no rendering effect of any kind. Since the 'background-color' has been specified as 'transparent', then nothing should be painted or viewable in this test."> <style>
Based on the provided code diff, here's the analysis: Vulnerability Existed: no No specific vulnerability [File] testing/web-platform/tests/css/css-pseudo/active-selection-056.html [Lines] 16 [Old Code] `<meta content="" name="flags">` [Fixed Code] (removed line) Additional Details: 1. The change simply removes an empty meta tag with a "flags" attribute, which appears to be test-related metadata rather than a security concern. 2. There's no indication this was fixing any security vulnerability - it's more likely a cleanup of test metadata. 3. No known vulnerability patterns (XSS, injection, etc.) are present in either the old or new code. 4. The meta tag being removed didn't contain any sensitive or executable content.
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_TelemetryEnvironment.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js@@ -41,7 +41,7 @@ }, get type() {- return "service";+ return this.addon.type; }, get appDisabled() {@@ -487,9 +487,13 @@ }); add_task(async function test_addonsWatch_NotInterestingChange() {- // We are not interested to dictionary addons changes.- const DICTIONARY_ADDON_INSTALL_URL = gDataRoot + "dictionary.xpi";- const INTERESTING_ADDON_INSTALL_URL = gDataRoot + "restartless.xpi";+ // Plugins from GMPProvider are listed separately in addons.activeGMPlugins.+ // We simulate the "plugin" type in this test and verify that it is excluded.+ const PLUGIN_ID = "[email protected]";+ // "theme" type is already covered by addons.theme, so we aren't interested.+ const THEME_ID = "[email protected]";+ // "dictionary" type should be in addon.activeAddons.+ const DICT_ID = "[email protected]"; let receivedNotification = false; let deferred = PromiseUtils.defer();@@ -502,23 +506,53 @@ deferred.resolve(); });- let dictionaryAddon = await installXPIFromURL(DICTIONARY_ADDON_INSTALL_URL);- let interestingAddon = await installXPIFromURL(INTERESTING_ADDON_INSTALL_URL);+ // "plugin" type, to verify that non-XPIProvider types such as the "plugin"+ // type from GMPProvider are not included in activeAddons.+ let fakePluginProvider = createMockAddonProvider("Fake GMPProvider");+ AddonManagerPrivate.registerProvider(fakePluginProvider);+ fakePluginProvider.addAddon({+ id: PLUGIN_ID,+ name: "Fake plugin",+ version: "1",+ type: "plugin",+ });++ // "theme" type.+ let themeXpi = AddonTestUtils.createTempWebExtensionFile({+ manifest: {+ theme: {},+ applications: { gecko: { id: THEME_ID } },+ },+ });+ let themeAddon = (await AddonTestUtils.promiseInstallFile(themeXpi)).addon;++ let dictXpi = AddonTestUtils.createTempWebExtensionFile({+ manifest: {+ dictionaries: {},+ applications: { gecko: { id: DICT_ID } },+ },+ });+ let dictAddon = (await AddonTestUtils.promiseInstallFile(dictXpi)).addon; await deferred.promise; Assert.ok(- !(- "[email protected]" in- TelemetryEnvironment.currentEnvironment.addons.activeAddons- ),- "Dictionaries should not appear in active addons."+ !(PLUGIN_ID in TelemetryEnvironment.currentEnvironment.addons.activeAddons),+ "GMP plugins should not appear in active addons."+ );+ Assert.ok(+ !(THEME_ID in TelemetryEnvironment.currentEnvironment.addons.activeAddons),+ "Themes should not appear in active addons."+ );+ Assert.ok(+ DICT_ID in TelemetryEnvironment.currentEnvironment.addons.activeAddons,+ "Dictionaries should appear in active addons." ); TelemetryEnvironment.unregisterChangeListener("testNotInteresting");- dictionaryAddon.uninstall();- await interestingAddon.startupPromise;- interestingAddon.uninstall();+ AddonManagerPrivate.unregisterProvider(fakePluginProvider);+ await themeAddon.uninstall();+ await dictAddon.uninstall(); }); add_task(async function test_addons() {@@ -597,6 +631,7 @@ let addon = await installXPIFromURL(ADDON_INSTALL_URL); // Install a webextension as well.+ // Note: all addons are webextensions, so doing this again is redundant... ExtensionTestUtils.init(this); let webextension = ExtensionTestUtils.loadExtension({@@ -840,8 +875,8 @@ await checkpointPromise; assertCheckpoint(2);- // Check that the new environment contains the Social addon installed with the broken- // manifest and the rest of the data.+ // Check that the new environment contains the info from the broken provider,+ // despite the addon missing some details. let data = TelemetryEnvironment.currentEnvironment; TelemetryEnvironmentTesting.checkEnvironmentData(data, { expectBrokenAddons: true,
I'll analyze the code diff for security fixes following the specified format. 1. Vulnerability Existed: not sure [Potential Information Exposure] [toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js] [Lines 41] Old Code: get type() { return "service"; }, Fixed Code: get type() { return this.addon.type; }, Additional Details: The change makes the type property dynamic rather than hardcoded. While not clearly a security fix, it could prevent potential information exposure if the hardcoded value was misleading. 2. Vulnerability Existed: not sure [Potential Addon Type Confusion] [toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js] [Lines 487-506] Old Code: // We are not interested to dictionary addons changes. const DICTIONARY_ADDON_INSTALL_URL = gDataRoot + "dictionary.xpi"; const INTERESTING_ADDON_INSTALL_URL = gDataRoot + "restartless.xpi"; Fixed Code: // Plugins from GMPProvider are listed separately in addons.activeGMPlugins. // We simulate the "plugin" type in this test and verify that it is excluded. const PLUGIN_ID = "[email protected]"; // "theme" type is already covered by addons.theme, so we aren't interested. const THEME_ID = "[email protected]"; // "dictionary" type should be in addon.activeAddons. const DICT_ID = "[email protected]"; Additional Details: The test was significantly modified to better handle different addon types. While this appears to be test improvements, it might relate to preventing type confusion vulnerabilities in addon handling. 3. Vulnerability Existed: not sure [Potential Addon Information Leak] [toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js] [Lines 840] Old Code: // Check that the new environment contains the Social addon installed with the broken // manifest and the rest of the data. Fixed Code: // Check that the new environment contains the info from the broken provider, // despite the addon missing some details. Additional Details: The comment change suggests more careful handling of addons with broken manifests, which could relate to preventing information leaks from incomplete addon data. Note: While these changes appear to be test improvements and code refactoring, they might indirectly address security concerns around proper addon type handling and information exposure in telemetry data. However, without more context, I can't definitively identify specific vulnerabilities being fixed.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.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 = '#0f0'; ctx.fillRect(0, 0, 100, 50);@@ -49,16 +49,16 @@ ctx.lineTo(90+tol, 20); ctx.lineTo(80, 10-tol); ctx.fill();-_assertPixel(offscreenCanvas, 34,16, 0,255,0,255, "34,16", "0,255,0,255");-_assertPixel(offscreenCanvas, 34,15, 0,255,0,255, "34,15", "0,255,0,255");-_assertPixel(offscreenCanvas, 35,15, 0,255,0,255, "35,15", "0,255,0,255");-_assertPixel(offscreenCanvas, 36,15, 0,255,0,255, "36,15", "0,255,0,255");-_assertPixel(offscreenCanvas, 36,14, 0,255,0,255, "36,14", "0,255,0,255");-_assertPixel(offscreenCanvas, 84,16, 0,255,0,255, "84,16", "0,255,0,255");-_assertPixel(offscreenCanvas, 84,15, 0,255,0,255, "84,15", "0,255,0,255");-_assertPixel(offscreenCanvas, 85,15, 0,255,0,255, "85,15", "0,255,0,255");-_assertPixel(offscreenCanvas, 86,15, 0,255,0,255, "86,15", "0,255,0,255");-_assertPixel(offscreenCanvas, 86,14, 0,255,0,255, "86,14", "0,255,0,255");+_assertPixel(canvas, 34,16, 0,255,0,255, "34,16", "0,255,0,255");+_assertPixel(canvas, 34,15, 0,255,0,255, "34,15", "0,255,0,255");+_assertPixel(canvas, 35,15, 0,255,0,255, "35,15", "0,255,0,255");+_assertPixel(canvas, 36,15, 0,255,0,255, "36,15", "0,255,0,255");+_assertPixel(canvas, 36,14, 0,255,0,255, "36,14", "0,255,0,255");+_assertPixel(canvas, 84,16, 0,255,0,255, "84,16", "0,255,0,255");+_assertPixel(canvas, 84,15, 0,255,0,255, "84,15", "0,255,0,255");+_assertPixel(canvas, 85,15, 0,255,0,255, "85,15", "0,255,0,255");+_assertPixel(canvas, 86,15, 0,255,0,255, "86,15", "0,255,0,255");+_assertPixel(canvas, 86,14, 0,255,0,255, "86,14", "0,255,0,255"); t.done(); });
After analyzing the provided code diff, I don't find any security vulnerabilities. The changes appear to be purely variable renaming (from `offscreenCanvas` to `canvas`) and updating the corresponding assertions to use the new variable name. There are no security-related fixes or potential vulnerabilities introduced or fixed in this diff. Here's the structured response following the required format: Vulnerability Existed: no No security vulnerabilities found in the diff. The changes are purely variable renaming and test assertion updates. The diff shows: 1. Variable renamed from `offscreenCanvas` to `canvas` 2. All subsequent `_assertPixel` calls updated to use the new variable name 3. No changes to security-related functionality or vulnerable patterns This appears to be a refactoring 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/devtools/shared/specs/webconsole.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/shared/specs/webconsole.js@@ -14,7 +14,6 @@ types.addDictType("console.startlisteners", { startedListeners: "array:string",- nativeConsoleAPI: "nullable:boolean", }); types.addDictType("console.stoplisteners", {
Let me analyze the code diff for security fixes: 1. Vulnerability Existed: not sure [Potential Information Leak] [devtools/shared/specs/webconsole.js] [Lines 14-15] [Old Code] startedListeners: "array:string", nativeConsoleAPI: "nullable:boolean", [Fixed Code] startedListeners: "array:string", Additional Details: The diff shows removal of the `nativeConsoleAPI` field from the type definition. While this might not be a direct security vulnerability, removing potentially sensitive information from type definitions could be a hardening measure. Without more context about how this field was used, I can't definitively say if this was fixing a security issue, but it could be related to reducing information exposure.
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.get.semitransparent.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.get.semitransparent.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 = 'rgba(255,255,255,0.45)'; assert_regexp_match(ctx.fillStyle, /^rgba\(255, 255, 255, 0\.4\d+\)$/);
Analyzing the provided code diff, here's the security assessment: Vulnerability Existed: no [No specific vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.worker.js] [Lines 13-14] [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'); Additional Details: 1. The change appears to be purely a variable name refactoring from `offscreenCanvas` to `canvas` 2. No security-related changes are evident in this diff 3. The functionality remains exactly the same, only the variable name was changed 4. This is likely a code style/readability 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/gfx/webrender_bindings/DCLayerTree.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/gfx/webrender_bindings/DCLayerTree.h@@ -7,6 +7,7 @@ #ifndef MOZILLA_GFX_DCLAYER_TREE_H #define MOZILLA_GFX_DCLAYER_TREE_H+#include <dxgiformat.h> #include <unordered_map> #include <vector> #include <windows.h>@@ -51,6 +52,16 @@ class DCSurfaceVideo; class RenderTextureHost;+struct GpuOverlayInfo {+ bool mSupportsOverlays = false;+ bool mSupportsHardwareOverlays = false;+ DXGI_FORMAT mOverlayFormatUsed = DXGI_FORMAT_B8G8R8A8_UNORM;+ DXGI_FORMAT mOverlayFormatUsedHdr = DXGI_FORMAT_R10G10B10A2_UNORM;+ UINT mNv12OverlaySupportFlags = 0;+ UINT mYuy2OverlaySupportFlags = 0;+ UINT mRgb10a2OverlaySupportFlags = 0;+};+ /** * DCLayerTree manages direct composition layers. * It does not manage gecko's layers::Layer.@@ -61,6 +72,9 @@ ID3D11Device* aDevice, ID3D11DeviceContext* aCtx, HWND aHwnd, nsACString& aError);++ static void Shutdown();+ explicit DCLayerTree(gl::GLContext* aGL, EGLConfig aEGLConfig, ID3D11Device* aDevice, ID3D11DeviceContext* aCtx, IDCompositionDevice2* aCompositionDevice);@@ -110,6 +124,9 @@ // Get or create an FBO with depth buffer suitable for specified dimensions GLuint GetOrCreateFbo(int aWidth, int aHeight);+ bool SupportsHardwareOverlays();+ DXGI_FORMAT GetOverlayFormatForSDR();+ protected: bool Initialize(HWND aHwnd, nsACString& aError); bool InitializeVideoOverlaySupport();@@ -139,8 +156,6 @@ RefPtr<ID3D11VideoProcessorEnumerator> mVideoProcessorEnumerator; gfx::IntSize mVideoSize;- bool mVideoOverlaySupported;- bool mDebugCounter; bool mDebugVisualRedrawRegions;@@ -185,6 +200,8 @@ int mCurrentFrame = 0; bool mPendingCommit;++ static UniquePtr<GpuOverlayInfo> sGpuOverlayInfo; }; /**@@ -259,6 +276,7 @@ DCSurfaceVideo* AsDCSurfaceVideo() override { return this; } protected:+ DXGI_FORMAT GetSwapChainFormat(); bool CreateVideoSwapChain(RenderTextureHost* aTexture); bool CallVideoProcessorBlt(RenderTextureHost* aTexture); void ReleaseDecodeSwapChainResources();@@ -269,6 +287,8 @@ RefPtr<IDXGIDecodeSwapChain> mDecodeSwapChain; HANDLE mSwapChainSurfaceHandle; gfx::IntSize mSwapChainSize;+ DXGI_FORMAT mSwapChainFormat = DXGI_FORMAT_B8G8R8A8_UNORM;+ bool mFailedToCreateYuvSwapChain = false; RefPtr<RenderTextureHost> mPrevTexture; };
I'll analyze the provided code diff for security fixes following the specified format. 1. Vulnerability Existed: not sure [Potential Information Leak] [gfx/webrender_bindings/DCLayerTree.h] [Lines 139, 156] [Old Code: bool mVideoOverlaySupported;] [Fixed Code: (removed, replaced with GpuOverlayInfo struct)] Note: The removal of a simple boolean flag and replacement with a more detailed structure could indicate a fix for potential information leakage about hardware capabilities, but this is speculative. 2. Vulnerability Existed: not sure [Potential Uninitialized Memory Access] [gfx/webrender_bindings/DCLayerTree.h] [Lines 269, 287] [Old Code: (no explicit format specification for swap chain)] [Fixed Code: DXGI_FORMAT mSwapChainFormat = DXGI_FORMAT_B8G8R8A8_UNORM; bool mFailedToCreateYuvSwapChain = false;] Note: The addition of default format values and failure tracking could prevent potential uninitialized memory access or undefined behavior when creating swap chains. 3. Vulnerability Existed: not sure [Potential Race Condition] [gfx/webrender_bindings/DCLayerTree.h] [Lines 61, 72] [Old Code: (no Shutdown method)] [Fixed Code: static void Shutdown();] Note: The addition of a Shutdown method could indicate a fix for potential resource cleanup issues or race conditions during program termination. The changes appear to be more about improving robustness and adding features (hardware overlay support) rather than fixing clear security vulnerabilities. The modifications primarily add more detailed hardware capability tracking and swap chain management, which could indirectly improve security by making the code more predictable and maintainable.
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/crossbeam-channel/tests/select.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/crossbeam-channel/tests/select.rs@@ -1,4 +1,6 @@ //! Tests for channel selection using the `Select` struct.++#![allow(clippy::drop_copy)] use std::any::Any; use std::cell::Cell;@@ -406,6 +408,7 @@ .unwrap(); }+#[cfg_attr(miri, ignore)] // Miri is too slow #[test] fn loop_try() { const RUNS: usize = 20;@@ -690,6 +693,9 @@ #[test] fn stress_recv() {+ #[cfg(miri)]+ const COUNT: usize = 100;+ #[cfg(not(miri))] const COUNT: usize = 10_000; let (s1, r1) = unbounded();@@ -728,6 +734,9 @@ #[test] fn stress_send() {+ #[cfg(miri)]+ const COUNT: usize = 100;+ #[cfg(not(miri))] const COUNT: usize = 10_000; let (s1, r1) = bounded(0);@@ -763,6 +772,9 @@ #[test] fn stress_mixed() {+ #[cfg(miri)]+ const COUNT: usize = 100;+ #[cfg(not(miri))] const COUNT: usize = 10_000; let (s1, r1) = bounded(0);@@ -895,12 +907,12 @@ for i in 0..THREADS { scope.spawn(move |_| { let mut sel = Select::new();- let oper1 = sel.recv(&r);- let oper2 = sel.send(&s);+ let oper1 = sel.recv(r);+ let oper2 = sel.send(s); let oper = sel.select(); match oper.index() {- ix if ix == oper1 => assert_ne!(oper.recv(&r), Ok(i)),- ix if ix == oper2 => assert!(oper.send(&s, i).is_ok()),+ ix if ix == oper1 => assert_ne!(oper.recv(r), Ok(i)),+ ix if ix == oper2 => assert!(oper.send(s, i).is_ok()), _ => unreachable!(), } });@@ -921,12 +933,12 @@ for i in 0..THREADS { scope.spawn(move |_| { let mut sel = Select::new();- let oper1 = sel.recv(&r);- let oper2 = sel.send(&s);+ let oper1 = sel.recv(r);+ let oper2 = sel.send(s); let oper = sel.select(); match oper.index() {- ix if ix == oper1 => assert_ne!(oper.recv(&r), Ok(i)),- ix if ix == oper2 => assert!(oper.send(&s, i).is_ok()),+ ix if ix == oper1 => assert_ne!(oper.recv(r), Ok(i)),+ ix if ix == oper2 => assert!(oper.send(s, i).is_ok()), _ => unreachable!(), } });@@ -940,6 +952,9 @@ #[test] fn channel_through_channel() {+ #[cfg(miri)]+ const COUNT: usize = 100;+ #[cfg(not(miri))] const COUNT: usize = 1000; type T = Box<dyn Any + Send>;@@ -998,6 +1013,9 @@ #[test] fn linearizable_try() {+ #[cfg(miri)]+ const COUNT: usize = 100;+ #[cfg(not(miri))] const COUNT: usize = 100_000; for step in 0..2 {@@ -1050,6 +1068,9 @@ #[test] fn linearizable_timeout() {+ #[cfg(miri)]+ const COUNT: usize = 100;+ #[cfg(not(miri))] const COUNT: usize = 100_000; for step in 0..2 {@@ -1102,6 +1123,9 @@ #[test] fn fairness1() {+ #[cfg(miri)]+ const COUNT: usize = 100;+ #[cfg(not(miri))] const COUNT: usize = 10_000; let (s1, r1) = bounded::<()>(COUNT);@@ -1148,6 +1172,9 @@ #[test] fn fairness2() {+ #[cfg(miri)]+ const COUNT: usize = 100;+ #[cfg(not(miri))] const COUNT: usize = 10_000; let (s1, r1) = unbounded::<()>();@@ -1212,8 +1239,8 @@ let (s, r) = &bounded::<usize>(0); let mut sel = Select::new();- let oper1 = sel.recv(&r);- let oper2 = sel.send(&s);+ let oper1 = sel.recv(r);+ let oper2 = sel.send(s); let sel = &sel; scope(|scope| {@@ -1222,8 +1249,8 @@ let mut sel = sel.clone(); let oper = sel.select(); match oper.index() {- ix if ix == oper1 => assert_ne!(oper.recv(&r), Ok(i)),- ix if ix == oper2 => assert!(oper.send(&s, i).is_ok()),+ ix if ix == oper1 => assert_ne!(oper.recv(r), Ok(i)),+ ix if ix == oper2 => assert!(oper.send(s, i).is_ok()), _ => unreachable!(), } });@@ -1241,8 +1268,8 @@ let (s, r) = &bounded::<usize>(0); let mut sel = Select::new();- let oper1 = sel.recv(&r);- let oper2 = sel.send(&s);+ let oper1 = sel.recv(r);+ let oper2 = sel.send(s); scope(|scope| { for i in 0..THREADS {@@ -1250,8 +1277,8 @@ scope.spawn(move |_| { let oper = sel.select(); match oper.index() {- ix if ix == oper1 => assert_ne!(oper.recv(&r), Ok(i)),- ix if ix == oper2 => assert!(oper.send(&s, i).is_ok()),+ ix if ix == oper1 => assert_ne!(oper.recv(r), Ok(i)),+ ix if ix == oper2 => assert!(oper.send(s, i).is_ok()), _ => unreachable!(), } });@@ -1264,6 +1291,9 @@ #[test] fn reuse() {+ #[cfg(miri)]+ const COUNT: usize = 100;+ #[cfg(not(miri))] const COUNT: usize = 10_000; let (s1, r1) = bounded(0);
After analyzing the provided code diff, I don't find any security vulnerabilities being fixed. The changes appear to be primarily about: 1. Adding Miri-specific configurations to reduce test counts when running under Miri (which is slower) 2. Adding a clippy lint allowance 3. Some minor code style changes (removing redundant references with `&`) Here's the structured response: Vulnerability Existed: no No security vulnerabilities found in the diff. Changes are primarily test configuration adjustments and minor code improvements. The main changes are: 1. Added `#![allow(clippy::drop_copy)]` at the top 2. Added Miri-specific test configurations with lower COUNT values 3. Removed redundant references in select operations (e.g., changed `&r` to `r`) None of these changes appear to address security vulnerabilities, but rather improve test performance under Miri and code cleanliness.
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.hsl-clamp-4.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.hsl-clamp-4.worker.js@@ -13,14 +13,14 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillStyle = 'hsl(120, 100%, -200%)'; ctx.fillRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 50,25, 0,0,0,255, "50,25", "0,0,0,255");+_assertPixel(canvas, 50,25, 0,0,0,255, "50,25", "0,0,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 changes (variable renaming) rather than security-related fixes. 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.hsl-clamp-4.worker.js [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); _assertPixel(offscreenCanvas, 50,25, 0,0,0,255, "50,25", "0,0,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); _assertPixel(canvas, 50,25, 0,0,0,255, "50,25", "0,0,0,255"); The changes simply rename the variable `offscreenCanvas` to `canvas` and update its references. There's no change in functionality or security implications. The test continues to perform the same assertions about pixel colors in the canvas.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/browser/components/downloads/test/browser/browser_library_select_all.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/browser/components/downloads/test/browser/browser_library_select_all.js@@ -38,7 +38,7 @@ win.close(); });- let listbox = win.document.getElementById("downloadsRichListBox");+ let listbox = win.document.getElementById("downloadsListBox"); Assert.ok(listbox, "download list box present"); listbox.focus(); await TestUtils.waitForCondition(
Based on the provided code diff, I'll analyze it for potential security vulnerabilities: Vulnerability Existed: no [File] browser/components/downloads/test/browser/browser_library_select_all.js [Lines 38] [Old Code] let listbox = win.document.getElementById("downloadsRichListBox"); [Fixed Code] let listbox = win.document.getElementById("downloadsListBox"); Analysis: 1. This appears to be a simple ID change in a test file, from "downloadsRichListBox" to "downloadsListBox" 2. The change is in a test file (browser_library_select_all.js) which typically doesn't contain production security concerns 3. No security vulnerability patterns are evident in this change (no XSS, injection, etc.) 4. This seems to be a test maintenance change to match updated DOM structure No security vulnerabilities were identified in this change. The modification appears to be a test update to reflect changes in the UI element naming.
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/rust_decimal/src/ops/array.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/rust_decimal/src/ops/array.rs@@ -15,19 +15,19 @@ } if *value_scale > new_scale {- let mut diff = *value_scale - new_scale;+ let mut diff = value_scale.wrapping_sub(new_scale); // Scaling further isn't possible since we got an overflow // In this case we need to reduce the accuracy of the "side to keep" // Now do the necessary rounding let mut remainder = 0;- while diff > 0 {+ while let Some(diff_minus_one) = diff.checked_sub(1) { if is_all_zero(value) { *value_scale = new_scale; return; }- diff -= 1;+ diff = diff_minus_one; // Any remainder is discarded if diff > 0 still (i.e. lost precision) remainder = div_by_u32(value, 10);@@ -35,8 +35,8 @@ if remainder >= 5 { for part in value.iter_mut() { let digit = u64::from(*part) + 1u64;- remainder = if digit > 0xFFFF_FFFF { 1 } else { 0 };- *part = (digit & 0xFFFF_FFFF) as u32;+ remainder = if digit > U32_MASK { 1 } else { 0 };+ *part = (digit & U32_MASK) as u32; if remainder == 0 { break; }@@ -44,16 +44,21 @@ } *value_scale = new_scale; } else {- let mut diff = new_scale - *value_scale;+ let mut diff = new_scale.wrapping_sub(*value_scale); let mut working = [value[0], value[1], value[2]];- while diff > 0 && mul_by_10(&mut working) == 0 {- value.copy_from_slice(&working);- diff -= 1;- }- *value_scale = new_scale - diff;- }-}-+ while let Some(diff_minus_one) = diff.checked_sub(1) {+ if mul_by_10(&mut working) == 0 {+ value.copy_from_slice(&working);+ diff = diff_minus_one;+ } else {+ break;+ }+ }+ *value_scale = new_scale.wrapping_sub(diff);+ }+}++#[cfg(feature = "legacy-ops")] pub(crate) fn add_by_internal(value: &mut [u32], by: &[u32]) -> u32 { let mut carry: u64 = 0; let vl = value.len();@@ -92,14 +97,36 @@ carry as u32 }-#[inline]-pub(crate) fn add_one_internal(value: &mut [u32]) -> u32 {- let mut carry: u64 = 1; // Start with one, since adding one- let mut sum: u64;- for i in value.iter_mut() {- sum = (*i as u64) + carry;- *i = (sum & U32_MASK) as u32;- carry = sum >> 32;+pub(crate) fn add_by_internal_flattened(value: &mut [u32; 3], by: u32) -> u32 {+ manage_add_by_internal(by, value)+}++#[inline]+pub(crate) fn add_one_internal(value: &mut [u32; 3]) -> u32 {+ manage_add_by_internal(1, value)+}++// `u64 as u32` are safe because of widening and 32bits shifts+#[inline]+pub(crate) fn manage_add_by_internal<const N: usize>(initial_carry: u32, value: &mut [u32; N]) -> u32 {+ let mut carry = u64::from(initial_carry);+ let mut iter = 0..value.len();+ let mut sum = 0;++ let mut sum_fn = |local_carry: &mut u64, idx| {+ sum = u64::from(value[idx]).wrapping_add(*local_carry);+ value[idx] = (sum & U32_MASK) as u32;+ *local_carry = sum.wrapping_shr(32);+ };++ if let Some(idx) = iter.next() {+ sum_fn(&mut carry, idx);+ }++ for idx in iter {+ if carry > 0 {+ sum_fn(&mut carry, idx);+ } } carry as u32@@ -189,7 +216,7 @@ } // Returns remainder-pub(crate) fn div_by_u32(bits: &mut [u32], divisor: u32) -> u32 {+pub(crate) fn div_by_u32<const N: usize>(bits: &mut [u32; N], divisor: u32) -> u32 { if divisor == 0 { // Divide by zero panic!("Internal error: divide by zero");@@ -251,7 +278,7 @@ } #[inline]-pub(crate) fn is_all_zero(bits: &[u32]) -> bool {+pub(crate) fn is_all_zero<const N: usize>(bits: &[u32; N]) -> bool { bits.iter().all(|b| *b == 0) }
Here's the analysis of the provided code diff for security fixes: 1. Vulnerability Existed: yes Integer Overflow Vulnerability [File] third_party/rust/rust_decimal/src/ops/array.rs [Lines] 15-44 [Old Code] let mut diff = *value_scale - new_scale; ... while diff > 0 { diff -= 1; [Fixed Code] let mut diff = value_scale.wrapping_sub(new_scale); ... while let Some(diff_minus_one) = diff.checked_sub(1) { diff = diff_minus_one; 2. Vulnerability Existed: yes Integer Overflow Vulnerability [File] third_party/rust/rust_decimal/src/ops/array.rs [Lines] 44-53 [Old Code] let mut diff = new_scale - *value_scale; ... while diff > 0 && mul_by_10(&mut working) == 0 { value.copy_from_slice(&working); diff -= 1; } *value_scale = new_scale - diff; [Fixed Code] let mut diff = new_scale.wrapping_sub(*value_scale); ... while let Some(diff_minus_one) = diff.checked_sub(1) { if mul_by_10(&mut working) == 0 { value.copy_from_slice(&working); diff = diff_minus_one; } else { break; } } *value_scale = new_scale.wrapping_sub(diff); 3. Vulnerability Existed: yes Potential Arithmetic Overflow Vulnerability [File] third_party/rust/rust_decimal/src/ops/array.rs [Lines] 35-38 [Old Code] remainder = if digit > 0xFFFF_FFFF { 1 } else { 0 }; *part = (digit & 0xFFFF_FFFF) as u32; [Fixed Code] remainder = if digit > U32_MASK { 1 } else { 0 }; *part = (digit & U32_MASK) as u32; 4. Vulnerability Existed: not sure Potential Division by Zero Vulnerability [File] third_party/rust/rust_decimal/src/ops/array.rs [Lines] 216-219 [Old Code] pub(crate) fn div_by_u32(bits: &mut [u32], divisor: u32) -> u32 { if divisor == 0 { // Divide by zero panic!("Internal error: divide by zero"); [Fixed Code] pub(crate) fn div_by_u32<const N: usize>(bits: &mut [u32; N], divisor: u32) -> u32 { if divisor == 0 { // Divide by zero panic!("Internal error: divide by zero"); Note: While the division by zero check remains the same, the change in function signature might indicate some security consideration, though it's not clear from the diff alone. The panic on division by zero is a proper handling, but the change in parameter type might be related to other security improvements.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.