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/dom/canvas/CanvasUtils.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/canvas/CanvasUtils.cpp@@ -12,8 +12,12 @@ #include "mozilla/dom/Document.h" #include "mozilla/dom/HTMLCanvasElement.h" #include "mozilla/dom/UserActivation.h"+#include "mozilla/dom/WorkerCommon.h"+#include "mozilla/dom/WorkerPrivate.h"+#include "mozilla/gfx/gfxVars.h" #include "mozilla/BasePrincipal.h" #include "mozilla/StaticPrefs_dom.h"+#include "mozilla/StaticPrefs_gfx.h" #include "mozilla/StaticPrefs_privacy.h" #include "mozilla/StaticPrefs_webgl.h" #include "nsIPrincipal.h"@@ -47,24 +51,26 @@ namespace mozilla::CanvasUtils { bool IsImageExtractionAllowed(dom::Document* aDocument, JSContext* aCx,- nsIPrincipal& aPrincipal) {+ Maybe<nsIPrincipal*> aPrincipal) { // Do the rest of the checks only if privacy.resistFingerprinting is on. if (!nsContentUtils::ShouldResistFingerprinting(aDocument)) { return true; } // Don't proceed if we don't have a document or JavaScript context.- if (!aDocument || !aCx) {+ if (!aDocument || !aCx || !aPrincipal) { return false; }+ nsIPrincipal& subjectPrincipal = *aPrincipal.ref();+ // The system principal can always extract canvas data.- if (aPrincipal.IsSystemPrincipal()) {+ if (subjectPrincipal.IsSystemPrincipal()) { return true; } // Allow extension principals.- auto principal = BasePrincipal::Cast(&aPrincipal);+ auto* principal = BasePrincipal::Cast(&subjectPrincipal); if (principal->AddonPolicy() || principal->ContentScriptAddonPolicy()) { return true; }@@ -86,25 +92,12 @@ return true; }- dom::Document* topLevelDocument =- aDocument->GetTopLevelContentDocumentIfSameProcess();- nsIURI* topLevelDocURI =- topLevelDocument ? topLevelDocument->GetDocumentURI() : nullptr;- nsCString topLevelDocURISpec;- if (topLevelDocURI) {- topLevelDocURI->GetSpec(topLevelDocURISpec);- }-- // Load Third Party Util service.- nsresult rv;- nsCOMPtr<mozIThirdPartyUtil> thirdPartyUtil =- do_GetService(THIRDPARTYUTIL_CONTRACTID, &rv);- NS_ENSURE_SUCCESS(rv, false);- // Block all third-party attempts to extract canvas.- bool isThirdParty = true;- rv = thirdPartyUtil->IsThirdPartyURI(topLevelDocURI, docURI, &isThirdParty);- NS_ENSURE_SUCCESS(rv, false);+ MOZ_ASSERT(aDocument->GetWindowContext());+ bool isThirdParty =+ aDocument->GetWindowContext()+ ? aDocument->GetWindowContext()->GetIsThirdPartyWindow()+ : false; if (isThirdParty) { nsAutoString message; message.AppendPrintf("Blocked third party %s from extracting canvas data.",@@ -115,6 +108,7 @@ } // Load Permission Manager service.+ nsresult rv; nsCOMPtr<nsIPermissionManager> permissionManager = do_GetService(NS_PERMISSIONMANAGER_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, false);@@ -297,6 +291,35 @@ nsGkAtoms::all_urlsPermission); }+bool IsOffscreenCanvasEnabled(JSContext* aCx, JSObject* /* unused */) {+ if (StaticPrefs::gfx_offscreencanvas_enabled()) {+ return true;+ }++ if (!StaticPrefs::gfx_offscreencanvas_domain_enabled()) {+ return false;+ }++ const auto& allowlist = gfxVars::GetOffscreenCanvasDomainAllowlistOrDefault();++ if (!NS_IsMainThread()) {+ dom::WorkerPrivate* workerPrivate = dom::GetWorkerPrivateFromContext(aCx);+ if (workerPrivate->UsesSystemPrincipal()) {+ return true;+ }++ return nsContentUtils::IsURIInList(workerPrivate->GetBaseURI(), allowlist);+ }++ nsIPrincipal* principal = nsContentUtils::SubjectPrincipal(aCx);+ if (principal->IsSystemPrincipal()) {+ return true;+ }++ nsCOMPtr<nsIURI> uri = principal->GetURI();+ return nsContentUtils::IsURIInList(uri, allowlist);+}+ bool CheckWriteOnlySecurity(bool aCORSUsed, nsIPrincipal* aPrincipal, bool aHadCrossOriginRedirects) { if (!aPrincipal) {
Here's the security analysis of the provided code diff: 1. Vulnerability Existed: yes Third-Party Fingerprinting Protection [dom/canvas/CanvasUtils.cpp] [Lines 47-115] Old Code: ``` dom::Document* topLevelDocument = aDocument->GetTopLevelContentDocumentIfSameProcess(); nsIURI* topLevelDocURI = topLevelDocument ? topLevelDocument->GetDocumentURI() : nullptr; nsCString topLevelDocURISpec; if (topLevelDocURI) { topLevelDocURI->GetSpec(topLevelDocURISpec); } // Load Third Party Util service. nsresult rv; nsCOMPtr<mozIThirdPartyUtil> thirdPartyUtil = do_GetService(THIRDPARTYUTIL_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, false); // Block all third-party attempts to extract canvas. bool isThirdParty = true; rv = thirdPartyUtil->IsThirdPartyURI(topLevelDocURI, docURI, &isThirdParty); NS_ENSURE_SUCCESS(rv, false); ``` Fixed Code: ``` MOZ_ASSERT(aDocument->GetWindowContext()); bool isThirdParty = aDocument->GetWindowContext() ? aDocument->GetWindowContext()->GetIsThirdPartyWindow() : false; ``` 2. Vulnerability Existed: yes Principal Validation Vulnerability [dom/canvas/CanvasUtils.cpp] [Lines 47-52] Old Code: ``` bool IsImageExtractionAllowed(dom::Document* aDocument, JSContext* aCx, nsIPrincipal& aPrincipal) { // Don't proceed if we don't have a document or JavaScript context. if (!aDocument || !aCx) { return false; } ``` Fixed Code: ``` bool IsImageExtractionAllowed(dom::Document* aDocument, JSContext* aCx, Maybe<nsIPrincipal*> aPrincipal) { // Don't proceed if we don't have a document or JavaScript context. if (!aDocument || !aCx || !aPrincipal) { return false; } ``` 3. Vulnerability Existed: not sure Offscreen Canvas Domain Validation [dom/canvas/CanvasUtils.cpp] [Lines 291-318] New Code (added): ``` bool IsOffscreenCanvasEnabled(JSContext* aCx, JSObject* /* unused */) { if (StaticPrefs::gfx_offscreencanvas_enabled()) { return true; } if (!StaticPrefs::gfx_offscreencanvas_domain_enabled()) { return false; } const auto& allowlist = gfxVars::GetOffscreenCanvasDomainAllowlistOrDefault(); if (!NS_IsMainThread()) { dom::WorkerPrivate* workerPrivate = dom::GetWorkerPrivateFromContext(aCx); if (workerPrivate->UsesSystemPrincipal()) { return true; } return nsContentUtils::IsURIInList(workerPrivate->GetBaseURI(), allowlist); } nsIPrincipal* principal = nsContentUtils::SubjectPrincipal(aCx); if (principal->IsSystemPrincipal()) { return true; } nsCOMPtr<nsIURI> uri = principal->GetURI(); return nsContentUtils::IsURIInList(uri, allowlist); } ``` The first two vulnerabilities are clear security improvements: 1. The third-party check was simplified and made more reliable by using WindowContext instead of manual URI comparison. 2. The principal validation was strengthened by making it mandatory (using Maybe<> type) and checking for null. The third item is marked "not sure" because while it appears to be a security-related addition (domain allowlisting for offscreen canvas), we don't have the context of what vulnerabilities it might be addressing. It does implement proper security checks though.
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/windows/ToastNotificationHandler.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/widget/windows/ToastNotificationHandler.cpp@@ -17,7 +17,6 @@ #include "nsIDUtils.h" #include "nsIStringBundle.h" #include "nsIURI.h"-#include "nsIUUIDGenerator.h" #include "nsIWidget.h" #include "nsIWindowMediator.h" #include "nsNetUtil.h"@@ -534,14 +533,8 @@ return rv; }- nsCOMPtr<nsIUUIDGenerator> idGen =- do_GetService("@mozilla.org/uuid-generator;1", &rv);- if (NS_WARN_IF(NS_FAILED(rv))) {- return rv;- }- nsID uuid;- rv = idGen->GenerateUUIDInPlace(&uuid);+ rv = nsID::GenerateUUIDInPlace(uuid); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; }
Here's the analysis of the provided code diff: Vulnerability Existed: not sure [Potential Information Leakage] [widget/windows/ToastNotificationHandler.cpp] [Lines 534-543] [Old Code] ```cpp nsCOMPtr<nsIUUIDGenerator> idGen = do_GetService("@mozilla.org/uuid-generator;1", &rv); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } nsID uuid; rv = idGen->GenerateUUIDInPlace(&uuid); ``` [Fixed Code] ```cpp nsID uuid; rv = nsID::GenerateUUIDInPlace(uuid); ``` Analysis: 1. The change removes dependency on nsIUUIDGenerator service and uses a direct static method instead. 2. While this isn't clearly a security vulnerability fix, it could potentially relate to: - Removing a potential attack surface (service interface) - Preventing possible information leakage if the service was compromised - Following security best practices by using simpler, more direct methods 3. Without more context about the UUID generation implementation details, we can't be certain if this was fixing a specific vulnerability or just a code improvement. No clear vulnerability name or CVE is identifiable from this change, but it appears to be a security-conscious refactoring.
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/secure-contexts/basic-dedicated-worker.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/secure-contexts/basic-dedicated-worker.html@@ -70,8 +70,8 @@ t5.done(); } else if (data.type == "https") { t6.step(function() {- assert_false(data.error);- assert_false(data.isSecureContext);+ assert_false(data.error, "error");+ assert_false(data.isSecureContext, "isSecureContext"); }); t6.done(); } else {
Let me analyze the code diff for potential security fixes. Vulnerability Existed: not sure Assertion Message Missing Vulnerability [File] [Lines 72-73] [Old Code] assert_false(data.error); assert_false(data.isSecureContext); [Fixed Code] assert_false(data.error, "error"); assert_false(data.isSecureContext, "isSecureContext"); Additional Details: The change adds descriptive messages to assert_false() calls. While not a direct security vulnerability fix, this improves debugging capability which could help identify security issues during testing. The original code lacked descriptive messages which could make debugging harder if these assertions failed. Note: This doesn't appear to fix an active security vulnerability, but rather improves test reliability and maintainability. The change ensures better error reporting in test cases related to secure contexts and worker behavior.
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/darling_core/src/codegen/trait_impl.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/darling_core/src/codegen/trait_impl.rs@@ -1,11 +1,12 @@ use proc_macro2::TokenStream;-use syn::{Generics, Ident, Path, WherePredicate};+use syn::{Generics, Ident, WherePredicate};-use ast::{Data, Fields};-use codegen::error::{ErrorCheck, ErrorDeclaration};-use codegen::field;-use codegen::{DefaultExpression, Field, FieldsGen, Variant};-use usage::{CollectTypeParams, IdentSet, Purpose};+use crate::ast::{Data, Fields};+use crate::codegen::{+ error::{ErrorCheck, ErrorDeclaration},+ field, DefaultExpression, Field, FieldsGen, PostfixTransform, Variant,+};+use crate::usage::{CollectTypeParams, IdentSet, Purpose}; #[derive(Debug)] pub struct TraitImpl<'a> {@@ -13,7 +14,7 @@ pub generics: &'a Generics, pub data: Data<Variant<'a>, Field<'a>>, pub default: Option<DefaultExpression<'a>>,- pub map: Option<&'a Path>,+ pub post_transform: Option<&'a PostfixTransform>, pub bound: Option<&'a [WherePredicate]>, pub allow_unknown_fields: bool, }@@ -34,7 +35,7 @@ self.type_params_matching(|f| !f.skip, |v| !v.skip) }- fn type_params_matching<'b, F, V>(&'b self, field_filter: F, variant_filter: V) -> IdentSet+ fn type_params_matching<F, V>(&self, field_filter: F, variant_filter: V) -> IdentSet where F: Fn(&&Field) -> bool, V: Fn(&&Variant) -> bool,@@ -86,7 +87,7 @@ } /// Generate local variable declarations for all fields.- pub(in codegen) fn local_declarations(&self) -> TokenStream {+ pub(in crate::codegen) fn local_declarations(&self) -> TokenStream { if let Data::Struct(ref vd) = self.data { let vdr = vd.as_ref().map(Field::as_declaration); let decls = vdr.fields.as_slice();@@ -97,7 +98,7 @@ } /// Generate immutable variable declarations for all fields.- pub(in codegen) fn immutable_declarations(&self) -> TokenStream {+ pub(in crate::codegen) fn immutable_declarations(&self) -> TokenStream { if let Data::Struct(ref vd) = self.data { let vdr = vd.as_ref().map(|f| field::Declaration::new(f, false)); let decls = vdr.fields.as_slice();@@ -107,12 +108,12 @@ } }- pub(in codegen) fn map_fn(&self) -> Option<TokenStream> {- self.map.as_ref().map(|path| quote!(.map(#path)))+ pub(in crate::codegen) fn post_transform_call(&self) -> Option<TokenStream> {+ self.post_transform.map(|pt| quote!(#pt)) } /// Generate local variable declaration and initialization for instance from which missing fields will be taken.- pub(in codegen) fn fallback_decl(&self) -> TokenStream {+ pub(in crate::codegen) fn fallback_decl(&self) -> TokenStream { let default = self.default.as_ref().map(DefaultExpression::as_declaration); quote!(#default) }@@ -127,12 +128,12 @@ } }- pub(in codegen) fn initializers(&self) -> TokenStream {+ pub(in crate::codegen) fn initializers(&self) -> TokenStream { self.make_field_ctx().initializers() } /// Generate the loop which walks meta items looking for property matches.- pub(in codegen) fn core_loop(&self) -> TokenStream {+ pub(in crate::codegen) fn core_loop(&self) -> TokenStream { self.make_field_ctx().core_loop() }
Let me analyze the code diff for potential security vulnerabilities: 1. Vulnerability Existed: not sure [Potential Path Traversal] [third_party/rust/darling_core/src/codegen/trait_impl.rs] [Lines 13,35] [Old Code] pub map: Option<&'a Path>, [Fixed Code] pub post_transform: Option<&'a PostfixTransform>, Note: Changed from using raw Path to PostfixTransform type, which might be more secure against path manipulation, but without seeing PostfixTransform implementation, can't be certain. 2. Vulnerability Existed: not sure [Potential Lifetime Issue] [third_party/rust/darling_core/src/codegen/trait_impl.rs] [Lines 34-42] [Old Code] fn type_params_matching<'b, F, V>(&'b self, field_filter: F, variant_filter: V) -> IdentSet [Fixed Code] fn type_params_matching<F, V>(&self, field_filter: F, variant_filter: V) -> IdentSet Note: Removed explicit lifetime parameter which might have been unnecessary, but unclear if this was a security fix. 3. Vulnerability Existed: no [Code Organization Improvement] [third_party/rust/darling_core/src/codegen/trait_impl.rs] [Throughout file] [Old Code] Various imports without crate:: prefix [Fixed Code] All imports prefixed with crate:: Note: This appears to be a code organization/namespace improvement rather than a security fix. 4. Vulnerability Existed: not sure [Visibility Restriction] [third_party/rust/darling_core/src/codegen/trait_impl.rs] [Throughout file] [Old Code] pub(in codegen) fn ... [Fixed Code] pub(in crate::codegen) fn ... Note: Changed visibility modifiers to be more explicit, but unclear if this addresses any specific security concern. The changes appear to be primarily code quality and organization improvements rather than direct security fixes. The most notable change is replacing Path with PostfixTransform, which could potentially address some security concerns around path handling, but without more context about these types, I can't be certain.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/layout/painting/ActiveLayerTracker.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/layout/painting/ActiveLayerTracker.cpp@@ -18,7 +18,6 @@ #include "nsExpirationTracker.h" #include "nsContainerFrame.h" #include "nsIContent.h"-#include "nsIScrollableFrame.h" #include "nsRefreshDriver.h" #include "nsPIDOMWindow.h" #include "mozilla/dom/Document.h"@@ -48,11 +47,6 @@ enum ActivityIndex { ACTIVITY_OPACITY, ACTIVITY_TRANSFORM,- ACTIVITY_LEFT,- ACTIVITY_TOP,- ACTIVITY_RIGHT,- ACTIVITY_BOTTOM,- ACTIVITY_BACKGROUND_POSITION, ACTIVITY_SCALE, ACTIVITY_TRIGGERED_REPAINT,@@ -61,8 +55,7 @@ ACTIVITY_COUNT };- explicit LayerActivity(nsIFrame* aFrame)- : mFrame(aFrame), mContent(nullptr), mContentActive(false) {+ explicit LayerActivity(nsIFrame* aFrame) : mFrame(aFrame), mContent(nullptr) { PodArrayZero(mRestyleCounts); } ~LayerActivity();@@ -85,20 +78,6 @@ case eCSSProperty_offset_anchor: // TODO: Bug 1559232: Add offset-position. return ACTIVITY_TRANSFORM;- case eCSSProperty_left:- return ACTIVITY_LEFT;- case eCSSProperty_top:- return ACTIVITY_TOP;- case eCSSProperty_right:- return ACTIVITY_RIGHT;- case eCSSProperty_bottom:- return ACTIVITY_BOTTOM;- case eCSSProperty_background_position:- return ACTIVITY_BACKGROUND_POSITION;- case eCSSProperty_background_position_x:- return ACTIVITY_BACKGROUND_POSITION;- case eCSSProperty_background_position_y:- return ACTIVITY_BACKGROUND_POSITION; default: MOZ_ASSERT(false); return ACTIVITY_OPACITY;@@ -128,16 +107,8 @@ // Previous scale due to the CSS transform property. Maybe<Size> mPreviousTransformScale;- // The scroll frame during for which we most recently received a call to- // NotifyAnimatedFromScrollHandler.- WeakFrame mAnimatingScrollHandlerFrame;- // The set of activities that were triggered during- // mAnimatingScrollHandlerFrame's scroll event handler.- EnumSet<ActivityIndex> mScrollHandlerInducedActivity;- // Number of restyle operations detected uint8_t mRestyleCounts[ACTIVITY_COUNT];- bool mContentActive; }; class LayerActivityTracker final@@ -148,20 +119,10 @@ explicit LayerActivityTracker(nsIEventTarget* aEventTarget) : nsExpirationTracker<LayerActivity, 4>(- GENERATION_MS, "LayerActivityTracker", aEventTarget),- mDestroying(false) {}- ~LayerActivityTracker() override {- mDestroying = true;- AgeAllGenerations();- }+ GENERATION_MS, "LayerActivityTracker", aEventTarget) {}+ ~LayerActivityTracker() override { AgeAllGenerations(); } void NotifyExpired(LayerActivity* aObject) override;-- public:- WeakFrame mCurrentScrollHandlerFrame;-- private:- bool mDestroying; }; static StaticAutoPtr<LayerActivityTracker> gLayerActivityTracker;@@ -177,13 +138,6 @@ NS_DECLARE_FRAME_PROPERTY_DELETABLE(LayerActivityProperty, LayerActivity) void LayerActivityTracker::NotifyExpired(LayerActivity* aObject) {- if (!mDestroying && aObject->mAnimatingScrollHandlerFrame.IsAlive()) {- // Reset the restyle counts, but let the layer activity survive.- PodArrayZero(aObject->mRestyleCounts);- MarkUsed(aObject);- return;- }- RemoveObject(aObject); nsIFrame* f = aObject->mFrame;@@ -196,11 +150,6 @@ "its frame or its content"); if (f) {- // The pres context might have been detached during the delay -- // that's fine, just skip the paint.- if (f->PresContext()->GetContainerWeak() && !gfxVars::UseWebRender()) {- f->SchedulePaint(nsIFrame::PAINT_DEFAULT, false);- } f->RemoveStateBits(NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY); f->RemoveProperty(LayerActivityProperty()); } else {@@ -318,19 +267,6 @@ } /* static */-void ActiveLayerTracker::NotifyOffsetRestyle(nsIFrame* aFrame) {- LayerActivity* layerActivity = GetLayerActivityForUpdate(aFrame);- IncrementMutationCount(- &layerActivity->mRestyleCounts[LayerActivity::ACTIVITY_LEFT]);- IncrementMutationCount(- &layerActivity->mRestyleCounts[LayerActivity::ACTIVITY_TOP]);- IncrementMutationCount(- &layerActivity->mRestyleCounts[LayerActivity::ACTIVITY_RIGHT]);- IncrementMutationCount(- &layerActivity->mRestyleCounts[LayerActivity::ACTIVITY_BOTTOM]);-}--/* static */ void ActiveLayerTracker::NotifyAnimated(nsIFrame* aFrame, nsCSSPropertyID aProperty, const nsACString& aNewValue,@@ -347,27 +283,6 @@ } }-/* static */-void ActiveLayerTracker::NotifyAnimatedFromScrollHandler(- nsIFrame* aFrame, nsCSSPropertyID aProperty, nsIFrame* aScrollFrame) {- if (aFrame->PresContext() != aScrollFrame->PresContext()) {- // Don't allow cross-document dependencies.- return;- }- LayerActivity* layerActivity = GetLayerActivityForUpdate(aFrame);- LayerActivity::ActivityIndex activityIndex =- LayerActivity::GetActivityIndexForProperty(aProperty);-- if (layerActivity->mAnimatingScrollHandlerFrame.GetFrame() != aScrollFrame) {- // Discard any activity of a different scroll frame. We only track the- // most recent scroll handler induced activity.- layerActivity->mScrollHandlerInducedActivity.clear();- layerActivity->mAnimatingScrollHandlerFrame = aScrollFrame;- }-- layerActivity->mScrollHandlerInducedActivity += activityIndex;-}- static bool IsPresContextInScriptAnimationCallback( nsPresContext* aPresContext) { if (aPresContext->RefreshDriver()->IsInRefresh()) {@@ -385,12 +300,6 @@ nsDOMCSSDeclaration* aDOMCSSDecl) { if (IsPresContextInScriptAnimationCallback(aFrame->PresContext())) { NotifyAnimated(aFrame, aProperty, aNewValue, aDOMCSSDecl);- }- if (gLayerActivityTracker &&- gLayerActivityTracker->mCurrentScrollHandlerFrame.IsAlive()) {- NotifyAnimatedFromScrollHandler(- aFrame, aProperty,- gLayerActivityTracker->mCurrentScrollHandlerFrame.GetFrame()); } }@@ -407,54 +316,6 @@ &layerActivity ->mRestyleCounts[LayerActivity::ACTIVITY_TRIGGERED_REPAINT]); }-}--static bool CheckScrollInducedActivity(- LayerActivity* aLayerActivity, LayerActivity::ActivityIndex aActivityIndex,- nsDisplayListBuilder* aBuilder) {- if (!aLayerActivity->mScrollHandlerInducedActivity.contains(aActivityIndex) ||- !aLayerActivity->mAnimatingScrollHandlerFrame.IsAlive()) {- return false;- }-- nsIScrollableFrame* scrollFrame =- do_QueryFrame(aLayerActivity->mAnimatingScrollHandlerFrame.GetFrame());- if (scrollFrame && scrollFrame->IsScrollingActiveNotMinimalDisplayPort()) {- return true;- }-- // The scroll frame has been destroyed or has become inactive. Clear it from- // the layer activity so that it can expire.- aLayerActivity->mAnimatingScrollHandlerFrame = nullptr;- aLayerActivity->mScrollHandlerInducedActivity.clear();- return false;-}--/* static */-bool ActiveLayerTracker::IsBackgroundPositionAnimated(- nsDisplayListBuilder* aBuilder, nsIFrame* aFrame) {- LayerActivity* layerActivity = GetLayerActivity(aFrame);- if (layerActivity) {- LayerActivity::ActivityIndex activityIndex =- LayerActivity::ActivityIndex::ACTIVITY_BACKGROUND_POSITION;- if (layerActivity->mRestyleCounts[activityIndex] >= 2) {- // If the frame needs to be repainted frequently, we probably don't get- // much from treating the property as animated, *unless* this frame's- // 'scale' (which includes the bounds changes of a rotation) is changing.- // Marking a scaling transform as animating allows us to avoid resizing- // the texture, even if we have to repaint the contents of that texture.- if (layerActivity- ->mRestyleCounts[LayerActivity::ACTIVITY_TRIGGERED_REPAINT] < 2) {- return true;- }- }- if (CheckScrollInducedActivity(layerActivity, activityIndex, aBuilder)) {- return true;- }- }- return nsLayoutUtils::HasEffectiveAnimation(- aFrame, nsCSSPropertyIDSet({eCSSProperty_background_position_x,- eCSSProperty_background_position_y})); } static bool IsMotionPathAnimated(nsDisplayListBuilder* aBuilder,@@ -513,7 +374,7 @@ aPropertySet.Intersects(nsCSSPropertyIDSet::OpacityProperties()) && (!aBuilder || aBuilder->IsInWillChangeBudget(aFrame, aFrame->GetSize()))) {- return true;+ return !StaticPrefs::gfx_will_change_ignore_opacity(); } LayerActivity* layerActivity = GetLayerActivity(aFrame);@@ -534,9 +395,6 @@ return true; } }- if (CheckScrollInducedActivity(layerActivity, activityIndex, aBuilder)) {- return true;- } } if (nsLayoutUtils::HasEffectiveAnimation(aFrame, aPropertySet)) {@@ -552,25 +410,6 @@ // frames in the 3d rendering context. If there is one, this function will // return true. return IsStyleAnimated(aBuilder, aFrame->GetParent(), aPropertySet);-}--/* static */-bool ActiveLayerTracker::IsOffsetStyleAnimated(nsIFrame* aFrame) {- LayerActivity* layerActivity = GetLayerActivity(aFrame);- if (layerActivity) {- if (layerActivity->mRestyleCounts[LayerActivity::ACTIVITY_LEFT] >= 2 ||- layerActivity->mRestyleCounts[LayerActivity::ACTIVITY_TOP] >= 2 ||- layerActivity->mRestyleCounts[LayerActivity::ACTIVITY_RIGHT] >= 2 ||- layerActivity->mRestyleCounts[LayerActivity::ACTIVITY_BOTTOM] >= 2) {- return true;- }- }- // We should also check for running CSS animations of these properties once- // bug 1009693 is fixed. Until that happens, layerization isn't useful for- // animations of these properties because we'll invalidate the layer contents- // on every change anyway.- // See bug 1151346 for a patch that adds a check for CSS animations.- return false; } /* static */@@ -586,27 +425,6 @@ } /* static */-void ActiveLayerTracker::NotifyContentChange(nsIFrame* aFrame) {- LayerActivity* layerActivity = GetLayerActivityForUpdate(aFrame);- layerActivity->mContentActive = true;-}--/* static */-bool ActiveLayerTracker::IsContentActive(nsIFrame* aFrame) {- LayerActivity* layerActivity = GetLayerActivity(aFrame);- return layerActivity && layerActivity->mContentActive;-}--/* static */-void ActiveLayerTracker::SetCurrentScrollHandlerFrame(nsIFrame* aFrame) {- if (!gLayerActivityTracker) {- gLayerActivityTracker =- new LayerActivityTracker(GetMainThreadSerialEventTarget());- }- gLayerActivityTracker->mCurrentScrollHandlerFrame = aFrame;-}--/* static */ void ActiveLayerTracker::Shutdown() { gLayerActivityTracker = nullptr; } } // namespace mozilla
I'll analyze the code diff for security fixes following the specified format. Vulnerability Existed: not sure Potential Memory Safety Issue [File] layout/painting/ActiveLayerTracker.cpp [Lines 148-151] [Old Code] ~LayerActivityTracker() override { mDestroying = true; AgeAllGenerations(); } [Fixed Code] ~LayerActivityTracker() override { AgeAllGenerations(); } Additional Details: The removal of the mDestroying flag and related code could potentially affect memory safety during shutdown, but without more context about the overall system, it's hard to determine if this was an actual security fix. Vulnerability Existed: not sure Potential Scroll Handler Vulnerability [File] layout/painting/ActiveLayerTracker.cpp [Lines 318-425] [Old Code] /* static */ void ActiveLayerTracker::NotifyAnimatedFromScrollHandler( nsIFrame* aFrame, nsCSSPropertyID aProperty, nsIFrame* aScrollFrame) { if (aFrame->PresContext() != aScrollFrame->PresContext()) { // Don't allow cross-document dependencies. return; } ... } [Fixed Code] (Entire function and related scroll handler tracking code removed) Additional Details: The removal of scroll handler tracking code could potentially be related to security, as scroll handlers can sometimes be sources of vulnerabilities, but the diff doesn't provide enough context to be certain. Vulnerability Existed: not sure Potential Background Position Handling [File] layout/painting/ActiveLayerTracker.cpp [Lines 48-55] [Old Code] enum ActivityIndex { ACTIVITY_OPACITY, ACTIVITY_TRANSFORM, ACTIVITY_LEFT, ACTIVITY_TOP, ACTIVITY_RIGHT, ACTIVITY_BOTTOM, ACTIVITY_BACKGROUND_POSITION, ... }; [Fixed Code] enum ActivityIndex { ACTIVITY_OPACITY, ACTIVITY_TRANSFORM, ACTIVITY_SCALE, ACTIVITY_TRIGGERED_REPAINT, ACTIVITY_COUNT }; Additional Details: The removal of background position tracking could be related to security, as background positioning can sometimes be involved in CSS-based attacks, but this is speculative without more context. Vulnerability Existed: not sure Potential Content Activity Tracking [File] layout/painting/ActiveLayerTracker.cpp [Lines 61-128] [Old Code] explicit LayerActivity(nsIFrame* aFrame) : mFrame(aFrame), mContent(nullptr), mContentActive(false) { PodArrayZero(mRestyleCounts); } ... bool mContentActive; [Fixed Code] explicit LayerActivity(nsIFrame* aFrame) : mFrame(aFrame), mContent(nullptr) { PodArrayZero(mRestyleCounts); } ... (mContentActive removed) Additional Details: The removal of content activity tracking could potentially affect security if this was used for some security-related tracking, but the purpose isn't clear from the diff alone. Note: The diff shows significant simplification of the ActiveLayerTracker code, removing many features including scroll handler tracking, offset tracking, and background position tracking. While some of these changes could have security implications, the diff doesn't provide enough context to definitively identify specific vulnerabilities that were fixed. The changes appear to be more about simplifying the code and removing features rather than fixing clear security vulnerabilities.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/third_party/rust/naga/CHANGELOG.md+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/naga/CHANGELOG.md@@ -1,8 +1,42 @@ # Change Log-## v0.8 (TBD)+## v0.8 (2021-12-18)+ - development release for wgpu-0.12+ - lots of fixes in all parts+ - validator:+ - now gated by `validate` feature+ - nicely detailed error messages with spans+ - API:+ - image gather operations - WGSL-in: - remove `[[block]]` attribute+ - `elseif` is removed in favor of `else if`+ - MSL-out:+ - full out-of-bounds checking++### v0.7.3 (2021-12-14)+ - API:+ - `view_index` builtin+ - GLSL-out:+ - reflect textures without samplers+ - SPV-out:+ - fix incorrect pack/unpack++### v0.7.2 (2021-12-01)+ - validator:+ - check stores for proper pointer class+ - HLSL-out:+ - fix stores into `mat3`+ - respect array strides+ - SPV-out:+ - fix multi-word constants+ - WGSL-in:+ - permit names starting with underscores+ - SPV-in:+ - cull unused builtins+ - support empty debug labels+ - GLSL-in:+ - don't panic on invalid integer operations ### v0.7.1 (2021-10-12) - implement casts from and to booleans in the backends
Analyzing the provided changelog diff, I don't see any direct security fixes mentioned. The changes appear to be feature updates, bug fixes, and improvements. However, I'll analyze the changes that might have security implications: 1. Vulnerability Existed: not sure Potential Out-of-Bounds Access [third_party/rust/naga/CHANGELOG.md] [Lines mentioning "full out-of-bounds checking"] Old Code: (not explicitly mentioned in changelog) Fixed Code: "full out-of-bounds checking" added in MSL-out 2. Vulnerability Existed: not sure Potential Pointer Class Validation [third_party/rust/naga/CHANGELOG.md] [Lines mentioning "check stores for proper pointer class"] Old Code: (not explicitly mentioned in changelog) Fixed Code: "check stores for proper pointer class" added in validator 3. Vulnerability Existed: not sure Potential Integer Operation Handling [third_party/rust/naga/CHANGELOG.md] [Lines mentioning "don't panic on invalid integer operations"] Old Code: (potential panic on invalid operations) Fixed Code: "don't panic on invalid integer operations" in GLSL-in Note: These are speculative assessments based on changelog entries that might indicate security-related fixes. Without seeing the actual code changes, we can't be certain about the vulnerabilities. The changelog mentions various fixes but doesn't explicitly state they were security fixes.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.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.bezierCurveTo.basic.worker.js@@ -13,8 +13,8 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50);@@ -24,7 +24,7 @@ ctx.moveTo(0, 25); ctx.bezierCurveTo(100, 25, 100, 25, 100, 25); ctx.stroke();-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); t.done(); });
After analyzing the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely cosmetic/refactoring changes where a variable name was changed from `offscreenCanvas` to `canvas` for consistency or clarity. Here's the analysis following your requested format: Vulnerability Existed: no No security vulnerability found [File] [Lines 13-14, 24] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); The changes don't affect security in any way - they're just variable renaming with no functional impact on the code's behavior or security posture.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.html@@ -17,8 +17,8 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50);@@ -27,7 +27,7 @@ ctx.roundRect(100, 25, 0, 0, [0]); ctx.lineTo(0, 25); 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 code diff, here's the analysis: 1. Vulnerability Existed: no No security vulnerability found [File] testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.html [Lines] 17-27 [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); The changes appear to be purely variable renaming (from `offscreenCanvas` to `canvas`) with no security implications. The functionality remains identical, and there are no security-related patterns or 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/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.worker.js@@ -14,8 +14,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 offscreenCanvas2 = new OffscreenCanvas(100, 50); var ctx2 = offscreenCanvas2.getContext('2d');@@ -23,10 +23,10 @@ ctx2.fillRect(0, 0, 100, 50); ctx.fillStyle = '#f00'; ctx.drawImage(offscreenCanvas2, 0, 0);-_assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2);-_assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2);-_assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2);-_assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2);+_assertPixelApprox(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2);+_assertPixelApprox(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2);+_assertPixelApprox(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2);+_assertPixelApprox(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); t.done(); });
After analyzing the provided code diff, here are the findings: 1. Vulnerability Existed: no The diff shows only variable renaming (from `offscreenCanvas` to `canvas`) and corresponding updates to assertions. There are no security-related changes or vulnerabilities being fixed in this diff. 2. Vulnerability Existed: no The changes in the assertions (`_assertPixelApprox`) are simply following the variable name change and don't indicate any security fixes. The test logic remains identical. The changes appear to be purely cosmetic/refactoring in nature, improving variable naming consistency without addressing any security issues. No known vulnerabilities are being patched 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/toolkit/components/cleardata/tests/browser/browser_preflight_cache.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/toolkit/components/cleardata/tests/browser/browser_preflight_cache.js@@ -129,3 +129,44 @@ } } });++add_task(async function test_deletePrivateBrowsingCache() {+ async function deletePrivateBrowsingCache(token) {+ const browser = await BrowserTestUtils.openNewBrowserWindow({+ private: true,+ });++ const tab = (browser.gBrowser.selectedTab = BrowserTestUtils.addTab(+ browser.gBrowser,+ "http://example.com"+ ));+ await BrowserTestUtils.browserLoaded(tab.linkedBrowser);++ // Populate the preflight cache and make sure it isn't populated right now+ await testPreflightCached(tab.linkedBrowser, PREFLIGHT_URL_A, token, false);+ await testPreflightCached(tab.linkedBrowser, PREFLIGHT_URL_B, token, false);+ // Cache should be populated.+ await testPreflightCached(tab.linkedBrowser, PREFLIGHT_URL_A, token, true);+ await testPreflightCached(tab.linkedBrowser, PREFLIGHT_URL_B, token, true);++ await browser.close();+ }++ // Disable https_first mode to not upgrade the connection of the main page+ // and get "Blocked loading mixed active content" for the CORS request+ // making this test case fail. Another solution would be to change all URLs+ // to https.+ await SpecialPowers.pushPrefEnv({+ set: [["dom.security.https_first_pbm", false]],+ });++ let token = uuidGenerator.generateUUID().toString();++ // Make sure the CORS preflight cache is cleared between two private+ // browsing sessions. Calling this function twice to see if the cache isn't+ // populated anymore after the first call.+ await deletePrivateBrowsingCache(token);+ await deletePrivateBrowsingCache(token);++ await SpecialPowers.clearUserPref("dom.security.https_first_pbm");+});
Analyzing the provided code diff, I don't see any clear security vulnerabilities being fixed. The changes appear to be adding a new test case for verifying that the CORS preflight cache is properly cleared between private browsing sessions. Here's my analysis: 1. Vulnerability Existed: no No specific vulnerability [toolkit/components/cleardata/tests/browser/browser_preflight_cache.js] [Lines 129-172] [Old Code: Test case didn't exist] [Fixed Code: Added new test case for private browsing cache clearing] The changes are primarily: 1. Adding a new test function `test_deletePrivateBrowsingCache` 2. Including a workaround for HTTPS-first mode in private browsing 3. Testing that the preflight cache is properly cleared between private browsing sessions The modification to disable `dom.security.https_first_pbm` is a test-specific workaround and not a security fix - it's done to prevent test failures due to mixed content blocking. The preference is properly cleared at the end of the test.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html@@ -17,14 +17,14 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillStyle = 'rgb(0, 255, 0, 0.2)'; ctx.fillRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 50,25, 0,255,0,51, "50,25", "0,255,0,51");+_assertPixel(canvas, 50,25, 0,255,0,51, "50,25", "0,255,0,51"); t.done(); });
Based on the provided code diff, I don't see any security-related fixes. The changes appear to be purely cosmetic/refactoring changes (variable renaming) without any security implications. Here's the analysis following your requested format: Vulnerability Existed: no No security vulnerability found [File] [Lines 17-25] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); _assertPixel(offscreenCanvas, 50,25, 0,255,0,51, "50,25", "0,255,0,51"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); _assertPixel(canvas, 50,25, 0,255,0,51, "50,25", "0,255,0,51"); The changes simply rename the variable from `offscreenCanvas` to `canvas` and update all references to it. There are no security implications in this change.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-break/widows-orphans-018.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-break/widows-orphans-018.html@@ -20,7 +20,6 @@ -->- <meta name="flags" content=""> <meta name="assert" content="When column boxes are filled sequentially, their content should be distributed and fragmented in accordance with the 'orphans' and the 'widows' declarations. In this test, the 3rd column box is going to get only 1 line box which is insufficient to honor 'widows: 3'. If a class B break point would occur between the '6' and the '7' so that 3 line boxes would be at the top of the 3rd column box, then this would leave only 2 line boxes in the 2nd column box and this would violate the 'orphans: 3' constraint. For that reason, a class B break must not happen in the 2nd column between the '6' and the '7'. On the other hand, a class B break can occur between the '7' and the '8' in the 2nd column box and doing so does not violate the 'orphans: 3' constraint."> <style>
Analysis of the provided code diff: 1. Vulnerability Existed: no No specific vulnerability found [testing/web-platform/tests/css/css-break/widows-orphans-018.html] [Line 20] Old Code: `<meta name="flags" content="">` Fixed Code: (removed line) Additional Details: - The change simply removes an empty meta tag for "flags" which appears to be test configuration metadata - This doesn't appear to be a security-related fix but rather a cleanup of test metadata - No known vulnerability patterns or security issues are addressed by this change The diff shows only one change which is the removal of an unused/empty meta tag. There are no apparent security vulnerabilities being fixed in this change. The modification appears to be related to test file maintenance rather than security patching.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-round-display/polar-origin-auto-002.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-round-display/polar-origin-auto-002.html@@ -4,7 +4,6 @@ <title>CSS Test: Origin of Coordinates</title> <link rel="author" title="Jihye Hong" href="mailto:[email protected]" /> <link rel="help" href="https://www.w3.org/TR/motion-1/#polar-origin-property" />- <meta name="flags" content="" /> <meta name="assert" content="Test checks that the origin of the coordinate system specified with 'polar-origin'." /> <style type="text/css"> .container {
Based on the provided code diff, I'll analyze it for security vulnerabilities: 1. Vulnerability Existed: no [No specific vulnerability found] [testing/web-platform/tests/css/css-round-display/polar-origin-auto-002.html] [Lines 4] [Old Code: <meta name="flags" content="" />] [Fixed Code: (line removed)] Additional Details: - The change simply removes an empty meta tag for "flags" which appears to be test-related metadata - No security-relevant changes were made in this diff - The modification doesn't appear to address any known vulnerability - This seems to be a minor cleanup of test code rather than a security fix No security vulnerabilities were identified in this diff. The change is purely cosmetic, removing an unused or unnecessary meta tag from the test file.
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.solid.destination-over.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.solid.destination-over.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, 1.0)';@@ -22,7 +22,7 @@ ctx.globalCompositeOperation = 'destination-over'; ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; ctx.fillRect(0, 0, 100, 50);-_assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,255, "50,25", "0,255,255,255", 5);+_assertPixelApprox(canvas, 50,25, 0,255,255,255, "50,25", "0,255,255,255", 5); t.done(); });
Based on the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely variable renaming and don't involve any security-sensitive operations. Here's the analysis following your requested format: Vulnerability Existed: no No security vulnerability found [File] [Lines 13-22] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,255, "50,25", "0,255,255,255", 5); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixelApprox(canvas, 50,25, 0,255,255,255, "50,25", "0,255,255,255", 5); The changes simply rename the variable from `offscreenCanvas` to `canvas` throughout the file, which doesn't affect security in any way. The functionality remains identical.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-backgrounds/background-clip-002.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-backgrounds/background-clip-002.html@@ -7,7 +7,6 @@ <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2012-11-09 --> <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-clip" title="3.7. Painting Area: the 'background-clip' property"> <link rel="match" href="reference/background-clip-002-ref.html">- <meta name="flags" content=""> <meta name="assert" content="Background-clip with initial value implies to paint the background within (clipped to) the border box."> <style> #ref-overlapped-red {
Analysis of the provided code diff: 1. Vulnerability Existed: no No specific vulnerability found in this diff. The change simply removes an empty meta tag for "flags" which doesn't appear to have any security implications. Additional Details: The diff shows removal of: <meta name="flags" content=""> This appears to be a test file cleanup rather than a security fix. The empty flags meta tag served no purpose and its removal doesn't indicate any security vulnerability being addressed. No vulnerability name can be associated with this change as it doesn't appear to relate to any security issue. The modification is likely part of general code maintenance or test suite 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/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.html@@ -17,10 +17,10 @@ }); 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');-_assert(ctx.createPattern(offscreenCanvas, null) != null, "ctx.createPattern(offscreenCanvas, null) != null");+_assert(ctx.createPattern(canvas, null) != null, "ctx.createPattern(canvas, null) != null"); t.done(); });
Let me analyze the provided code diff for security fixes. Vulnerability Existed: no [No specific vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.html] [Lines 17-20] [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'); Vulnerability Existed: no [No specific vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.html] [Lines 22] [Old Code] _assert(ctx.createPattern(offscreenCanvas, null) != null, "ctx.createPattern(offscreenCanvas, null) != null"); [Fixed Code] _assert(ctx.createPattern(canvas, null) != null, "ctx.createPattern(canvas, null) != null"); The changes appear to be purely variable name changes (from 'offscreenCanvas' to 'canvas') rather than security fixes. The functionality remains the same, just with a more concise variable name. No security vulnerabilities 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/layout/reftests/css-grid/grid-fragmentation-029.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/layout/reftests/css-grid/grid-fragmentation-029.html@@ -23,7 +23,7 @@ -ms-column-fill: auto; -webkit-column-fill: auto; column-fill: auto;- border: 2px dashed;+ border: 2px solid salmon; margin-bottom: 5px; }
After analyzing the provided code diff, I don't find any security-related fixes. The change appears to be purely cosmetic/visual in nature, modifying the border style from dashed to solid salmon color. Here's the analysis following your requested format: Vulnerability Existed: no [No security vulnerability found] [layout/reftests/css-grid/grid-fragmentation-029.html] [Lines 23] [Old Code: border: 2px dashed;] [Fixed Code: border: 2px solid salmon;] Additional Notes: - This appears to be a visual test case modification rather than a security fix - No known vulnerability patterns (XSS, injection, etc.) are present in this change - The modification affects only styling properties, not functionality or security controls
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/third_party/rust/crossbeam-channel/tests/thread_locals.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/crossbeam-channel/tests/thread_locals.rs@@ -1,4 +1,6 @@ //! Tests that make sure accessing thread-locals while exiting the thread doesn't cause panics.++#![cfg(not(miri))] // error: abnormal termination: the evaluated program aborted execution use std::thread; use std::time::Duration;
Analyzing the provided code diff, here's the security assessment: Vulnerability Existed: no [No specific vulnerability] [third_party/rust/crossbeam-channel/tests/thread_locals.rs] [Lines 1-2] [Old Code: "//! Tests that make sure accessing thread-locals while exiting the thread doesn't cause panics."] [Fixed Code: Added "#![cfg(not(miri))] // error: abnormal termination: the evaluated program aborted execution"] Additional Details: 1. The change appears to be a test configuration modification rather than a security fix 2. The added line disables the test when running under Miri (Rust's experimental interpreter) 3. No actual security vulnerability is being addressed here - this is related to test behavior under specific conditions 4. The comment suggests this is to prevent test failures due to abnormal termination during Miri execution This appears to be a test infrastructure improvement rather than a security fix. The change helps prevent false test failures when running under Miri but doesn't address any 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/dom/network/TCPServerSocketChild.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/network/TCPServerSocketChild.cpp@@ -38,13 +38,11 @@ return refcnt; }-TCPServerSocketChild::TCPServerSocketChild(- TCPServerSocket* aServerSocket, uint16_t aLocalPort, uint16_t aBacklog,- bool aUseArrayBuffers, nsISerialEventTarget* aIPCEventTarget) {+TCPServerSocketChild::TCPServerSocketChild(TCPServerSocket* aServerSocket,+ uint16_t aLocalPort,+ uint16_t aBacklog,+ bool aUseArrayBuffers) { mServerSocket = aServerSocket;- if (aIPCEventTarget) {- gNeckoChild->SetEventTargetForActor(this, aIPCEventTarget);- } AddIPDLReference(); gNeckoChild->SendPTCPServerSocketConstructor(this, aLocalPort, aBacklog, aUseArrayBuffers);
Let me analyze the provided code diff for security fixes: Vulnerability Existed: not sure Potential IPC Event Target Vulnerability [dom/network/TCPServerSocketChild.cpp] [Lines 38-46] [Old Code] TCPServerSocketChild::TCPServerSocketChild( TCPServerSocket* aServerSocket, uint16_t aLocalPort, uint16_t aBacklog, bool aUseArrayBuffers, nsISerialEventTarget* aIPCEventTarget) { mServerSocket = aServerSocket; if (aIPCEventTarget) { gNeckoChild->SetEventTargetForActor(this, aIPCEventTarget); } [Fixed Code] TCPServerSocketChild::TCPServerSocketChild(TCPServerSocket* aServerSocket, uint16_t aLocalPort, uint16_t aBacklog, bool aUseArrayBuffers) { mServerSocket = aServerSocket; Additional Details: The main change is the removal of the aIPCEventTarget parameter and its associated handling. While this could potentially relate to security (as IPC event targets can be security-sensitive), without more context about why this was removed, I can't definitively identify a specific vulnerability. The change might be related to hardening IPC communications or removing potentially unsafe customization of event targets.
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/shell/content/setDesktopBackground.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/browser/components/shell/content/setDesktopBackground.js@@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */-/* import-globals-from ../../../base/content/utilityOverlay.js */+/* import-globals-from /browser/base/content/utilityOverlay.js */ var gSetBackground = { _position: AppConstants.platform == "macosx" ? "STRETCH" : "",
Based on the provided diff, here's the analysis: Vulnerability Existed: not sure [Potential Path Traversal or Module Inclusion Issue] [browser/components/shell/content/setDesktopBackground.js] [Lines 2] [Old Code] `/* import-globals-from ../../../base/content/utilityOverlay.js */` [Fixed Code] `/* import-globals-from /browser/base/content/utilityOverlay.js */` Additional Details: The change involves modifying the path for importing globals from a utility file. While this doesn't directly show a security vulnerability, the change from a relative path (`../../../base/content/`) to an absolute path (`/browser/base/content/`) could potentially address: 1. A path traversal vulnerability if the relative path could be manipulated 2. A module inclusion security issue where the wrong file might be loaded 3. A reliability issue in file resolution However, without more context about how this path is used and processed, we can't be certain if this was fixing an actual security vulnerability or just improving code maintainability.
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.