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/layout/generic/nsGfxScrollFrame.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/layout/generic/nsGfxScrollFrame.h@@ -382,8 +382,6 @@ nsIScrollableFrame::ScrollbarSizesOptions aOptions = nsIScrollableFrame::ScrollbarSizesOptions::NONE) const; nsMargin GetDesiredScrollbarSizes(nsBoxLayoutState* aState);- nscoord GetNondisappearingScrollbarWidth(nsBoxLayoutState* aState,- mozilla::WritingMode aVerticalWM); bool IsPhysicalLTR() const { return mOuter->GetWritingMode().IsPhysicalLTR(); }@@ -415,7 +413,6 @@ public: bool IsScrollbarOnRight() const; bool IsScrollingActive() const;- bool IsScrollingActiveNotMinimalDisplayPort() const; bool IsMaybeAsynchronouslyScrolled() const { // If this is true, then we'll build an ASR, and that's what we want // to know I think.@@ -499,7 +496,12 @@ bool IsApzAnimationInProgress() const { return mCurrentAPZScrollAnimationType != APZScrollAnimationType::No; }- ScrollGeneration CurrentScrollGeneration() const { return mScrollGeneration; }+ MainThreadScrollGeneration CurrentScrollGeneration() const {+ return mScrollGeneration;+ }+ APZScrollGeneration ScrollGenerationOnApz() const {+ return mScrollGenerationOnApz;+ } nsPoint LastScrollDestination() const { return mDestination; } nsTArray<ScrollPositionUpdate> GetScrollUpdates() const; bool HasScrollUpdates() const { return !mScrollUpdates.IsEmpty(); }@@ -508,7 +510,8 @@ using IncludeApzAnimation = nsIScrollableFrame::IncludeApzAnimation; bool IsScrollAnimating(IncludeApzAnimation = IncludeApzAnimation::Yes) const;- void ResetScrollInfoIfNeeded(const ScrollGeneration& aGeneration,+ void ResetScrollInfoIfNeeded(const MainThreadScrollGeneration& aGeneration,+ const APZScrollGeneration& aGenerationOnApz, APZScrollAnimationType aAPZScrollAnimationType); bool WantAsyncScroll() const; Maybe<mozilla::layers::ScrollMetadata> ComputeScrollMetadata(@@ -595,7 +598,8 @@ nsTArray<nsIScrollPositionListener*> mListeners; ScrollOrigin mLastScrollOrigin; Maybe<nsPoint> mApzSmoothScrollDestination;- ScrollGeneration mScrollGeneration;+ MainThreadScrollGeneration mScrollGeneration;+ APZScrollGeneration mScrollGenerationOnApz; nsTArray<ScrollPositionUpdate> mScrollUpdates;@@ -988,12 +992,6 @@ nsBoxLayoutState bls(aPresContext, aRC, 0); return GetDesiredScrollbarSizes(&bls); }- nscoord GetNondisappearingScrollbarWidth(nsPresContext* aPresContext,- gfxContext* aRC,- mozilla::WritingMode aWM) final {- nsBoxLayoutState bls(aPresContext, aRC, 0);- return mHelper.GetNondisappearingScrollbarWidth(&bls, aWM);- } nsSize GetLayoutSize() const final { return mHelper.GetLayoutSize(); } nsRect GetScrolledRect() const final { return mHelper.GetScrolledRect(); } nsRect GetScrollPortRect() const final { return mHelper.GetScrollPortRect(); }@@ -1094,9 +1092,6 @@ return NS_OK; } bool IsScrollingActive() final { return mHelper.IsScrollingActive(); }- bool IsScrollingActiveNotMinimalDisplayPort() final {- return mHelper.IsScrollingActiveNotMinimalDisplayPort();- } bool IsMaybeAsynchronouslyScrolled() final { return mHelper.IsMaybeAsynchronouslyScrolled(); }@@ -1113,8 +1108,11 @@ bool IsScrollAnimating(IncludeApzAnimation aIncludeApz) final { return mHelper.IsScrollAnimating(aIncludeApz); }- mozilla::ScrollGeneration CurrentScrollGeneration() const final {+ mozilla::MainThreadScrollGeneration CurrentScrollGeneration() const final { return mHelper.CurrentScrollGeneration();+ }+ mozilla::APZScrollGeneration ScrollGenerationOnApz() const final {+ return mHelper.ScrollGenerationOnApz(); } nsPoint LastScrollDestination() final { return mHelper.LastScrollDestination();@@ -1124,9 +1122,11 @@ } bool HasScrollUpdates() const final { return mHelper.HasScrollUpdates(); } void ResetScrollInfoIfNeeded(- const mozilla::ScrollGeneration& aGeneration,+ const mozilla::MainThreadScrollGeneration& aGeneration,+ const mozilla::APZScrollGeneration& aGenerationOnApz, mozilla::APZScrollAnimationType aAPZScrollAnimationType) final {- mHelper.ResetScrollInfoIfNeeded(aGeneration, aAPZScrollAnimationType);+ mHelper.ResetScrollInfoIfNeeded(aGeneration, aGenerationOnApz,+ aAPZScrollAnimationType); } bool WantAsyncScroll() const final { return mHelper.WantAsyncScroll(); } mozilla::Maybe<mozilla::layers::ScrollMetadata> ComputeScrollMetadata(@@ -1462,12 +1462,6 @@ nsBoxLayoutState bls(aPresContext, aRC, 0); return GetDesiredScrollbarSizes(&bls); }- nscoord GetNondisappearingScrollbarWidth(nsPresContext* aPresContext,- gfxContext* aRC,- mozilla::WritingMode aWM) final {- nsBoxLayoutState bls(aPresContext, aRC, 0);- return mHelper.GetNondisappearingScrollbarWidth(&bls, aWM);- } nsSize GetLayoutSize() const final { return mHelper.GetLayoutSize(); } nsRect GetScrolledRect() const final { return mHelper.GetScrolledRect(); } nsRect GetScrollPortRect() const final { return mHelper.GetScrollPortRect(); }@@ -1564,9 +1558,6 @@ return NS_OK; } bool IsScrollingActive() final { return mHelper.IsScrollingActive(); }- bool IsScrollingActiveNotMinimalDisplayPort() final {- return mHelper.IsScrollingActiveNotMinimalDisplayPort();- } bool IsMaybeAsynchronouslyScrolled() final { return mHelper.IsMaybeAsynchronouslyScrolled(); }@@ -1583,8 +1574,11 @@ bool IsScrollAnimating(IncludeApzAnimation aIncludeApz) final { return mHelper.IsScrollAnimating(aIncludeApz); }- mozilla::ScrollGeneration CurrentScrollGeneration() const final {+ mozilla::MainThreadScrollGeneration CurrentScrollGeneration() const final { return mHelper.CurrentScrollGeneration();+ }+ mozilla::APZScrollGeneration ScrollGenerationOnApz() const final {+ return mHelper.ScrollGenerationOnApz(); } nsPoint LastScrollDestination() final { return mHelper.LastScrollDestination();@@ -1594,9 +1588,11 @@ } bool HasScrollUpdates() const final { return mHelper.HasScrollUpdates(); } void ResetScrollInfoIfNeeded(- const mozilla::ScrollGeneration& aGeneration,+ const mozilla::MainThreadScrollGeneration& aGeneration,+ const mozilla::APZScrollGeneration& aGenerationOnApz, mozilla::APZScrollAnimationType aAPZScrollAnimationType) final {- mHelper.ResetScrollInfoIfNeeded(aGeneration, aAPZScrollAnimationType);+ mHelper.ResetScrollInfoIfNeeded(aGeneration, aGenerationOnApz,+ aAPZScrollAnimationType); } bool WantAsyncScroll() const final { return mHelper.WantAsyncScroll(); } mozilla::Maybe<mozilla::layers::ScrollMetadata> ComputeScrollMetadata(
Analyzing the provided code diff, here are the security-related findings: 1. Vulnerability Existed: not sure Potential Scroll Generation Race Condition [File] [Lines] Old Code: ScrollGeneration CurrentScrollGeneration() const { return mScrollGeneration; } Fixed Code: MainThreadScrollGeneration CurrentScrollGeneration() const { return mScrollGeneration; } APZScrollGeneration ScrollGenerationOnApz() const { return mScrollGenerationOnApz; } 2. Vulnerability Existed: not sure Potential Scroll Information Reset Vulnerability [File] [Lines] Old Code: void ResetScrollInfoIfNeeded(const ScrollGeneration& aGeneration, APZScrollAnimationType aAPZScrollAnimationType); Fixed Code: void ResetScrollInfoIfNeeded(const MainThreadScrollGeneration& aGeneration, const APZScrollGeneration& aGenerationOnApz, APZScrollAnimationType aAPZScrollAnimationType); 3. Vulnerability Existed: not sure Removed Function Could Indicate Security Fix [File] [Lines] Old Code: bool IsScrollingActiveNotMinimalDisplayPort() const; Fixed Code: [Function removed] 4. Vulnerability Existed: not sure Removed Scrollbar Width Calculation [File] [Lines] Old Code: nscoord GetNondisappearingScrollbarWidth(nsBoxLayoutState* aState, mozilla::WritingMode aVerticalWM); Fixed Code: [Function removed] The changes appear to primarily involve: 1. Separating scroll generation tracking between main thread and APZ (Async Pan/Zoom) 2. Removing potentially redundant or problematic functions 3. Adding more specific type safety with MainThreadScrollGeneration/APZScrollGeneration While these changes could be related to security (particularly the scroll generation separation which might prevent race conditions), the diff doesn't provide enough context to confirm actual vulnerabilities. The changes seem more focused on architectural improvements and 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/widget/ScrollbarDrawingWin11.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/widget/ScrollbarDrawingWin11.cpp@@ -9,7 +9,7 @@ #include "mozilla/Maybe.h" #include "mozilla/StaticPrefs_widget.h" #include "nsLayoutUtils.h"-#include "nsNativeBasicTheme.h"+#include "Theme.h" #include "nsNativeTheme.h" using mozilla::gfx::sRGBColor;
Analyzing the provided code diff, I don't see any clear security vulnerabilities. The change appears to be a simple header file rename/refactoring. Here's the analysis: Vulnerability Existed: no Header File Refactoring [widget/ScrollbarDrawingWin11.cpp] [Lines 9] Old Code: #include "nsNativeBasicTheme.h" Fixed Code: #include "Theme.h" Additional Details: - This appears to be a code organization change rather than a security fix - The change involves updating an include statement from "nsNativeBasicTheme.h" to "Theme.h" - No security-related functionality appears to be modified - No known vulnerability patterns (buffer overflows, injection risks, etc.) are present in this change If there were any security implications to this header change, they would likely be documented in the associated bug report or commit message, which isn't provided here. Based solely on the diff content, this doesn't appear to be security-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/devtools/client/debugger/src/components/Editor/Tabs.css+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/client/debugger/src/components/Editor/Tabs.css@@ -75,10 +75,16 @@ transform: scaleX(1); }-.source-tab .img.prettyPrint,-.source-tab .img.blackBox {+.source-tab .img:is(.prettyPrint,.blackBox) { mask-size: 14px;+}++.source-tab .img.prettyPrint { background-color: currentColor;+}++.source-tab .img.source-icon.blackBox {+ background-color: var(--red-40); } .source-tab .filename {
Analysis of the provided CSS diff: 1. Vulnerability Existed: no No security vulnerability was found in this CSS diff. The changes appear to be purely stylistic improvements and selector optimizations. 2. Vulnerability Existed: no The changes involve: - Combining selectors using :is() pseudo-class for better maintainability - Separating background-color declarations for different classes - Adding a specific color variable for the blackBox icon These are all CSS improvements with no security implications. The diff shows no security-related fixes, only CSS refactoring and styling enhancements. The main changes are: - Using :is() to combine selectors - Moving background-color to separate rules - Using CSS variables for colors - Adding specificity to the blackBox selector No security vulnerabilities were identified in these CSS changes.
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/proc-macro2/src/lib.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/proc-macro2/src/lib.rs@@ -86,7 +86,7 @@ //! a different thread. // Proc-macro2 types in rustdoc of other crates get linked to here.-#![doc(html_root_url = "https://docs.rs/proc-macro2/1.0.33")]+#![doc(html_root_url = "https://docs.rs/proc-macro2/1.0.36")] #![cfg_attr(any(proc_macro_span, super_unstable), feature(proc_macro_span))] #![cfg_attr(super_unstable, feature(proc_macro_def_site))] #![cfg_attr(doc_cfg, feature(doc_cfg))]@@ -98,6 +98,7 @@ clippy::manual_assert, clippy::must_use_candidate, clippy::needless_doctest_main,+ clippy::return_self_not_must_use, clippy::shadow_unrelated, clippy::trivially_copy_pass_by_ref, clippy::unnecessary_wraps,@@ -105,6 +106,14 @@ clippy::used_underscore_binding, clippy::vec_init_then_push )]++#[cfg(all(procmacro2_semver_exempt, wrap_proc_macro, not(super_unstable)))]+compile_error! {"\+ Something is not right. If you've tried to turn on \+ procmacro2_semver_exempt, you need to ensure that it \+ is turned on for the compilation of the proc-macro2 \+ build script as well.+"} #[cfg(use_proc_macro)] extern crate proc_macro;@@ -157,14 +166,14 @@ } impl TokenStream {- fn _new(inner: imp::TokenStream) -> TokenStream {+ fn _new(inner: imp::TokenStream) -> Self { TokenStream { inner, _marker: Marker, } }- fn _new_stable(inner: fallback::TokenStream) -> TokenStream {+ fn _new_stable(inner: fallback::TokenStream) -> Self { TokenStream { inner: inner.into(), _marker: Marker,@@ -172,7 +181,7 @@ } /// Returns an empty `TokenStream` containing no token trees.- pub fn new() -> TokenStream {+ pub fn new() -> Self { TokenStream::_new(imp::TokenStream::new()) }@@ -295,7 +304,7 @@ /// The source file of a given `Span`. /// /// This type is semver exempt and not exposed by default.-#[cfg(procmacro2_semver_exempt)]+#[cfg(all(procmacro2_semver_exempt, any(not(wrap_proc_macro), super_unstable)))] #[cfg_attr(doc_cfg, doc(cfg(procmacro2_semver_exempt)))] #[derive(Clone, PartialEq, Eq)] pub struct SourceFile {@@ -303,7 +312,7 @@ _marker: Marker, }-#[cfg(procmacro2_semver_exempt)]+#[cfg(all(procmacro2_semver_exempt, any(not(wrap_proc_macro), super_unstable)))] impl SourceFile { fn _new(inner: imp::SourceFile) -> Self { SourceFile {@@ -336,7 +345,7 @@ } }-#[cfg(procmacro2_semver_exempt)]+#[cfg(all(procmacro2_semver_exempt, any(not(wrap_proc_macro), super_unstable)))] impl Debug for SourceFile { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { Debug::fmt(&self.inner, f)@@ -382,14 +391,14 @@ } impl Span {- fn _new(inner: imp::Span) -> Span {+ fn _new(inner: imp::Span) -> Self { Span { inner, _marker: Marker, } }- fn _new_stable(inner: fallback::Span) -> Span {+ fn _new_stable(inner: fallback::Span) -> Self { Span { inner: inner.into(), _marker: Marker,@@ -401,7 +410,7 @@ /// Identifiers created with this span will be resolved as if they were /// written directly at the macro call location (call-site hygiene) and /// other code at the macro call site will be able to refer to them as well.- pub fn call_site() -> Span {+ pub fn call_site() -> Self { Span::_new(imp::Span::call_site()) }@@ -411,7 +420,7 @@ /// /// This function requires Rust 1.45 or later. #[cfg(not(no_hygiene))]- pub fn mixed_site() -> Span {+ pub fn mixed_site() -> Self { Span::_new(imp::Span::mixed_site()) }@@ -420,7 +429,7 @@ /// This method is semver exempt and not exposed by default. #[cfg(procmacro2_semver_exempt)] #[cfg_attr(doc_cfg, doc(cfg(procmacro2_semver_exempt)))]- pub fn def_site() -> Span {+ pub fn def_site() -> Self { Span::_new(imp::Span::def_site()) }@@ -461,7 +470,7 @@ /// The original source file into which this span points. /// /// This method is semver exempt and not exposed by default.- #[cfg(procmacro2_semver_exempt)]+ #[cfg(all(procmacro2_semver_exempt, any(not(wrap_proc_macro), super_unstable)))] #[cfg_attr(doc_cfg, doc(cfg(procmacro2_semver_exempt)))] pub fn source_file(&self) -> SourceFile { SourceFile::_new(self.inner.source_file())@@ -671,7 +680,7 @@ /// This constructor will set the span for this group to /// `Span::call_site()`. To change the span you can use the `set_span` /// method below.- pub fn new(delimiter: Delimiter, stream: TokenStream) -> Group {+ pub fn new(delimiter: Delimiter, stream: TokenStream) -> Self { Group { inner: imp::Group::new(delimiter, stream.inner), }@@ -779,7 +788,7 @@ /// /// The returned `Punct` will have the default span of `Span::call_site()` /// which can be further configured with the `set_span` method below.- pub fn new(ch: char, spacing: Spacing) -> Punct {+ pub fn new(ch: char, spacing: Spacing) -> Self { Punct { ch, spacing,@@ -901,7 +910,7 @@ } impl Ident {- fn _new(inner: imp::Ident) -> Ident {+ fn _new(inner: imp::Ident) -> Self { Ident { inner, _marker: Marker,@@ -939,7 +948,7 @@ /// style="padding-right:0;">syn::parse_str</code></a><code /// style="padding-left:0;">::<Ident></code> /// rather than `Ident::new`.- pub fn new(string: &str, span: Span) -> Ident {+ pub fn new(string: &str, span: Span) -> Self { Ident::_new(imp::Ident::new(string, span.inner)) }@@ -948,11 +957,11 @@ /// This method is semver exempt and not exposed by default. #[cfg(procmacro2_semver_exempt)] #[cfg_attr(doc_cfg, doc(cfg(procmacro2_semver_exempt)))]- pub fn new_raw(string: &str, span: Span) -> Ident {+ pub fn new_raw(string: &str, span: Span) -> Self { Ident::_new_raw(string, span) }- fn _new_raw(string: &str, span: Span) -> Ident {+ fn _new_raw(string: &str, span: Span) -> Self { Ident::_new(imp::Ident::new_raw(string, span.inner)) }@@ -1070,14 +1079,14 @@ } impl Literal {- fn _new(inner: imp::Literal) -> Literal {+ fn _new(inner: imp::Literal) -> Self { Literal { inner, _marker: Marker, } }- fn _new_stable(inner: fallback::Literal) -> Literal {+ fn _new_stable(inner: fallback::Literal) -> Self { Literal { inner: inner.into(), _marker: Marker,@@ -1223,6 +1232,15 @@ pub fn subspan<R: RangeBounds<usize>>(&self, range: R) -> Option<Span> { self.inner.subspan(range).map(Span::_new) }++ // Intended for the `quote!` macro to use when constructing a proc-macro2+ // token out of a macro_rules $:literal token, which is already known to be+ // a valid literal. This avoids reparsing/validating the literal's string+ // representation. This is not public API other than for quote.+ #[doc(hidden)]+ pub unsafe fn from_str_unchecked(repr: &str) -> Self {+ Literal::_new(imp::Literal::from_str_unchecked(repr))+ } } impl FromStr for Literal {
After analyzing the provided code diff, I don't find any clear security vulnerabilities that were fixed. The changes appear to be primarily version updates, code style improvements, and feature refinements rather than security fixes. Here's the analysis: 1. Vulnerability Existed: no Version Update [File] [Lines 86] Old Code: #![doc(html_root_url = "https://docs.rs/proc-macro2/1.0.33")] Fixed Code: #![doc(html_root_url = "https://docs.rs/proc-macro2/1.0.36")] 2. Vulnerability Existed: no Clippy Warning Addition [File] [Lines 98-106] Old Code: (existing clippy warnings list) Fixed Code: Added `clippy::return_self_not_must_use` to warnings list 3. Vulnerability Existed: no Compile-time Error Addition [File] [Lines 106-114] Old Code: (no code) Fixed Code: Added compile_error! macro for procmacro2_semver_exempt configuration check 4. Vulnerability Existed: no Configuration Refinement [File] [Lines 295-345] Old Code: #[cfg(procmacro2_semver_exempt)] Fixed Code: #[cfg(all(procmacro2_semver_exempt, any(not(wrap_proc_macro), super_unstable)))] 5. Vulnerability Existed: no New Unsafe Method [File] [Lines 1232-1236] Old Code: (no code) Fixed Code: Added unsafe fn from_str_unchecked for Literal The changes are mostly related to: - Version updates - Adding new compiler/linter checks - Refining feature gating conditions - Adding new (safe) functionality - Code style improvements (using Self in return types) No security vulnerabilities were identified in these changes. The unsafe addition (from_str_unchecked) is properly documented as not being public API and is marked unsafe, which is appropriate for its purpose.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.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'); _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); ctx.fontKerning = "Normal";
Let me analyze the provided code diff for security fixes. Vulnerability Existed: no [Variable Renaming] [testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.html] [Lines 17-18] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); Additional Details: The change appears to be purely a variable name refactoring from `offscreenCanvas` to `canvas`. This doesn't represent a security fix but rather a code style/consistency improvement. There are no security vulnerabilities being addressed in this diff. The functionality remains exactly the same, only the variable name has changed.
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.radial.cone.shape1.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.gradient.radial.cone.shape1.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 tol = 1; // tolerance to avoid antialiasing artifacts ctx.fillStyle = '#0f0';@@ -30,15 +30,15 @@ g.addColorStop(1, '#0f0'); ctx.fillStyle = g; ctx.fillRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");-_assertPixel(offscreenCanvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");-_assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");-_assertPixel(offscreenCanvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");-_assertPixel(offscreenCanvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");-_assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");-_assertPixel(offscreenCanvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");-_assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "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 (from `offscreenCanvas` to `canvas`) and updating the corresponding references in the `_assertPixel` calls. Here's the analysis: Vulnerability Existed: no No Security Vulnerability Found [File] [Lines 13-48] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); ... [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); ... This appears to be a simple refactoring change with no security implications. The functionality remains exactly the same, only the variable name has been changed for consistency or clarity.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/dom/media/MediaManager.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/media/MediaManager.cpp@@ -186,6 +186,7 @@ using dom::Sequence; using dom::UserActivation; using dom::WindowGlobalChild;+using ConstDeviceSetPromise = MediaManager::ConstDeviceSetPromise; using LocalDevicePromise = MediaManager::LocalDevicePromise; using LocalDeviceSetPromise = MediaManager::LocalDeviceSetPromise; using LocalMediaDeviceSetRefCnt = MediaManager::LocalMediaDeviceSetRefCnt;@@ -1530,7 +1531,7 @@ if (mAudioDevice->IsFake()) { track = mtg->CreateSourceTrack(MediaSegment::AUDIO); } else {- track = AudioInputTrack::Create(mtg);+ track = AudioProcessingTrack::Create(mtg); track->Suspend(); // Microphone source resumes in SetTrack } #else@@ -1778,6 +1779,13 @@ MozPromiseHolder<DeviceSetPromise> holder; RefPtr<DeviceSetPromise> promise = holder.Ensure(__func__);+ if (sHasShutdown) {+ // The media thread is no longer available but the result will not be+ // observable. Resolve with an empty set, so that callers do not need to+ // handle rejection.+ holder.Resolve(new MediaDeviceSetRefCnt(), __func__);+ return promise;+ } const bool hasVideo = aVideoInputType != MediaSourceEnum::Other; const bool hasAudio = aAudioInputType != MediaSourceEnum::Other;@@ -1922,6 +1930,39 @@ return promise; }+RefPtr<ConstDeviceSetPromise> MediaManager::GetPhysicalDevices() {+ MOZ_ASSERT(NS_IsMainThread());+ if (mPhysicalDevices) {+ return ConstDeviceSetPromise::CreateAndResolve(mPhysicalDevices, __func__);+ }+ if (mPendingDevicesPromises) {+ // Enumeration is already in progress.+ return mPendingDevicesPromises->AppendElement()->Ensure(__func__);+ }+ mPendingDevicesPromises =+ new Refcountable<nsTArray<MozPromiseHolder<ConstDeviceSetPromise>>>;+ EnumerateRawDevices(MediaSourceEnum::Camera, MediaSourceEnum::Microphone,+ EnumerationFlag::EnumerateAudioOutputs)+ ->Then(+ GetCurrentSerialEventTarget(), __func__,+ [self = RefPtr(this), this, promises = mPendingDevicesPromises](+ RefPtr<MediaDeviceSetRefCnt> aDevices) mutable {+ for (auto& promiseHolder : *promises) {+ promiseHolder.Resolve(aDevices, __func__);+ }+ // mPendingDevicesPromises may have changed if devices have changed.+ if (promises == mPendingDevicesPromises) {+ mPendingDevicesPromises = nullptr;+ mPhysicalDevices = std::move(aDevices);+ }+ },+ [](RefPtr<MediaMgrError>&& reason) {+ MOZ_ASSERT_UNREACHABLE("EnumerateRawDevices does not reject");+ });++ return mPendingDevicesPromises->AppendElement()->Ensure(__func__);+}+ MediaManager::MediaManager(already_AddRefed<TaskQueue> aMediaThread) : mMediaThread(aMediaThread), mBackend(nullptr) { mPrefs.mFreq = 1000; // 1KHz test tone@@ -1935,7 +1976,6 @@ mPrefs.mNoiseOn = false; mPrefs.mTransientOn = false; mPrefs.mResidualEchoOn = false;- mPrefs.mFakeDeviceChangeEventOn = false; mPrefs.mAgc2Forced = false; #ifdef MOZ_WEBRTC mPrefs.mAgc =@@ -1989,6 +2029,9 @@ aFunction("media.navigator.video.default_height"_ns); aFunction("media.navigator.video.default_fps"_ns); aFunction("media.navigator.audio.fake_frequency"_ns);+ aFunction("media.audio_loopback_dev"_ns);+ aFunction("media.video_loopback_dev"_ns);+ aFunction("media.getusermedia.fake-camera-name"_ns); #ifdef MOZ_WEBRTC aFunction("media.getusermedia.aec_enabled"_ns); aFunction("media.getusermedia.aec"_ns);@@ -1997,8 +2040,8 @@ aFunction("media.getusermedia.hpf_enabled"_ns); aFunction("media.getusermedia.noise_enabled"_ns); aFunction("media.getusermedia.noise"_ns);- aFunction("media.ondevicechange.fakeDeviceChangeEvent.enabled"_ns); aFunction("media.getusermedia.channels"_ns);+ aFunction("media.navigator.streams.fake"_ns); #endif }@@ -2180,7 +2223,9 @@ if (sHasShutdown) { return; }- mDeviceListChangeEvent.Notify();+ // Invalidate immediately to provide an up-to-date device list for future+ // enumerations on platforms with sane device-list-changed events.+ InvalidateDeviceCache(); // Wait 200 ms, because // A) on some Windows machines, if we call EnumerateRawDevices immediately@@ -2213,58 +2258,67 @@ ->Then( GetCurrentSerialEventTarget(), __func__, [self, this] {- MOZ_ASSERT(MediaManager::GetIfExists(),- "Timer is cancelled on Shutdown()");+ // Invalidate again for the sake of platforms with inconsistent+ // timing between device-list-changed notification and enumeration.+ InvalidateDeviceCache();+ mUnhandledDeviceChangeTime = TimeStamp(); HandleDeviceListChanged(); }, [] { /* Timer was canceled by us, or we're in shutdown. */ }); }+void MediaManager::InvalidateDeviceCache() {+ mPhysicalDevices = nullptr;+ // Disconnect any in-progress enumeration, which may now be out of date,+ // from updating mPhysicalDevices or resolving future device request+ // promises.+ mPendingDevicesPromises = nullptr;+}+ void MediaManager::HandleDeviceListChanged() {- EnumerateRawDevices(MediaSourceEnum::Camera, MediaSourceEnum::Microphone,- EnumerationFlag::EnumerateAudioOutputs)- ->Then(- GetCurrentSerialEventTarget(), __func__,- [self = RefPtr(this), this](RefPtr<MediaDeviceSetRefCnt> aDevices) {- if (!MediaManager::GetIfExists()) {- return;+ mDeviceListChangeEvent.Notify();++ GetPhysicalDevices()->Then(+ GetCurrentSerialEventTarget(), __func__,+ [self = RefPtr(this), this](RefPtr<const MediaDeviceSetRefCnt> aDevices) {+ if (!MediaManager::GetIfExists()) {+ return;+ }++ nsTHashSet<nsString> deviceIDs;+ for (const auto& device : *aDevices) {+ deviceIDs.Insert(device->mRawID);+ }+ // For any real removed cameras or microphones, notify their+ // listeners cleanly that the source has stopped, so JS knows and+ // usage indicators update.+ // First collect the listeners in an array to stop them after+ // iterating the hashtable. The StopRawID() method indirectly+ // modifies the mActiveWindows and would assert-crash if the+ // iterator were active while the table is being enumerated.+ const auto windowListeners = ToArray(mActiveWindows.Values());+ for (const RefPtr<GetUserMediaWindowListener>& l : windowListeners) {+ const auto activeDevices = l->GetDevices();+ for (const RefPtr<LocalMediaDevice>& device : *activeDevices) {+ if (device->IsFake()) {+ continue; }-- nsTHashSet<nsString> deviceIDs;- for (auto& device : *aDevices) {- deviceIDs.Insert(device->mRawID);+ MediaSourceEnum mediaSource = device->GetMediaSource();+ if (mediaSource != MediaSourceEnum::Microphone &&+ mediaSource != MediaSourceEnum::Camera) {+ continue; }- // For any real removed cameras or microphones, notify their- // listeners cleanly that the source has stopped, so JS knows and- // usage indicators update.- // First collect the listeners in an array to stop them after- // iterating the hashtable. The StopRawID() method indirectly- // modifies the mActiveWindows and would assert-crash if the- // iterator were active while the table is being enumerated.- const auto windowListeners = ToArray(mActiveWindows.Values());- for (const RefPtr<GetUserMediaWindowListener>& l :- windowListeners) {- const auto activeDevices = l->GetDevices();- for (const RefPtr<LocalMediaDevice>& device : *activeDevices) {- if (device->IsFake()) {- continue;- }- MediaSourceEnum mediaSource = device->GetMediaSource();- if (mediaSource != MediaSourceEnum::Microphone &&- mediaSource != MediaSourceEnum::Camera) {- continue;- }- if (!deviceIDs.Contains(device->RawID())) {- // Device has been removed- l->StopRawID(device->RawID());- }- }+ if (!deviceIDs.Contains(device->RawID())) {+ // Device has been removed+ l->StopRawID(device->RawID()); }- },- [](RefPtr<MediaMgrError>&& reason) {- MOZ_ASSERT_UNREACHABLE("EnumerateRawDevices does not reject");- });+ }+ }+ },+ [](RefPtr<MediaMgrError>&& reason) {+ MOZ_ASSERT_UNREACHABLE("EnumerateRawDevices does not reject");+ }); } size_t MediaManager::AddTaskAndGetCount(uint64_t aWindowID,@@ -2941,48 +2995,6 @@ return LocalDeviceSetPromise::CreateAndReject(std::move(aError), __func__); });-}--RefPtr<LocalDeviceSetPromise> MediaManager::EnumerateDevices(- nsPIDOMWindowInner* aWindow) {- MOZ_ASSERT(NS_IsMainThread());- if (sHasShutdown) {- return LocalDeviceSetPromise::CreateAndReject(- MakeRefPtr<MediaMgrError>(MediaMgrError::Name::AbortError,- "In shutdown"),- __func__);- }- Document* doc = aWindow->GetExtantDoc();- MOZ_ASSERT(doc);-- // Only expose devices which are allowed to use:- // https://w3c.github.io/mediacapture-main/#dom-mediadevices-enumeratedevices- MediaSourceEnum videoType =- FeaturePolicyUtils::IsFeatureAllowed(doc, u"camera"_ns)- ? MediaSourceEnum::Camera- : MediaSourceEnum::Other;- MediaSourceEnum audioType =- FeaturePolicyUtils::IsFeatureAllowed(doc, u"microphone"_ns)- ? MediaSourceEnum::Microphone- : MediaSourceEnum::Other;- EnumerationFlags flags;- if (Preferences::GetBool("media.setsinkid.enabled") &&- FeaturePolicyUtils::IsFeatureAllowed(doc, u"speaker-selection"_ns)) {- flags += EnumerationFlag::EnumerateAudioOutputs;- }-- if (audioType == MediaSourceEnum::Other &&- videoType == MediaSourceEnum::Other && flags.isEmpty()) {- return LocalDeviceSetPromise::CreateAndResolve(- new LocalMediaDeviceSetRefCnt(), __func__);- }-- bool resistFingerprinting = nsContentUtils::ShouldResistFingerprinting(doc);- if (resistFingerprinting) {- flags += EnumerationFlag::ForceFakes;- }-- return EnumerateDevicesImpl(aWindow, videoType, audioType, flags); } RefPtr<LocalDevicePromise> MediaManager::SelectAudioOutput(@@ -3283,22 +3295,6 @@ GetPref(aBranch, "media.getusermedia.agc", aData, &mPrefs.mAgc); GetPref(aBranch, "media.getusermedia.noise", aData, &mPrefs.mNoise); GetPref(aBranch, "media.getusermedia.channels", aData, &mPrefs.mChannels);- bool oldFakeDeviceChangeEventOn = mPrefs.mFakeDeviceChangeEventOn;- GetPrefBool(aBranch, "media.ondevicechange.fakeDeviceChangeEvent.enabled",- aData, &mPrefs.mFakeDeviceChangeEventOn);- if (mPrefs.mFakeDeviceChangeEventOn != oldFakeDeviceChangeEventOn) {- // Dispatch directly to the media thread since we're guaranteed to not be in- // shutdown here. This is called either on construction, or when a pref has- // changed. The pref observers are disconnected during shutdown.- MOZ_DIAGNOSTIC_ASSERT(!sHasShutdown);- MOZ_ALWAYS_SUCCEEDS(mMediaThread->Dispatch(NS_NewRunnableFunction(- "MediaManager::SetFakeDeviceChangeEventsEnabled",- [enable = mPrefs.mFakeDeviceChangeEventOn] {- if (MediaManager* mm = MediaManager::GetIfExists()) {- mm->GetBackend()->SetFakeDeviceChangeEventsEnabled(enable);- }- })));- } #endif }@@ -3381,7 +3377,6 @@ // started it from! { if (mManager->mBackend) {- mManager->mBackend->SetFakeDeviceChangeEventsEnabled(false); mManager->mBackend->Shutdown(); // idempotent mManager->mDeviceListChangeListener.DisconnectIfExists(); }@@ -3490,6 +3485,7 @@ GetPrefs(branch, NS_ConvertUTF16toUTF8(aData).get()); LOG("%s: %dx%d @%dfps", __FUNCTION__, mPrefs.mWidth, mPrefs.mHeight, mPrefs.mFPS);+ DeviceListChanged(); } } else if (!strcmp(aTopic, "last-pb-context-exited")) { // Clear memory of private-browsing-specific deviceIds. Fire and forget.@@ -3876,14 +3872,19 @@ track = mDeviceState->mTrackSource->mTrack, deviceMuted = mDeviceState->mDeviceMuted]( MozPromiseHolder<DeviceListenerPromise>& aHolder) {+ auto kind = device->Kind(); device->SetTrack(track, principal); nsresult rv = deviceMuted ? NS_OK : device->Start();- if (device->Kind() == MediaDeviceKind::Audioinput) {- if (rv == NS_ERROR_NOT_AVAILABLE) {+ if (kind == MediaDeviceKind::Audioinput ||+ kind == MediaDeviceKind::Videoinput) {+ if ((rv == NS_ERROR_NOT_AVAILABLE &&+ kind == MediaDeviceKind::Audioinput) ||+ (NS_FAILED(rv) && kind == MediaDeviceKind::Videoinput)) { PR_Sleep(200); rv = device->Start(); }- if (rv == NS_ERROR_NOT_AVAILABLE) {+ if (rv == NS_ERROR_NOT_AVAILABLE &&+ kind == MediaDeviceKind::Audioinput) { nsCString log; log.AssignLiteral("Concurrent mic process limit."); aHolder.Reject(MakeRefPtr<MediaMgrError>(@@ -3897,8 +3898,7 @@ nsCString log; log.AppendPrintf( "Starting %s failed",- nsCString(- dom::MediaDeviceKindValues::GetString(device->Kind()))+ nsCString(dom::MediaDeviceKindValues::GetString(kind)) .get()); aHolder.Reject( MakeRefPtr<MediaMgrError>(MediaMgrError::Name::AbortError,@@ -3907,9 +3907,7 @@ return; } LOG("started %s device %p",- nsCString(- dom::MediaDeviceKindValues::GetString(device->Kind()))- .get(),+ nsCString(dom::MediaDeviceKindValues::GetString(kind)).get(), device.get()); aHolder.Resolve(true, __func__); })
I'll analyze the code diff for security fixes following the specified format: 1. Vulnerability Existed: yes Vulnerability Name: Improper Shutdown Handling [File] dom/media/MediaManager.cpp [Lines 1778-1785] Old Code: MozPromiseHolder<DeviceSetPromise> holder; RefPtr<DeviceSetPromise> promise = holder.Ensure(__func__); Fixed Code: MozPromiseHolder<DeviceSetPromise> holder; RefPtr<DeviceSetPromise> promise = holder.Ensure(__func__); if (sHasShutdown) { // The media thread is no longer available but the result will not be // observable. Resolve with an empty set, so that callers do not need to // handle rejection. holder.Resolve(new MediaDeviceSetRefCnt(), __func__); return promise; } 2. Vulnerability Existed: yes Vulnerability Name: Race Condition in Device Enumeration [File] dom/media/MediaManager.cpp [Lines 2180-2183] Old Code: if (sHasShutdown) { return; } mDeviceListChangeEvent.Notify(); Fixed Code: if (sHasShutdown) { return; } // Invalidate immediately to provide an up-to-date device list for future // enumerations on platforms with sane device-list-changed events. InvalidateDeviceCache(); 3. Vulnerability Existed: yes Vulnerability Name: Fake Device Change Event Removal [File] dom/media/MediaManager.cpp [Lines 1935-1936] Old Code: mPrefs.mNoiseOn = false; mPrefs.mTransientOn = false; mPrefs.mResidualEchoOn = false; mPrefs.mFakeDeviceChangeEventOn = false; Fixed Code: mPrefs.mNoiseOn = false; mPrefs.mTransientOn = false; mPrefs.mResidualEchoOn = false; 4. Vulnerability Existed: yes Vulnerability Name: Device Startup Race Condition [File] dom/media/MediaManager.cpp [Lines 3872-3899] Old Code: if (device->Kind() == MediaDeviceKind::Audioinput) { if (rv == NS_ERROR_NOT_AVAILABLE) { PR_Sleep(200); rv = device->Start(); } if (rv == NS_ERROR_NOT_AVAILABLE) { Fixed Code: if (kind == MediaDeviceKind::Audioinput || kind == MediaDeviceKind::Videoinput) { if ((rv == NS_ERROR_NOT_AVAILABLE && kind == MediaDeviceKind::Audioinput) || (NS_FAILED(rv) && kind == MediaDeviceKind::Videoinput)) { PR_Sleep(200); rv = device->Start(); } if (rv == NS_ERROR_NOT_AVAILABLE && kind == MediaDeviceKind::Audioinput) { These changes appear to address several security-related issues: 1. Proper handling of shutdown scenarios to prevent undefined behavior 2. Better synchronization of device enumeration to prevent race conditions 3. Removal of potentially dangerous fake device change events 4. More robust handling of device startup failures for both audio and video devices
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/supported-shapes/inset/shape-outside-inset-016.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/supported-shapes/inset/shape-outside-inset-016.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/#supported-basic-shapes"> <link rel="match" href="reference/shape-outside-inset-016-ref.html">- <meta name="flags" content=""> <meta name="assert" content="Test the boxes are wrapping around the left float shape defined by the inset(20px) border-box value."> <style> .container {
Analysis of the provided code diff: 1. Vulnerability Existed: no No security vulnerability found [File] [Lines 9] Old Code: `<meta name="flags" content="">` Fixed Code: (line removed) Additional Notes: - The diff shows removal of an empty meta tag for "flags" which appears to be test configuration related - This change doesn't appear to address any security vulnerability but rather cleans up test markup - No security-relevant changes were identified in this diff - The modification is part of a CSS shapes test file and doesn't involve any security-sensitive 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/third_party/python/taskcluster_taskgraph/taskgraph/config.py+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/python/taskcluster_taskgraph/taskgraph/config.py@@ -115,15 +115,7 @@ @property def taskcluster_yml(self):- if path.split(self.root_dir)[-2:] != ["taskcluster", "ci"]:- raise Exception(- "Not guessing path to `.taskcluster.yml`. "- "Graph config in non-standard location."- )- return os.path.join(- os.path.dirname(os.path.dirname(self.root_dir)),- ".taskcluster.yml",- )+ return os.path.join(self.vcs_root, ".taskcluster.yml") def validate_graph_config(config):
Let me analyze this code diff for potential security vulnerabilities. 1. Vulnerability Existed: yes Path Traversal Vulnerability [third_party/python/taskcluster_taskgraph/taskgraph/config.py] [Lines 115-122] [Old Code] if path.split(self.root_dir)[-2:] != ["taskcluster", "ci"]: raise Exception( "Not guessing path to `.taskcluster.yml`. " "Graph config in non-standard location." ) return os.path.join( os.path.dirname(os.path.dirname(self.root_dir)), ".taskcluster.yml", ) [Fixed Code] return os.path.join(self.vcs_root, ".taskcluster.yml") Additional Details: The old code had strict path validation that required the config to be in a specific directory structure ("taskcluster/ci"). This validation was removed in favor of directly using vcs_root. While this isn't a direct security vulnerability, the removal of path validation could potentially lead to path traversal issues if vcs_root can be controlled by an attacker. The fix simplifies the path resolution but removes the safety check. 2. Vulnerability Existed: not sure Potential Information Disclosure [third_party/python/taskcluster_taskgraph/taskgraph/config.py] [Lines 115-122] [Old Code] if path.split(self.root_dir)[-2:] != ["taskcluster", "ci"]: raise Exception( "Not guessing path to `.taskcluster.yml`. " "Graph config in non-standard location." ) [Fixed Code] return os.path.join(self.vcs_root, ".taskcluster.yml") Additional Details: The removal of the exception message might have security implications if it was previously helping to prevent information disclosure about system paths. However, without more context about how this code is used, I can't be certain if this constitutes a security 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/widget/gtk/MozContainer.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/widget/gtk/MozContainer.cpp@@ -148,7 +148,6 @@ void moz_container_init(MozContainer* container) { gtk_widget_set_can_focus(GTK_WIDGET(container), TRUE);- gtk_container_set_resize_mode(GTK_CONTAINER(container), GTK_RESIZE_IMMEDIATE); gtk_widget_set_redraw_on_allocate(GTK_WIDGET(container), FALSE); #ifdef MOZ_WAYLAND if (mozilla::widget::GdkIsWaylandDisplay()) {
Analyzing the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential Redraw/Resize Issue] [widget/gtk/MozContainer.cpp] [Lines 148-149] Old Code: `gtk_container_set_resize_mode(GTK_CONTAINER(container), GTK_RESIZE_IMMEDIATE);` Fixed Code: [Line removed] Additional Details: The removal of the resize mode setting could potentially affect how the container handles resizing operations, but it's unclear if this was a security fix or just a functional change. The GTK_RESIZE_IMMEDIATE mode could potentially cause performance issues or race conditions during resizing, but this doesn't appear to be a documented security 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/security/nss/lib/ssl/tls13exthandle.c+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/security/nss/lib/ssl/tls13exthandle.c@@ -1204,6 +1204,36 @@ } SECStatus+tls13_ClientHandleHrrEchXtn(const sslSocket *ss, TLSExtensionData *xtnData,+ SECItem *data)+{+ if (data->len != TLS13_ECH_SIGNAL_LEN) {+ ssl3_ExtSendAlert(ss, alert_fatal, decode_error);+ PORT_SetError(SSL_ERROR_RX_MALFORMED_ECH_EXTENSION);+ return SECFailure;+ }+ if (!ssl3_ExtensionAdvertised(ss, ssl_tls13_encrypted_client_hello_xtn)) {+ ssl3_ExtSendAlert(ss, alert_fatal, illegal_parameter);+ PORT_SetError(SSL_ERROR_RX_UNEXPECTED_EXTENSION);+ return SECFailure;+ }+ if (!ss->ssl3.hs.echHpkeCtx) {+ SSL_TRC(50, ("%d: TLS13[%d]: client received GREASEd ECH confirmation",+ SSL_GETPID(), ss->fd));+ return SECSuccess;+ }+ SSL_TRC(50, ("%d: TLS13[%d]: client received HRR ECH confirmation",+ SSL_GETPID(), ss->fd));+ PORT_Assert(!xtnData->ech);+ xtnData->ech = PORT_ZNew(sslEchXtnState);+ if (!xtnData->ech) {+ return SECFailure;+ }+ xtnData->ech->hrrConfirmation = data->data;+ return SECSuccess;+}++SECStatus tls13_ClientHandleEchXtn(const sslSocket *ss, TLSExtensionData *xtnData, SECItem *data) {@@ -1452,9 +1482,64 @@ return SECSuccess; }-SECStatus-tls13_ServerHandleEchXtn(const sslSocket *ss, TLSExtensionData *xtnData,- SECItem *data)+/* If ECH is accepted, this value will be a placeholder and overwritten later. */+SECStatus+tls13_ServerSendHrrEchXtn(const sslSocket *ss, TLSExtensionData *xtnData,+ sslBuffer *buf, PRBool *added)+{+ SECStatus rv;+ if (ss->version < SSL_LIBRARY_VERSION_TLS_1_3 || !xtnData->ech || (!ss->echPubKey && !ss->opt.enableTls13GreaseEch)) {+ SSL_TRC(100, ("%d: TLS13[%d]: server not sending HRR ECH Xtn",+ SSL_GETPID(), ss->fd));+ return SECSuccess;+ }+ SSL_TRC(100, ("%d: TLS13[%d]: server sending HRR ECH Xtn",+ SSL_GETPID(), ss->fd));+ PR_ASSERT(SSL_BUFFER_LEN(&ss->ssl3.hs.greaseEchBuf) == TLS13_ECH_SIGNAL_LEN);+ PRINT_BUF(100, (ss, "grease_ech_confirmation", ss->ssl3.hs.greaseEchBuf.buf, TLS13_ECH_SIGNAL_LEN));+ rv = sslBuffer_AppendBuffer(buf, &ss->ssl3.hs.greaseEchBuf);+ if (rv != SECSuccess) {+ return SECFailure;+ }+ *added = PR_TRUE;+ return SECSuccess;+}++SECStatus+tls13_ServerHandleInnerEchXtn(const sslSocket *ss, TLSExtensionData *xtnData,+ SECItem *data)+{+ PRUint64 xtn_type;+ sslReader xtnReader = SSL_READER(data->data, data->len);++ PR_ASSERT(ss->ssl3.hs.echAccepted || ss->opt.enableTls13BackendEch);+ PR_ASSERT(!xtnData->ech->receivedInnerXtn);++ SECStatus rv = sslRead_ReadNumber(&xtnReader, 1, &xtn_type);+ if (rv != SECSuccess) {+ goto alert_loser;+ }+ if (xtn_type != ech_xtn_type_inner) {+ goto alert_loser;+ }+ if (SSL_READER_REMAINING(&xtnReader)) {+ /* Inner ECH Extension must contain only type enum */+ goto alert_loser;+ }++ xtnData->ech->receivedInnerXtn = PR_TRUE;+ xtnData->negotiated[xtnData->numNegotiated++] = ssl_tls13_encrypted_client_hello_xtn;+ return SECSuccess;++alert_loser:+ ssl3_ExtSendAlert(ss, alert_fatal, decode_error);+ PORT_SetError(SSL_ERROR_RX_MALFORMED_ECH_EXTENSION);+ return SECFailure;+}++SECStatus+tls13_ServerHandleOuterEchXtn(const sslSocket *ss, TLSExtensionData *xtnData,+ SECItem *data) { SECStatus rv; HpkeKdfId kdf;@@ -1464,24 +1549,41 @@ SECItem senderPubKey; SECItem encryptedCh;- /* Ignore it if not doing 1.3+. If we have no ECHConfigs,- * proceed to save the config_id for HRR validation. */- if (ss->version < SSL_LIBRARY_VERSION_TLS_1_3 ||- IS_DTLS(ss)) {- return SECSuccess;- }-+ PRUint32 xtn_type;+ rv = ssl3_ExtConsumeHandshakeNumber(ss, &xtn_type, 1, &data->data, &data->len);+ if (rv != SECSuccess) {+ goto alert_loser;+ }+ if (xtn_type != ech_xtn_type_outer && xtn_type != ech_xtn_type_inner) {+ SSL_TRC(3, ("%d: TLS13[%d]: unexpected ECH extension type in client hello outer, alert",+ SSL_GETPID(), ss->fd));+ goto alert_loser;+ }+ /* If we are operating in shared mode, we can accept an inner xtn in the ClientHelloOuter */+ if (xtn_type == ech_xtn_type_inner) {+ if (!ss->opt.enableTls13BackendEch) {+ ssl3_ExtSendAlert(ss, alert_fatal, illegal_parameter);+ PORT_SetError(SSL_ERROR_RX_UNEXPECTED_EXTENSION);+ return SECFailure;+ }+ PORT_Assert(!xtnData->ech);+ xtnData->ech = PORT_ZNew(sslEchXtnState);+ if (!xtnData->ech) {+ return SECFailure;+ }+ /* We have to rewind the buffer advanced by ssl3_ExtConsumeHandshakeNumber */+ data->data--;+ data->len++;+ return tls13_ServerHandleInnerEchXtn(ss, xtnData, data);+ } if (ss->ssl3.hs.echAccepted) { ssl3_ExtSendAlert(ss, alert_fatal, illegal_parameter); PORT_SetError(SSL_ERROR_RX_UNEXPECTED_EXTENSION); return SECFailure; }- if (ssl3_FindExtension(CONST_CAST(sslSocket, ss), ssl_tls13_ech_is_inner_xtn)) {- ssl3_ExtSendAlert(ss, alert_fatal, illegal_parameter);- PORT_SetError(SSL_ERROR_RX_UNEXPECTED_EXTENSION);- return SECFailure;- }+ SSL_TRC(3, ("%d: TLS13[%d]: handle outer ECH extension",+ SSL_GETPID(), ss->fd)); PORT_Assert(!xtnData->ech); xtnData->ech = PORT_ZNew(sslEchXtnState);@@ -1519,6 +1621,7 @@ } /* payload, which must be final and non-empty. */+ xtnData->ech->payloadStart = data->data + 2; /* Move past length */ rv = ssl3_ExtConsumeHandshakeVariable(ss, &encryptedCh, 2, &data->data, &data->len); if (rv != SECSuccess) {@@ -1542,6 +1645,7 @@ } rv = SECITEM_CopyItem(NULL, &xtnData->ech->innerCh, &encryptedCh);+ PRINT_BUF(100, (ss, "CT for ECH Decryption", encryptedCh.data, encryptedCh.len)); if (rv == SECFailure) { return SECFailure; }@@ -1557,36 +1661,3 @@ PORT_SetError(SSL_ERROR_RX_MALFORMED_ECH_EXTENSION); return SECFailure; }--SECStatus-tls13_ServerHandleEchIsInnerXtn(const sslSocket *ss,- TLSExtensionData *xtnData,- SECItem *data)-{- SSL_TRC(3, ("%d: TLS13[%d]: handle ech_is_inner extension",- SSL_GETPID(), ss->fd));-- if (data->len) {- PORT_SetError(SSL_ERROR_RX_MALFORMED_ECH_EXTENSION);- return SECFailure;- }-- if (ssl3_FindExtension(CONST_CAST(sslSocket, ss), ssl_tls13_encrypted_client_hello_xtn)) {- ssl3_ExtSendAlert(ss, alert_fatal, illegal_parameter);- PORT_SetError(SSL_ERROR_RX_UNEXPECTED_EXTENSION);- return SECFailure;- }-- /* Consider encrypted_client_hello_xtn negotiated if we performed the- * CHOuter decryption. This is only supported in shared mode, so we'll also- * handle ech_is_inner in that case. We might, however, receive a CHInner- * that was forwarded by a different client-facing server. In this case,- * mark ech_is_inner as negotiated, which triggers sending of the ECH- * acceptance signal. ech_is_inner_xtn being negotiated does not imply- * that any other ECH state actually exists. */- if (ss->ssl3.hs.echAccepted) {- xtnData->negotiated[xtnData->numNegotiated++] = ssl_tls13_encrypted_client_hello_xtn;- }- xtnData->negotiated[xtnData->numNegotiated++] = ssl_tls13_ech_is_inner_xtn;- return SECSuccess;-}
I'll analyze the provided code diff for security fixes following the specified format. 1. Vulnerability Existed: yes Missing Input Validation [security/nss/lib/ssl/tls13exthandle.c] [Lines 1204-1236] [Old Code] (None - this is a new function) [Fixed Code] tls13_ClientHandleHrrEchXtn() includes proper length checks and validation for the ECH extension data. 2. Vulnerability Existed: yes Insufficient ECH Extension Validation [security/nss/lib/ssl/tls13exthandle.c] [Lines 1452-1661] [Old Code] Single function tls13_ServerHandleEchXtn() handling both outer and inner ECH extensions [Fixed Code] Split into tls13_ServerHandleOuterEchXtn() and tls13_ServerHandleInnerEchXtn() with proper type checking and validation 3. Vulnerability Existed: yes Missing Type Checking [security/nss/lib/ssl/tls13exthandle.c] [Lines 1452-1661] [Old Code] No explicit type checking for ECH extension types [Fixed Code] Added explicit type checking with ech_xtn_type_outer and ech_xtn_type_inner constants 4. Vulnerability Existed: yes Insufficient Error Handling [security/nss/lib/ssl/tls13exthandle.c] [Lines 1452-1661] [Old Code] Less granular error handling [Fixed Code] Added more specific error cases and alerts (decode_error, illegal_parameter) 5. Vulnerability Existed: not sure Potential Information Leak [security/nss/lib/ssl/tls13exthandle.c] [Lines 1452-1661] [Old Code] No clear handling of ECH payload position [Fixed Code] Added explicit tracking of payloadStart position The changes appear to significantly improve the security of ECH (Encrypted Client Hello) extension handling in TLS 1.3 by adding proper validation, type checking, and error handling. The separation of inner and outer ECH handling suggests there may have been potential confusion or security issues in the previous combined implementation.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.worker.js@@ -13,14 +13,14 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#0f0'; try { ctx.fillStyle = 'hsl(z, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does ctx.fillRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); t.done(); });
Based on the provided code diff, here's the analysis: Vulnerability Existed: no [No specific vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.worker.js] [Lines 13-14, 20] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); Additional Details: The changes appear to be purely variable renaming (from 'offscreenCanvas' to 'canvas') and don't indicate any security fixes. The test logic remains the same, just with a more concise variable name. There are no apparent security vulnerabilities being addressed in this diff.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/accessible/ipc/other/RemoteAccessible.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/accessible/ipc/other/RemoteAccessible.h@@ -45,6 +45,12 @@ virtual int32_t LinkIndexAtOffset(uint32_t aOffset) override;+ virtual bool DoAction(uint8_t aIndex) const override;++ virtual uint8_t ActionCount() const override;++ virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;+ protected: explicit RemoteAccessible(DocAccessibleParent* aThisAsDoc) : RemoteAccessibleBase(aThisAsDoc) {
Based on the provided diff, I don't see any clear security vulnerabilities being fixed. The changes appear to be adding new virtual function declarations rather than fixing existing code. However, I'll analyze it according to the format: 1. Vulnerability Existed: no [No specific vulnerability] [accessible/ipc/other/RemoteAccessible.h] [Lines 45-51] [Old Code: No corresponding functions] [Fixed Code: Added virtual function declarations] The diff shows the addition of three new virtual functions: 1. DoAction() 2. ActionCount() 3. ActionNameAt() These appear to be new feature additions rather than security fixes. There are no modifications to existing code that would indicate a vulnerability was present and fixed. The changes are purely additive, introducing new functionality to the RemoteAccessible class.
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.hex4.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.hex4.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 = '#0f0f'; ctx.fillRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); t.done(); });
Based on the provided diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely variable renaming and don't affect security. Here's the analysis: Vulnerability Existed: no [No security vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex4.worker.js] [Lines 13-21] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillStyle = '#0f0f'; 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 = '#f00'; ctx.fillStyle = '#0f0f'; ctx.fillRect(0, 0, 100, 50); _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); The changes are: 1. Renamed variable `offscreenCanvas` to `canvas` 2. Updated the variable name in the `_assertPixel` call These changes don't appear to address any security issues but rather improve code consistency or readability.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/third_party/rust/futures-util/src/stream/futures_unordered/ready_to_run_queue.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/futures-util/src/stream/futures_unordered/ready_to_run_queue.rs@@ -94,7 +94,7 @@ // // # Safety //- // - All tasks **must** have had their futures dropped already (by FuturesUnordered::clear_head_all)+ // - All tasks **must** have had their futures dropped already (by FuturesUnordered::clear) // - The caller **must** guarantee unique access to `self` pub(crate) unsafe fn clear(&self) { loop {@@ -107,3 +107,16 @@ } } }++impl<Fut> Drop for ReadyToRunQueue<Fut> {+ fn drop(&mut self) {+ // Once we're in the destructor for `Inner<Fut>` we need to clear out+ // the ready to run queue of tasks if there's anything left in there.++ // All tasks have had their futures dropped already by the `FuturesUnordered`+ // destructor above, and we have &mut self, so this is safe.+ unsafe {+ self.clear();+ }+ }+}
Here's the analysis of the provided code diff: 1. Vulnerability Existed: not sure Documentation Accuracy Fix [File] [Lines 94-107] [Old Code] // # Safety // // - All tasks **must** have had their futures dropped already (by FuturesUnordered::clear_head_all) // - The caller **must** guarantee unique access to `self` [Fixed Code] // # Safety // // - All tasks **must** have had their futures dropped already (by FuturesUnordered::clear) // - The caller **must** guarantee unique access to `self` Additional Details: The change appears to be a documentation fix correcting the method name from `clear_head_all` to `clear`. While this improves accuracy, it's unclear if the previous documentation led to actual security issues. 2. Vulnerability Existed: not sure Memory Safety Improvement [File] [Lines 107-116] [Old Code] (No Drop implementation existed) [Fixed Code] impl<Fut> Drop for ReadyToRunQueue<Fut> { fn drop(&mut self) { // Once we're in the destructor for `Inner<Fut>` we need to clear out // the ready to run queue of tasks if there's anything left in there. // All tasks have had their futures dropped already by the `FuturesUnordered` // destructor above, and we have &mut self, so this is safe. unsafe { self.clear(); } } } Additional Details: The addition of a Drop implementation ensures proper cleanup of the queue, which could prevent memory leaks or other resource management issues. While this improves memory safety, it's unclear if this was fixing an actual vulnerability or just improving robustness. Note: Both changes appear to be safety improvements, but without more context about the actual impact before these changes, it's difficult to determine if they were fixing specific vulnerabilities or just general code quality improvements.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.worker.js@@ -13,8 +13,8 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50);@@ -23,7 +23,7 @@ ctx.beginPath(); ctx.lineTo(100, 50); ctx.stroke();-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); t.done(); });
Based on the provided diff, I'll analyze it for security vulnerabilities: 1. Vulnerability Existed: no Variable Renaming [File] [Lines 13-14, 23] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); This appears to be a simple variable renaming change from `offscreenCanvas` to `canvas` for consistency or clarity. There are no security implications in this change, just a variable name refactoring. No known vulnerability is being addressed here.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-shapes/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-043.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/supported-shapes/ellipse/shape-outside-ellipse-043.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/#supported-basic-shapes"> <link rel="match" href="reference/shape-outside-ellipse-042-ref.html">- <meta name="flags" content=""> <meta name="assert" content="Test the right float shape defines an empty float area by the basic shape ellipse(0% 0closest-side closest-side at top right) 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 flag. Here's the analysis: Vulnerability Existed: no No security vulnerability found [File] [Lines 9] [Old Code] <meta name="flags" content=""> [Fixed Code] (removed line) This change appears to be a minor cleanup rather than a security fix. The removed line was an empty meta tag that didn't serve any apparent purpose and wasn't posing any security risk. The modification is likely part of general code maintenance or test file standardization.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.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(0, 255, 255, 0.5)';@@ -32,7 +32,7 @@ promise.then(function(response) { createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0);- _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5);+ _assertPixelApprox(canvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5); }, t_fail); }).then(t_pass, t_fail);
Based on the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely variable renaming for better clarity/consistency. Here's the analysis: Vulnerability Existed: no No vulnerability found [File] [Lines 13-14, 32] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); _assertPixelApprox(canvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5); The changes simply rename the variable `offscreenCanvas` to `canvas` for consistency, without any security implications. 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/netwerk/base/nsNetUtil.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/netwerk/base/nsNetUtil.h@@ -860,6 +860,11 @@ */ bool NS_IsAboutBlank(nsIURI* uri);+/**+ * Test whether a URI is "about:srcdoc". |uri| must not be null+ */+bool NS_IsAboutSrcdoc(nsIURI* uri);+ nsresult NS_GenerateHostPort(const nsCString& host, int32_t port, nsACString& hostLine);
Here is the analysis following your requested format: Vulnerability Existed: not sure [Potential Missing Null Check] [netwerk/base/nsNetUtil.h] [Lines 860-864] [Old Code] (None - function was added) [Fixed Code] /** * Test whether a URI is "about:srcdoc". |uri| must not be null */ bool NS_IsAboutSrcdoc(nsIURI* uri); Additional Details: 1. The diff shows a new function being added with documentation stating the input parameter "must not be null", but there's no code showing how this is enforced 2. This could potentially lead to null pointer dereference vulnerabilities if callers don't validate inputs 3. However, without seeing the implementation or call sites, we can't be certain if this is actually vulnerable 4. The documentation warning suggests the developers were aware of this potential issue Note: Since this is just a header file addition, we'd need to see the implementation and usage to make a definitive security assessment. The documentation warning suggests defensive programming, but doesn't guarantee safety.
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.toStringFunctionCallback.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.toStringFunctionCallback.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 = { toString: function() { return "#008000"; } }; _assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\"");
Analyzing the provided code diff: 1. Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.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: - The changes appear to be purely variable renaming (from `offscreenCanvas` to `canvas`) - No security-related changes or vulnerability fixes were made - The functionality remains exactly the same, only the variable name was changed for consistency or clarity - No CVEs or known vulnerabilities are associated with 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.