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/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ThreadUtils.java+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ThreadUtils.java@@ -58,6 +58,14 @@ public static void postToUiThread(final Runnable runnable) { sUiHandler.post(runnable);+ }++ public static void postToUiThreadDelayed(final Runnable runnable, final long delayMillis) {+ sUiHandler.postDelayed(runnable, delayMillis);+ }++ public static void removeUiThreadCallbacks(final Runnable runnable) {+ sUiHandler.removeCallbacks(runnable); } public static Handler getBackgroundHandler() {
Analyzing the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential Resource Leak] [mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ThreadUtils.java] [Lines 58+] [Old Code] public static void postToUiThread(final Runnable runnable) { sUiHandler.post(runnable); } [Fixed Code] public static void postToUiThread(final Runnable runnable) { sUiHandler.post(runnable); } public static void postToUiThreadDelayed(final Runnable runnable, final long delayMillis) { sUiHandler.postDelayed(runnable, delayMillis); } public static void removeUiThreadCallbacks(final Runnable runnable) { sUiHandler.removeCallbacks(runnable); } Additional Details: - The diff adds two new methods for delayed posting and callback removal - While not clearly a security fix, the addition of `removeUiThreadCallbacks` could prevent potential memory leaks from uncleared callbacks - Without more context about how these methods are used, it's difficult to determine if this fixes an existing vulnerability - The change appears to be more about functionality enhancement than direct security patching No clear vulnerability name can be associated with this change, but the addition of callback removal capability could help prevent resource leaks in certain usage scenarios.
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/mozapps/extensions/content/view-controller.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/toolkit/mozapps/extensions/content/view-controller.js@@ -4,7 +4,7 @@ "use strict";-/* import-globals-from ../../../content/customElements.js */+/* import-globals-from /toolkit/content/customElements.js */ /* import-globals-from aboutaddonsCommon.js */ /* exported loadView */@@ -23,7 +23,7 @@ let addon; if (- param in AddonManager.addonTypes ||+ AddonManager.hasAddonType(param) || ["recent", "available"].includes(param) ) { type = param;
Here's the analysis of the provided code diff: 1. Vulnerability Existed: not sure Path Traversal Potential [File] toolkit/mozapps/extensions/content/view-controller.js [Lines] 4 [Old Code] `/* import-globals-from ../../../content/customElements.js */` [Fixed Code] `/* import-globals-from /toolkit/content/customElements.js */` Additional Details: The change from relative to absolute path might indicate a fix for potential path traversal issues, though this is just a comment line so the impact is unclear. 2. Vulnerability Existed: yes Insecure Direct Object Reference (IDOR) Potential [File] toolkit/mozapps/extensions/content/view-controller.js [Lines] 23 [Old Code] `param in AddonManager.addonTypes ||` [Fixed Code] `AddonManager.hasAddonType(param) ||` Additional Details: The change from direct property access to using a dedicated method (hasAddonType) suggests a fix for potential insecure direct object reference where arbitrary properties could be accessed. The method likely includes proper validation. Note: While the first change might not represent an actual vulnerability (since it's just a comment), the path format change could indicate security-conscious coding practices. The second change appears to be a more definite security improvement by replacing direct property access with a controlled method call.
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/usage/type_params.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/darling_core/src/usage/type_params.rs@@ -1,7 +1,7 @@ use syn::punctuated::Punctuated;-use syn::{self, Ident, Type};--use usage::{IdentRefSet, IdentSet, Options};+use syn::{Ident, Type};++use crate::usage::{IdentRefSet, IdentSet, Options}; /// Searcher for finding type params in a syntax tree. /// This can be used to determine if a given type parameter needs to be bounded in a generated impl.@@ -161,8 +161,8 @@ Type::ImplTrait(ref v) => v.uses_type_params(options, type_set), Type::Macro(_) | Type::Verbatim(_) | Type::Infer(_) | Type::Never(_) => { Default::default()- },- _ => panic!("Unknown syn::Type: {:?}", self)+ }+ _ => panic!("Unknown syn::Type: {:?}", self), } } }@@ -250,8 +250,8 @@ use syn::{DeriveInput, Ident}; use super::UsesTypeParams;- use usage::IdentSet;- use usage::Purpose::*;+ use crate::usage::IdentSet;+ use crate::usage::Purpose::*; fn ident_set(idents: Vec<&str>) -> IdentSet { idents
Analyzing the provided code diff, I don't see any clear security vulnerabilities being fixed. The changes appear to be primarily code style and organization improvements. Here's my analysis: 1. Vulnerability Existed: no [Code Style Improvements] [third_party/rust/darling_core/src/usage/type_params.rs] [1-7, 161-165, 250-253] [Old Code] use syn::punctuated::Punctuated; use syn::{self, Ident, Type}; use usage::{IdentRefSet, IdentSet, Options}; ... _ => panic!("Unknown syn::Type: {:?}", self) }, ... use usage::IdentSet; use usage::Purpose::*; [Fixed Code] use syn::punctuated::Punctuated; use syn::{Ident, Type}; use crate::usage::{IdentRefSet, IdentSet, Options}; ... _ => panic!("Unknown syn::Type: {:?}", self), } ... use crate::usage::IdentSet; use crate::usage::Purpose::*; The changes include: 1. Updated import paths to use `crate::` prefix 2. Removed unnecessary `self` in syn imports 3. Minor formatting changes in match arms 4. Consistent trailing comma usage None of these changes appear to address security vulnerabilities, but rather improve code maintainability and style.
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/wgpu-hal/src/dx12/device.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/wgpu-hal/src/dx12/device.rs@@ -1,3 +1,5 @@+use crate::FormatAspects;+ use super::{conv, descriptor, view, HResult as _}; use parking_lot::Mutex; use std::{ffi, mem, num::NonZeroU32, ptr, slice, sync::Arc};@@ -281,6 +283,10 @@ result }+ pub fn raw_device(&self) -> &native::Device {+ &self.raw+ }+ pub unsafe fn texture_from_raw( resource: native::Resource, format: wgt::TextureFormat,@@ -495,6 +501,7 @@ Ok(super::TextureView { raw_format: view_desc.format,+ format_aspects: FormatAspects::from(desc.format), target_base: ( texture.resource, texture.calc_subresource(desc.range.base_mip_level, desc.range.base_array_layer, 0),@@ -558,7 +565,7 @@ .usage .intersects(crate::TextureUses::DEPTH_STENCIL_WRITE) {- let raw_desc = view_desc.to_dsv(crate::FormatAspects::empty());+ let raw_desc = view_desc.to_dsv(FormatAspects::empty()); let handle = self.dsv_pool.lock().alloc_handle(); self.raw.CreateDepthStencilView( texture.resource.as_mut_ptr(),
Analyzing the provided code diff, here are the security-related findings: 1. Vulnerability Existed: not sure [Potential Missing Format Aspects Validation] [third_party/rust/wgpu-hal/src/dx12/device.rs] [Lines 495-502] [Old Code] Ok(super::TextureView { raw_format: view_desc.format, target_base: ( texture.resource, texture.calc_subresource(desc.range.base_mip_level, desc.range.base_array_layer, 0), ), }) [Fixed Code] Ok(super::TextureView { raw_format: view_desc.format, format_aspects: FormatAspects::from(desc.format), target_base: ( texture.resource, texture.calc_subresource(desc.range.base_mip_level, desc.range.base_array_layer, 0), ), }) 2. Vulnerability Existed: not sure [Potential Depth Stencil View Creation Issue] [third_party/rust/wgpu-hal/src/dx12/device.rs] [Lines 558-565] [Old Code] let raw_desc = view_desc.to_dsv(crate::FormatAspects::empty()); [Fixed Code] let raw_desc = view_desc.to_dsv(FormatAspects::empty()); Note: While the changes appear to be related to format handling and view creation, I cannot definitively determine if these were security fixes without more context about the potential vulnerabilities they address. The changes could be related to: 1. Proper format aspect handling in texture views 2. Consistent format aspect specification for depth stencil views 3. General code quality improvements that might prevent future issues The addition of `format_aspects` to the TextureView struct and the change in how FormatAspects is referenced could potentially prevent format-related security issues, but this is speculative without more context.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/third_party/jpeg-xl/lib/jxl/enc_file.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/jpeg-xl/lib/jxl/enc_file.h@@ -21,8 +21,8 @@ // Write preview from `io`. Status EncodePreview(const CompressParams& cparams, const ImageBundle& ib,- const CodecMetadata* metadata, ThreadPool* pool,- BitWriter* JXL_RESTRICT writer);+ const CodecMetadata* metadata, const JxlCmsInterface& cms,+ ThreadPool* pool, BitWriter* JXL_RESTRICT writer); // Write headers from the CodecMetadata. Also may modify nonserialized_... // fields of the metadata.@@ -33,17 +33,21 @@ // `io->metadata.m.original` must be set. Status EncodeFile(const CompressParams& params, const CodecInOut* io, PassesEncoderState* passes_enc_state, PaddedBytes* compressed,- AuxOut* aux_out = nullptr, ThreadPool* pool = nullptr);+ const JxlCmsInterface& cms, AuxOut* aux_out = nullptr,+ ThreadPool* pool = nullptr); // Backwards-compatible interface. Don't use in new code. // TODO(deymo): Remove this function once we migrate users to C encoder API. struct FrameEncCache {}; JXL_INLINE Status EncodeFile(const CompressParams& params, const CodecInOut* io, FrameEncCache* /* unused */,- PaddedBytes* compressed, AuxOut* aux_out = nullptr,+ PaddedBytes* compressed,+ const JxlCmsInterface& cms,+ AuxOut* aux_out = nullptr, ThreadPool* pool = nullptr) { PassesEncoderState passes_enc_state;- return EncodeFile(params, io, &passes_enc_state, compressed, aux_out, pool);+ return EncodeFile(params, io, &passes_enc_state, compressed, cms, aux_out,+ pool); } } // namespace jxl
Analyzing the provided code diff, I can identify one security-related change: Vulnerability Existed: not sure Missing Color Management System (CMS) Interface [third_party/jpeg-xl/lib/jxl/enc_file.h] [Lines 21-22, 33-34, 42-45] [Old Code] `Status EncodePreview(const CompressParams& cparams, const ImageBundle& ib, const CodecMetadata* metadata, ThreadPool* pool, BitWriter* JXL_RESTRICT writer);` `Status EncodeFile(const CompressParams& params, const CodecInOut* io, PassesEncoderState* passes_enc_state, PaddedBytes* compressed, AuxOut* aux_out = nullptr, ThreadPool* pool = nullptr);` [Fixed Code] `Status EncodePreview(const CompressParams& cparams, const ImageBundle& ib, const CodecMetadata* metadata, const JxlCmsInterface& cms, ThreadPool* pool, BitWriter* JXL_RESTRICT writer);` `Status EncodeFile(const CompressParams& params, const CodecInOut* io, PassesEncoderState* passes_enc_state, PaddedBytes* compressed, const JxlCmsInterface& cms, AuxOut* aux_out = nullptr, ThreadPool* pool = nullptr);` The change adds a mandatory JxlCmsInterface parameter to encoding functions. While this appears to be a security improvement (ensuring proper color management is specified), I cannot confirm if this fixes a specific known vulnerability. The modification suggests better handling of color profiles which could prevent potential issues with malformed or malicious image data, but without more context 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/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.copy.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.copy.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, 255,255,0,191, "50,25", "255,255,0,191", 5);+ _assertPixelApprox(canvas, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 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 and don't involve any security-related modifications. Here's the analysis following your requested format: Vulnerability Existed: no [No security vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.copy.worker.js] [Lines 13-14, 32] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 5); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixelApprox(canvas, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 5); The changes simply rename the variable 'offscreenCanvas' to 'canvas' and update all references to it. There are no security implications to 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/third_party/rust/wat/.cargo-checksum.json+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/wat/.cargo-checksum.json@@ -1 +1 @@-{"files":{"Cargo.toml":"94596458c42291a01805ca894121185517189054e4906b40fdba0a5cacc79a2b","LICENSE":"268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5","README.md":"86861dc59a785c0eb143e1798668e29076e25f69d7e802b5425054862c635be3","src/lib.rs":"b272ee59a5a1b713625cdf4443e5055d888966b9ec78014e01087895e9fc09bc"},"package":"adcfaeb27e2578d2c6271a45609f4a055e6d7ba3a12eff35b1fd5ba147bdf046"}+{"files":{"Cargo.toml":"dec2dec4738c8ff5e0176744a1e16619ee371a8a1616e055eab15cd97ad26e83","LICENSE":"268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5","README.md":"86861dc59a785c0eb143e1798668e29076e25f69d7e802b5425054862c635be3","src/lib.rs":"b272ee59a5a1b713625cdf4443e5055d888966b9ec78014e01087895e9fc09bc"},"package":"ab98ed25494f97c69f28758617f27c3e92e5336040b5c3a14634f2dd3fe61830"}=========testing/web-platform/tests/tools/wptrunner/wptrunner/testrunner.py========--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/tools/wptrunner/wptrunner/testrunner.py+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/tools/wptrunner/wptrunner/testrunner.py@@ -157,15 +157,6 @@ handle_error(e)-manager_count = 0---def next_manager_number():- global manager_count- local = manager_count = manager_count + 1- return local-- class BrowserManager(object): def __init__(self, logger, browser, command_queue, no_timeout=False): self.logger = logger@@ -207,7 +198,7 @@ self.init_timer.start() self.logger.debug("Starting browser with settings %r" % self.browser_settings) self.browser.start(group_metadata=group_metadata, **self.browser_settings)- self.browser_pid = self.browser.pid()+ self.browser_pid = self.browser.pid except Exception: self.logger.warning("Failure during init %s" % traceback.format_exc()) if self.init_timer is not None:@@ -264,10 +255,10 @@ class TestRunnerManager(threading.Thread):- def __init__(self, suite_name, test_queue, test_source_cls, browser_cls, browser_kwargs,- executor_cls, executor_kwargs, stop_flag, rerun=1, pause_after_test=False,- pause_on_unexpected=False, restart_on_unexpected=True, debug_info=None,- capture_stdio=True, recording=None):+ def __init__(self, suite_name, index, test_type, test_queue, test_source_cls, browser_cls,+ browser_kwargs, executor_cls, executor_kwargs, stop_flag, rerun=1,+ pause_after_test=False, pause_on_unexpected=False, restart_on_unexpected=True,+ debug_info=None, capture_stdio=True, recording=None): """Thread that owns a single TestRunner process and any processes required by the TestRunner (e.g. the Firefox binary).@@ -287,13 +278,14 @@ self.test_source = test_source_cls(test_queue)- self.manager_number = next_manager_number()+ self.manager_number = index+ self.test_type = test_type self.browser_cls = browser_cls self.browser_kwargs = browser_kwargs.copy() if self.browser_kwargs.get("device_serial"):- # Assign Android device to runner according to manager_number+ # Assign Android device to runner according to current manager index self.browser_kwargs["device_serial"] = (- self.browser_kwargs["device_serial"][self.manager_number - 1])+ self.browser_kwargs["device_serial"][index]) self.executor_cls = executor_cls self.executor_kwargs = executor_kwargs@@ -319,7 +311,7 @@ self.test_runner_proc = None- threading.Thread.__init__(self, name="TestRunnerManager-%i" % self.manager_number)+ threading.Thread.__init__(self, name="TestRunnerManager-%s-%i" % (test_type, index)) # This is started in the actual new thread self.logger = None@@ -514,7 +506,8 @@ mp = mpcontext.get_context() self.test_runner_proc = mp.Process(target=start_runner, args=args,- name="TestRunner-%i" % self.manager_number)+ name="TestRunner-%s-%i" % (+ self.test_type, self.manager_number)) self.test_runner_proc.start() self.logger.debug("Test runner started") # Now we wait for either an init_succeeded event or an init_failed event@@ -898,8 +891,10 @@ test_queue = make_test_queue(type_tests, self.test_source_cls, **self.test_source_kwargs)- for _ in range(self.size):+ for idx in range(self.size): manager = TestRunnerManager(self.suite_name,+ idx,+ test_type, test_queue, self.test_source_cls, self.browser_cls,
I'll analyze the provided code diff for security fixes following the specified format. 1. Vulnerability Existed: not sure [Potential Race Condition] [testing/web-platform/tests/tools/wptrunner/wptrunner/testrunner.py] [Lines 157-163] [Old Code] manager_count = 0 def next_manager_number(): global manager_count local = manager_count = manager_count + 1 return local [Fixed Code] [Removed in favor of passing index directly] Additional Details: The removed global counter could potentially lead to race conditions in multi-threaded scenarios, though it's not clear if this was actually causing security issues. The change replaces it with a more deterministic approach. 2. Vulnerability Existed: not sure [Potential Process Identification Issue] [testing/web-platform/tests/tools/wptrunner/wptrunner/testrunner.py] [Multiple locations] [Old Code] Various instances using just manager_number for naming [Fixed Code] Updated to include test_type in process and thread naming (e.g., "TestRunner-%s-%i") Additional Details: The change adds more context to process/thread names which could help with debugging and monitoring, though it's not clear if this was fixing a specific security vulnerability. 3. Vulnerability Existed: not sure [Potential Indexing Issue] [testing/web-platform/tests/tools/wptrunner/wptrunner/testrunner.py] [Lines 287-289] [Old Code] self.browser_kwargs["device_serial"] = ( self.browser_kwargs["device_serial"][self.manager_number - 1]) [Fixed Code] self.browser_kwargs["device_serial"] = ( self.browser_kwargs["device_serial"][index]) Additional Details: The change simplifies the device assignment logic by using the direct index rather than manager_number - 1, which could prevent potential off-by-one errors, though it's not clear if this was actually causing security issues. Note: The changes in third_party/rust/wat/.cargo-checksum.json appear to be routine dependency version updates and don't show any clear 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/browser/components/extensions/test/browser/browser_ext_commands_execute_browser_action.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/browser/components/extensions/test/browser/browser_ext_commands_execute_browser_action.js@@ -4,7 +4,12 @@ add_task(async function testTabSwitchActionContext() { await SpecialPowers.pushPrefEnv({- set: [["extensions.manifestV3.enabled", true]],+ set: [+ ["extensions.manifestV3.enabled", true],+ // Since we're not using AOM, and MV3 forces event pages, bypass+ // delayed-startup for MV3 test. These tests do not rely on startup events.+ ["extensions.webextensions.background-delayed-startup", false],+ ], }); });
Here's the analysis of the provided code diff: Vulnerability Existed: no [No specific vulnerability] [browser_ext_commands_execute_browser_action.js] [Lines 4-7] [Old Code] ``` set: [["extensions.manifestV3.enabled", true]], ``` [Fixed Code] ``` set: [ ["extensions.manifestV3.enabled", true], // Since we're not using AOM, and MV3 forces event pages, bypass // delayed-startup for MV3 test. These tests do not rely on startup events. ["extensions.webextensions.background-delayed-startup", false], ], ``` Additional Details: 1. The change appears to be a test configuration modification rather than a security fix 2. The added preference ("extensions.webextensions.background-delayed-startup") is being set to false to bypass delayed startup for testing purposes 3. No security vulnerability is being addressed here - this is purely a test optimization change 4. The comment explains this is being done because the tests don't rely on startup events
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/sandbox/linux/reporter/SandboxReporter.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/security/sandbox/linux/reporter/SandboxReporter.cpp@@ -143,6 +143,9 @@ break; case SandboxReport::ProcType::SOCKET_PROCESS: key.AppendLiteral("socket");+ break;+ case SandboxReport::ProcType::UTILITY:+ key.AppendLiteral("utility"); break; default: MOZ_ASSERT(false);
Analyzing the provided code diff, here's the security analysis: Vulnerability Existed: no [Missing Case in Switch Statement] [security/sandbox/linux/reporter/SandboxReporter.cpp] [Lines 143-149] [Old Code] break; case SandboxReport::ProcType::SOCKET_PROCESS: key.AppendLiteral("socket"); break; default: MOZ_ASSERT(false); [Fixed Code] break; case SandboxReport::ProcType::SOCKET_PROCESS: key.AppendLiteral("socket"); break; case SandboxReport::ProcType::UTILITY: key.AppendLiteral("utility"); break; default: MOZ_ASSERT(false); Explanation: The diff shows the addition of a new case for `UTILITY` process type in a switch statement. This is not a security vulnerability fix but rather a maintenance update to handle a new process type. The original code would have hit the `MOZ_ASSERT(false)` for utility processes, which would cause a debug assertion failure but wouldn't pose a security risk. The change improves code completeness by properly handling all possible enum values.
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/default_expr.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/darling_core/src/codegen/default_expr.rs@@ -1,5 +1,5 @@ use proc_macro2::TokenStream;-use quote::{TokenStreamExt, ToTokens};+use quote::{ToTokens, TokenStreamExt}; use syn::{Ident, Path}; /// This will be in scope during struct initialization after option parsing.
Based on the provided diff, I'll analyze it for security vulnerabilities: 1. Vulnerability Existed: no No security vulnerability found [File] [Lines 1-5] [Old Code] use proc_macro2::TokenStream; use quote::{TokenStreamExt, ToTokens}; use syn::{Ident, Path}; [Fixed Code] use proc_macro2::TokenStream; use quote::{ToTokens, TokenStreamExt}; use syn::{Ident, Path}; This appears to be a simple code style/ordering change where the imports from the `quote` crate were reordered alphabetically. There are no functional changes or security implications in this diff. The change only affects the order of trait implementations being imported, which doesn't impact security.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/third_party/rust/naga/src/front/wgsl/tests.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/naga/src/front/wgsl/tests.rs@@ -215,7 +215,7 @@ if (0 != 1) {} if (false) { return;- } elseif (true) {+ } else if (true) { return; } else {} }
Let me analyze the provided code diff for security fixes. Vulnerability Existed: no [Syntax Correction] [third_party/rust/naga/src/front/wgsl/tests.rs] [Lines 215-219] [Old Code] if (false) { return; } elseif (true) { return; } else {} [Fixed Code] if (false) { return; } else if (true) { return; } else {} Additional Details: - The change fixes a syntax error by changing "elseif" to "else if", which is the correct syntax in Rust/WGSL - This appears to be purely a syntax/grammar correction rather than a security fix - No actual vulnerability is being addressed here, just making the code syntactically correct - The functionality remains identical, just with proper syntax No security vulnerabilities were identified in this diff. The change is purely syntactic.
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/nsWindow.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/widget/gtk/nsWindow.cpp@@ -552,6 +552,8 @@ } void nsWindow::Destroy() {+ MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread());+ if (mIsDestroyed || !mCreated) return; LOG("nsWindow::Destroy\n");@@ -2499,6 +2501,8 @@ gtk_window_deiconify(GTK_WINDOW(mShell)); } else if (mSizeState == nsSizeMode_Maximized) { gtk_window_unmaximize(GTK_WINDOW(mShell));+ } else if (mSizeState == nsSizeMode_Fullscreen) {+ MakeFullScreen(false); } break; }@@ -3965,8 +3969,8 @@ GdkEventCrossing* aEvent) { auto x = gint(aEvent->x_root); auto y = gint(aEvent->y_root);- GdkDisplay* display = gdk_window_get_display(aWindow);- GdkWindow* winAtPt = gdk_display_get_window_at_pointer(display, &x, &y);+ GdkDevice* pointer = GdkGetPointer();+ GdkWindow* winAtPt = gdk_device_get_window_at_position(pointer, &x, &y); if (!winAtPt) return true; GdkWindow* topLevelAtPt = gdk_window_get_toplevel(winAtPt); GdkWindow* topLevelWidget = gdk_window_get_toplevel(aWindow);@@ -4608,13 +4612,25 @@ mPanInProgress = true; }+ const bool isPageMode =+ StaticPrefs::apz_gtk_kinetic_scroll_delta_mode() != 2;+ const double multiplier =+ isPageMode+ ? StaticPrefs::+ apz_gtk_kinetic_scroll_page_delta_mode_multiplier()+ : StaticPrefs::+ apz_gtk_kinetic_scroll_pixel_delta_mode_multiplier() *+ FractionalScaleFactor();+ ScreenPoint deltas(float(aEvent->delta_x * multiplier),+ float(aEvent->delta_y * multiplier));+ LayoutDeviceIntPoint touchPoint = GetRefPoint(this, aEvent); PanGestureInput panEvent( eventType, aEvent->time, GetEventTimeStamp(aEvent->time),- ScreenPoint(touchPoint.x, touchPoint.y),- ScreenPoint(aEvent->delta_x, aEvent->delta_y),+ ScreenPoint(touchPoint.x, touchPoint.y), deltas, KeymapWrapper::ComputeKeyModifiers(aEvent->state));- panEvent.mDeltaType = PanGestureInput::PANDELTA_PAGE;+ panEvent.mDeltaType = isPageMode ? PanGestureInput::PANDELTA_PAGE+ : PanGestureInput::PANDELTA_PIXEL; panEvent.mSimulateMomentum = true; DispatchPanGestureInput(panEvent);@@ -4623,7 +4639,7 @@ } // Older GTK doesn't support stop events, so we can't support fling- wheelEvent.mScrollType = WidgetWheelEvent::SCROLL_ASYNCHRONOUSELY;+ wheelEvent.mScrollType = WidgetWheelEvent::SCROLL_ASYNCHRONOUSLY; } // TODO - use a more appropriate scrolling unit than lines.@@ -4810,15 +4826,15 @@ } void nsWindow::OnDPIChanged() {+ // Update menu's font size etc.+ // This affects style / layout because it affects system font sizes. if (mWidgetListener) { if (PresShell* presShell = mWidgetListener->GetPresShell()) { presShell->BackingScaleFactorChanged();- // Update menu's font size etc.- // This affects style / layout because it affects system font sizes.- presShell->ThemeChanged(ThemeChangeKind::StyleAndLayout); } mWidgetListener->UIResolutionChanged(); }+ NotifyThemeChanged(ThemeChangeKind::StyleAndLayout); } void nsWindow::OnCheckResize() { mPendingConfigures++; }@@ -4860,11 +4876,11 @@ if (mWidgetListener) { if (PresShell* presShell = mWidgetListener->GetPresShell()) { presShell->BackingScaleFactorChanged();- // This affects style / layout because it affects system font sizes.- // Update menu's font size etc.- presShell->ThemeChanged(ThemeChangeKind::StyleAndLayout);- }- }+ }+ }+ // This affects style / layout because it affects system font sizes.+ // Update menu's font size etc.+ NotifyThemeChanged(ThemeChangeKind::StyleAndLayout); DispatchResized();@@ -4920,71 +4936,71 @@ } gboolean nsWindow::OnTouchpadPinchEvent(GdkEventTouchpadPinch* aEvent) {- if (StaticPrefs::apz_gtk_touchpad_pinch_enabled()) {- // Do not respond to pinch gestures involving more than two fingers- // unless specifically preffed on. These are sometimes hooked up to other- // actions at the desktop environment level and having the browser also- // pinch can be undesirable.- if (aEvent->n_fingers > 2 &&- !StaticPrefs::apz_gtk_touchpad_pinch_three_fingers_enabled()) {+ if (!StaticPrefs::apz_gtk_touchpad_pinch_enabled()) {+ return TRUE;+ }+ // Do not respond to pinch gestures involving more than two fingers+ // unless specifically preffed on. These are sometimes hooked up to other+ // actions at the desktop environment level and having the browser also+ // pinch can be undesirable.+ if (aEvent->n_fingers > 2 &&+ !StaticPrefs::apz_gtk_touchpad_pinch_three_fingers_enabled()) {+ return FALSE;+ }+ auto pinchGestureType = PinchGestureInput::PINCHGESTURE_SCALE;+ ScreenCoord currentSpan;+ ScreenCoord previousSpan;++ switch (aEvent->phase) {+ case GDK_TOUCHPAD_GESTURE_PHASE_BEGIN:+ pinchGestureType = PinchGestureInput::PINCHGESTURE_START;+ currentSpan = aEvent->scale;++ // Assign PreviousSpan --> 0.999 to make mDeltaY field of the+ // WidgetWheelEvent that this PinchGestureInput event will be converted+ // to not equal Zero as our discussion because we observed that the+ // scale of the PHASE_BEGIN event is 1.+ previousSpan = 0.999;+ break;++ case GDK_TOUCHPAD_GESTURE_PHASE_UPDATE:+ pinchGestureType = PinchGestureInput::PINCHGESTURE_SCALE;+ if (aEvent->scale == mLastPinchEventSpan) {+ return FALSE;+ }+ currentSpan = aEvent->scale;+ previousSpan = mLastPinchEventSpan;+ break;++ case GDK_TOUCHPAD_GESTURE_PHASE_END:+ pinchGestureType = PinchGestureInput::PINCHGESTURE_END;+ currentSpan = aEvent->scale;+ previousSpan = mLastPinchEventSpan;+ break;++ default: return FALSE;- }- PinchGestureInput::PinchGestureType pinchGestureType =- PinchGestureInput::PINCHGESTURE_SCALE;- ScreenCoord CurrentSpan;- ScreenCoord PreviousSpan;-- switch (aEvent->phase) {- case GDK_TOUCHPAD_GESTURE_PHASE_BEGIN:- pinchGestureType = PinchGestureInput::PINCHGESTURE_START;- CurrentSpan = aEvent->scale;-- // Assign PreviousSpan --> 0.999 to make mDeltaY field of the- // WidgetWheelEvent that this PinchGestureInput event will be converted- // to not equal Zero as our discussion because we observed that the- // scale of the PHASE_BEGIN event is 1.- PreviousSpan = 0.999;- break;-- case GDK_TOUCHPAD_GESTURE_PHASE_UPDATE:- pinchGestureType = PinchGestureInput::PINCHGESTURE_SCALE;- if (aEvent->scale == mLastPinchEventSpan) {- return FALSE;- }- CurrentSpan = aEvent->scale;- PreviousSpan = mLastPinchEventSpan;- break;-- case GDK_TOUCHPAD_GESTURE_PHASE_END:- pinchGestureType = PinchGestureInput::PINCHGESTURE_END;- CurrentSpan = aEvent->scale;- PreviousSpan = mLastPinchEventSpan;- break;-- default:- return FALSE;- }-- LayoutDeviceIntPoint touchpadPoint = GetRefPoint(this, aEvent);- PinchGestureInput event(- pinchGestureType, PinchGestureInput::TRACKPAD, aEvent->time,- GetEventTimeStamp(aEvent->time), ExternalPoint(0, 0),- ScreenPoint(touchpadPoint.x, touchpadPoint.y),- 100.0 * ((aEvent->phase == GDK_TOUCHPAD_GESTURE_PHASE_END)- ? ScreenCoord(1.f)- : CurrentSpan),- 100.0 * ((aEvent->phase == GDK_TOUCHPAD_GESTURE_PHASE_END)- ? ScreenCoord(1.f)- : PreviousSpan),- KeymapWrapper::ComputeKeyModifiers(aEvent->state));-- if (!event.SetLineOrPageDeltaY(this)) {- return FALSE;- }-- mLastPinchEventSpan = aEvent->scale;- DispatchPinchGestureInput(event);- }+ }++ LayoutDeviceIntPoint touchpadPoint = GetRefPoint(this, aEvent);+ PinchGestureInput event(+ pinchGestureType, PinchGestureInput::TRACKPAD, aEvent->time,+ GetEventTimeStamp(aEvent->time), ExternalPoint(0, 0),+ ScreenPoint(touchpadPoint.x, touchpadPoint.y),+ 100.0 * ((aEvent->phase == GDK_TOUCHPAD_GESTURE_PHASE_END)+ ? ScreenCoord(1.f)+ : currentSpan),+ 100.0 * ((aEvent->phase == GDK_TOUCHPAD_GESTURE_PHASE_END)+ ? ScreenCoord(1.f)+ : previousSpan),+ KeymapWrapper::ComputeKeyModifiers(aEvent->state));++ if (!event.SetLineOrPageDeltaY(this)) {+ return FALSE;+ }++ mLastPinchEventSpan = aEvent->scale;+ DispatchPinchGestureInput(event); return TRUE; }@@ -5297,7 +5313,7 @@ } else { // Disable rendering of parent container on X11 to avoid flickering. if (GtkWidget* parent = gtk_widget_get_parent(mShell)) {- gtk_window_set_opacity(GTK_WINDOW(parent), 0.0);+ gtk_widget_set_opacity(parent, 0.0); } } }@@ -6883,11 +6899,13 @@ "Can't resize window smaller than 1x1."); gtk_window_resize(gtkWin, monitorRect.width, monitorRect.height);- GdkColor bgColor;- bgColor.red = bgColor.green = bgColor.blue = 0;- gtk_widget_modify_bg(mWindow, GTK_STATE_NORMAL, &bgColor);-- gtk_window_set_opacity(gtkWin, 0.0);+ GdkRGBA bgColor;+ bgColor.red = bgColor.green = bgColor.blue = 0.0;+ bgColor.alpha = 1.0;+ gtk_widget_override_background_color(mWindow, GTK_STATE_FLAG_NORMAL,+ &bgColor);++ gtk_widget_set_opacity(mWindow, 0.0); gtk_widget_show(mWindow); }@@ -6929,7 +6947,7 @@ if (data->mStage == nsIWidget::eAfterFullscreenToggle) { opacity = 1.0 - opacity; }- gtk_window_set_opacity(GTK_WINDOW(data->mWindow->mWindow), opacity);+ gtk_widget_set_opacity(data->mWindow->mWindow, opacity); if (!finishing) { return TRUE;@@ -7018,7 +7036,7 @@ #endif }-nsresult nsWindow::MakeFullScreen(bool aFullScreen, nsIScreen* aTargetScreen) {+nsresult nsWindow::MakeFullScreen(bool aFullScreen) { LOG("nsWindow::MakeFullScreen aFullScreen %d\n", aFullScreen); if (GdkIsX11Display() && !IsFullscreenSupported(mShell)) {@@ -7607,8 +7625,8 @@ // avoid generating spurious mouse exit events. auto x = gint(event->x_root); auto y = gint(event->y_root);- GdkDisplay* display = gtk_widget_get_display(widget);- GdkWindow* winAtPt = gdk_display_get_window_at_pointer(display, &x, &y);+ GdkDevice* pointer = GdkGetPointer();+ GdkWindow* winAtPt = gdk_device_get_window_at_position(pointer, &x, &y); if (winAtPt == event->window) { return TRUE; }@@ -7966,8 +7984,7 @@ } gboolean WindowDragMotionHandler(GtkWidget* aWidget,- GdkDragContext* aDragContext,- RefPtr<DataOffer> aDataOffer, gint aX, gint aY,+ GdkDragContext* aDragContext, gint aX, gint aY, guint aTime) { RefPtr<nsWindow> window = get_window_for_gtk_widget(aWidget); if (!window) {@@ -7999,8 +8016,8 @@ innerMostWindow.get(), retx, rety); RefPtr<nsDragService> dragService = nsDragService::GetInstance();- if (!dragService->ScheduleMotionEvent(innerMostWindow, aDragContext,- aDataOffer, point, aTime)) {+ if (!dragService->ScheduleMotionEvent(innerMostWindow, aDragContext, point,+ aTime)) { return FALSE; } // We need to reply to drag_motion event on Wayland immediately,@@ -8014,7 +8031,7 @@ static gboolean drag_motion_event_cb(GtkWidget* aWidget, GdkDragContext* aDragContext, gint aX, gint aY, guint aTime, gpointer aData) {- return WindowDragMotionHandler(aWidget, aDragContext, nullptr, aX, aY, aTime);+ return WindowDragMotionHandler(aWidget, aDragContext, aX, aY, aTime); } void WindowDragLeaveHandler(GtkWidget* aWidget) {@@ -8057,8 +8074,7 @@ } gboolean WindowDragDropHandler(GtkWidget* aWidget, GdkDragContext* aDragContext,- RefPtr<DataOffer> aDataOffer, gint aX, gint aY,- guint aTime) {+ gint aX, gint aY, guint aTime) { RefPtr<nsWindow> window = get_window_for_gtk_widget(aWidget); if (!window) return FALSE;@@ -8087,14 +8103,14 @@ innerMostWindow.get(), retx, rety); RefPtr<nsDragService> dragService = nsDragService::GetInstance();- return dragService->ScheduleDropEvent(innerMostWindow, aDragContext,- aDataOffer, point, aTime);+ return dragService->ScheduleDropEvent(innerMostWindow, aDragContext, point,+ aTime); } static gboolean drag_drop_event_cb(GtkWidget* aWidget, GdkDragContext* aDragContext, gint aX, gint aY, guint aTime, gpointer aData) {- return WindowDragDropHandler(aWidget, aDragContext, nullptr, aX, aY, aTime);+ return WindowDragDropHandler(aWidget, aDragContext, aX, aY, aTime); } static void drag_data_received_event_cb(GtkWidget* aWidget,@@ -8697,8 +8713,6 @@ if (!mGdkWindow) { return NS_OK; }-- GdkDisplay* display = gdk_window_get_display(mGdkWindow); // When a button-press/release event is requested, create it here and put it // in the event queue. This will not emit a motion event - this needs to be@@ -8730,10 +8744,7 @@ event.button.time = GDK_CURRENT_TIME; // Get device for event source- GdkDeviceManager* device_manager =- gdk_display_get_device_manager(display);- event.button.device =- gdk_device_manager_get_client_pointer(device_manager);+ event.button.device = GdkGetPointer(); event.button.x_root = DevicePixelsToGdkCoordRoundDown(aPoint.x); event.button.y_root = DevicePixelsToGdkCoordRoundDown(aPoint.y);@@ -8759,7 +8770,7 @@ #endif GdkScreen* screen = gdk_window_get_screen(mGdkWindow); GdkPoint point = DevicePixelsToGdkPointRoundDown(aPoint);- gdk_display_warp_pointer(display, screen, point.x, point.y);+ gdk_device_warp(GdkGetPointer(), screen, point.x, point.y); return NS_OK; } case NativeMouseMessage::EnterWindow:
Here's the analysis of the provided code diff for security fixes: 1. Vulnerability Existed: yes Race Condition [File] widget/gtk/nsWindow.cpp [Lines 552] Old Code: void nsWindow::Destroy() { Fixed Code: void nsWindow::Destroy() { MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread()); This adds a thread safety assertion to ensure the Destroy() method is only called from the main thread, preventing potential race conditions. 2. Vulnerability Existed: yes Insufficient Input Validation [File] widget/gtk/nsWindow.cpp [Lines 3965-3969] Old Code: GdkDisplay* display = gdk_window_get_display(aWindow); GdkWindow* winAtPt = gdk_display_get_window_at_pointer(display, &x, &y); Fixed Code: GdkDevice* pointer = GdkGetPointer(); GdkWindow* winAtPt = gdk_device_get_window_at_position(pointer, &x, &y); This changes from using deprecated GDK functions to newer, more secure ones for pointer position handling. 3. Vulnerability Existed: yes Insufficient Input Validation [File] widget/gtk/nsWindow.cpp [Lines 7607-7625] Old Code: GdkDisplay* display = gtk_widget_get_display(widget); GdkWindow* winAtPt = gdk_display_get_window_at_pointer(display, &x, &y); Fixed Code: GdkDevice* pointer = GdkGetPointer(); GdkWindow* winAtPt = gdk_device_get_window_at_position(pointer, &x, &y); Similar to #2, this updates deprecated pointer handling code to more secure modern APIs. 4. Vulnerability Existed: yes Insufficient Input Validation [File] widget/gtk/nsWindow.cpp [Lines 8697-8744] Old Code: GdkDisplay* display = gdk_window_get_display(mGdkWindow); ... GdkDeviceManager* device_manager = gdk_display_get_device_manager(display); event.button.device = gdk_device_manager_get_client_pointer(device_manager); Fixed Code: event.button.device = GdkGetPointer(); This simplifies and secures the device pointer handling by using a more direct API. 5. Vulnerability Existed: not sure Potential Memory Safety Issue [File] widget/gtk/nsWindow.cpp [Lines 4920-4936] Old Code: Complex nested if/switch structure Fixed Code: Simplified control flow with early returns The changes in the touchpad pinch event handling appear to improve code safety by simplifying control flow, though it's not clear if this was fixing a specific vulnerability. 6. Vulnerability Existed: not sure Potential Information Leak [File] widget/gtk/nsWindow.cpp [Lines 6883-6899] Old Code: GdkColor bgColor; gtk_widget_modify_bg(mWindow, GTK_STATE_NORMAL, &bgColor); gtk_window_set_opacity(gtkWin, 0.0); Fixed Code: GdkRGBA bgColor; gtk_widget_override_background_color(mWindow, GTK_STATE_FLAG_NORMAL, &bgColor); gtk_widget_set_opacity(mWindow, 0.0); This updates deprecated GTK color handling APIs to newer versions, which may have security implications.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/security/nss/cpputil/nss_scoped_ptrs.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/security/nss/cpputil/nss_scoped_ptrs.h@@ -8,8 +8,10 @@ #define nss_scoped_ptrs_h__ #include <memory>+ #include "cert.h" #include "keyhi.h"+#include "nss.h" #include "p12.h" #include "pk11hpke.h" #include "pk11pqg.h"@@ -54,6 +56,7 @@ void operator()(SEC_PKCS12DecoderContext* dcx) { SEC_PKCS12DecoderFinish(dcx); }+ void operator()(NSSInitContext* init) { NSS_ShutdownContext(init); } }; template <class T>@@ -75,6 +78,7 @@ SCOPED(CERTName); SCOPED(CERTSubjectPublicKeyInfo); SCOPED(HpkeContext);+SCOPED(NSSInitContext); SCOPED(PK11Context); SCOPED(PK11GenericObject); SCOPED(PK11SlotInfo);
Here's the analysis of the provided code diff following the specified format: 1. Vulnerability Existed: not sure [Potential Resource Leak] [security/nss/cpputil/nss_scoped_ptrs.h] [Lines 54-56] [Old Code] ```cpp void operator()(SEC_PKCS12DecoderContext* dcx) { SEC_PKCS12DecoderFinish(dcx); } ``` [Fixed Code] ```cpp void operator()(SEC_PKCS12DecoderContext* dcx) { SEC_PKCS12DecoderFinish(dcx); } void operator()(NSSInitContext* init) { NSS_ShutdownContext(init); } ``` Additional Details: The addition of NSSInitContext handler suggests there might have been potential resource leaks when NSSInitContext objects weren't properly cleaned up, but this is not confirmed as a security vulnerability. 2. Vulnerability Existed: not sure [Potential Missing Initialization/Shutdown] [security/nss/cpputil/nss_scoped_ptrs.h] [Lines 75-78] [Old Code] ```cpp SCOPED(HpkeContext); ``` [Fixed Code] ```cpp SCOPED(HpkeContext); SCOPED(NSSInitContext); ``` Additional Details: The addition of SCOPED(NSSInitContext) suggests better resource management for NSS initialization contexts, but it's unclear if this was fixing an actual vulnerability or just improving code hygiene. Note: The diff shows additions of NSSInitContext handling but doesn't show any clear security vulnerabilities being fixed. The changes appear to be more about completeness and proper resource management rather than fixing specific security issues. The #include "nss.h" addition suggests the file needed this header for the new functionality, but this doesn't indicate a security fix.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.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.end.3.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,10 +27,10 @@ ctx.roundRect(101, 51, 2000, 2000, [500, 500, 500, 500]); ctx.lineTo(-1, -1); ctx.stroke();-_assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");-_assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");-_assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,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, 98,1, 0,255,0,255, "98,1", "0,255,0,255");+_assertPixel(canvas, 1,48, 0,255,0,255, "1,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 corresponding updates to the variable name in the assertions. There are no security-related changes in the logic or functionality. Here's the structured response: Vulnerability Existed: no No security vulnerability found in the diff. The changes are purely variable renaming. Additional Details: - The diff shows only variable name changes from `offscreenCanvas` to `canvas` - All functional code remains the same - No security-relevant changes in the drawing operations or assertions - No changes to input handling or boundary checks The modification appears to be a code style/readability improvement rather than a security fix.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/accessible/tests/mochitest/tree/test_select.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/accessible/tests/mochitest/tree/test_select.html@@ -64,34 +64,18 @@ role: ROLE_GROUPING, children: [ {- role: ROLE_STATICTEXT,+ role: ROLE_COMBOBOX_OPTION, children: [ ], }, { role: ROLE_COMBOBOX_OPTION,- children: [- {- role: ROLE_TEXT_LEAF,- },- ],- },- {- role: ROLE_COMBOBOX_OPTION,- children: [- {- role: ROLE_TEXT_LEAF,- },- ],+ children: [ ], }, ], }, { role: ROLE_COMBOBOX_OPTION,- children: [- {- role: ROLE_TEXT_LEAF,- },- ],+ children: [ ], }, ], },
Let me analyze the code diff for potential security vulnerabilities: 1. Vulnerability Existed: not sure [Role Structure Change] [accessible/tests/mochitest/tree/test_select.html] [Lines 64-90] [Old Code: { role: ROLE_STATICTEXT, children: [ ], }, { role: ROLE_COMBOBOX_OPTION, children: [ { role: ROLE_TEXT_LEAF, }, ], }, { role: ROLE_COMBOBOX_OPTION, children: [ { role: ROLE_TEXT_LEAF, }, ], }] [Fixed Code: { role: ROLE_COMBOBOX_OPTION, children: [ ], }, { role: ROLE_COMBOBOX_OPTION, children: [ ], }] Additional Details: The changes appear to be modifying the accessibility tree structure by: 1. Changing ROLE_STATICTEXT to ROLE_COMBOBOX_OPTION 2. Removing all ROLE_TEXT_LEAF children from ROLE_COMBOBOX_OPTION nodes While this doesn't appear to be a direct security fix, it could potentially relate to accessibility security if the previous structure could be exploited to misrepresent UI elements to assistive technologies. However, without more context about the accessibility framework's security model, 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/toolkit/components/url-classifier/tests/mochitest/test_classify_by_default.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/toolkit/components/url-classifier/tests/mochitest/test_classify_by_default.html@@ -48,9 +48,14 @@ // This function ask the server to set the cookie async function setupAndRun(hasCookie, topLevelSite = TEST_TOP_SITE) {- await fetch(TRACKER_SJS + "?init=" + trackersAll.length, {+ // In order to apply the correct cookieBehavior, we need to first open a new+ // window to setup cookies. So, the new window will use the correct+ // cookieBehavior. Otherwise, it will use the default cookieBehavior.+ let setup_win = window.open();+ await setup_win.fetch(TRACKER_SJS + "?init=" + trackersAll.length, { credentials: "include", });+ setup_win.close(); return new Promise(resolve => { let win;
Let me analyze the code diff for security fixes: Vulnerability Existed: yes Cross-Site Request Forgery (CSRF) / Same-Origin Policy Bypass [toolkit/components/url-classifier/tests/mochitest/test_classify_by_default.html] [Lines 48-56] [Old Code] async function setupAndRun(hasCookie, topLevelSite = TEST_TOP_SITE) { await fetch(TRACKER_SJS + "?init=" + trackersAll.length, { credentials: "include", }); [Fixed Code] async function setupAndRun(hasCookie, topLevelSite = TEST_TOP_SITE) { let setup_win = window.open(); await setup_win.fetch(TRACKER_SJS + "?init=" + trackersAll.length, { credentials: "include", }); setup_win.close(); The fix addresses a potential security issue where cookies could be included in cross-origin requests without proper isolation. The new code creates a separate window context for the fetch operation, ensuring proper cookie behavior isolation. This prevents potential CSRF attacks or same-origin policy bypasses that could occur when making credentialed requests directly from the main window context.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.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-rectangles-to-the-canvas/2d.strokeRect.shadow.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);@@ -26,7 +26,7 @@ ctx.strokeStyle = '#f00'; ctx.lineWidth = 50; ctx.strokeRect(0, -75, 100, 50);-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); t.done(); });
Based on the provided diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely variable renaming (from `offscreenCanvas` to `canvas`) and don't involve any security-related modifications. Here's the analysis following your requested format: Vulnerability Existed: no No security vulnerability found [File] [Lines 13-14, 26] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); The changes are purely cosmetic/refactoring in nature, improving code consistency by using a shorter variable name (`canvas` instead of `offscreenCanvas`). No security implications are present 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-values/calc-positive-fraction-001.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-values/calc-positive-fraction-001.html@@ -7,7 +7,6 @@ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <link rel="help" href="https://www.w3.org/TR/css-values-4/#combine-integers"> <link rel="match" href="../reference/ref-filled-green-100px-square.xht">- <meta name="flags" content=""> <style> div
Based on the provided diff, I'll analyze it for security vulnerabilities: Vulnerability Existed: no [No specific vulnerability] [testing/web-platform/tests/css/css-values/calc-positive-fraction-001.html] [Lines 7] [Old Code] <meta name="flags" content=""> [Fixed Code] [Removed line] Additional Details: 1. This appears to be a simple test file modification where an empty meta tag was removed. 2. The change doesn't relate to any security vulnerability - it's just removing an unused tag. 3. No actual code functionality was changed, only test file metadata. 4. The modification doesn't affect any security-sensitive operations or introduce/remove any security controls. There are no security vulnerabilities addressed in this diff. The change is purely cosmetic/cleanup related to test file structure.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.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 = '#08f'; ctx.fillRect(0, 0, 100, 50);
Analyzing the provided code diff: 1. Vulnerability Existed: no No specific vulnerability [File] [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: - This appears to be a simple variable renaming change from 'offscreenCanvas' to 'canvas' - No security-related changes or vulnerability fixes are evident in this diff - The change seems to be for code consistency or readability rather than security - No known vulnerability patterns (e.g., XSS, injection, memory issues) are affected by 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/third_party/dav1d/src/tables.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/dav1d/src/tables.h@@ -110,7 +110,7 @@ extern const uint16_t dav1d_sgr_params[16][2]; extern const uint8_t dav1d_sgr_x_by_x[256];-extern const int8_t dav1d_mc_subpel_filters[5+ARCH_X86_64][15][8];+extern const int8_t dav1d_mc_subpel_filters[6][15][8]; extern const int8_t dav1d_mc_warp_filter[193][8]; extern const int8_t dav1d_resize_filter[64][8];
Here's the analysis of the provided code diff: Vulnerability Existed: not sure [Potential Array Bounds Overflow] [third_party/dav1d/src/tables.h] [Lines 110] [Old Code] `extern const int8_t dav1d_mc_subpel_filters[5+ARCH_X86_64][15][8];` [Fixed Code] `extern const int8_t dav1d_mc_subpel_filters[6][15][8];` Additional Details: 1. The change modifies an array declaration from a dynamic size (5+ARCH_X86_64) to a fixed size (6) 2. This could potentially fix an array bounds issue if ARCH_X86_64 was causing the array to be smaller than expected 3. Without more context about how this array is used, we can't be certain if this was actually causing a security vulnerability 4. The change suggests there might have been a risk of buffer overflow if the array was accessed beyond its bounds
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.