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/streams/ReadableStreamController.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/streams/ReadableStreamController.h@@ -39,6 +39,9 @@ virtual void PullSteps(JSContext* aCx, ReadRequest* aReadRequest, ErrorResult& aRv) = 0;+ // No JS implementable UnderlyingSource callback exists for this.+ virtual void ReleaseSteps() = 0;+ protected: nsCOMPtr<nsIGlobalObject> mGlobal; virtual ~ReadableStreamController() = default;
Here's the analysis of the provided code diff: Vulnerability Existed: not sure [Potential Resource Leak] [dom/streams/ReadableStreamController.h] [Lines 39-42] [Old Code] virtual void PullSteps(JSContext* aCx, ReadRequest* aReadRequest, ErrorResult& aRv) = 0; [Fixed Code] virtual void PullSteps(JSContext* aCx, ReadRequest* aReadRequest, ErrorResult& aRv) = 0; // No JS implementable UnderlyingSource callback exists for this. virtual void ReleaseSteps() = 0; Additional Details: The diff shows the addition of a pure virtual `ReleaseSteps()` method with a comment indicating it's for cleanup purposes. While this could potentially address a resource leak vulnerability (since it provides a way to release resources), we can't be certain without seeing the implementation details and the actual bug being fixed. The comment suggests this is related to UnderlyingSource cleanup, but we'd need more context to confirm if this was fixing an actual vulnerability or just improving the API design.
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/taskcluster/scripts/misc/build-cctools-port.sh+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/taskcluster/scripts/misc/build-cctools-port.sh@@ -87,8 +87,6 @@ make -j `nproc --all` install INSTALLPREFIX=$CROSSTOOLS_BUILD_DIR LDFLAGS="-Wl,-Bstatic -lcrypto -Wl,-Bdynamic -ldl -pthread" strip $CROSSTOOLS_BUILD_DIR/bin/*-# cctools-port doesn't include dsymutil but clang will need to find it.-cp $CLANG_DIR/bin/dsymutil $CROSSTOOLS_BUILD_DIR/bin/x86_64-apple-darwin-dsymutil # various build scripts based on cmake want to find `lipo` without a prefix cp $CROSSTOOLS_BUILD_DIR/bin/x86_64-apple-darwin-lipo $CROSSTOOLS_BUILD_DIR/bin/lipo
Let me analyze the code diff for potential security vulnerabilities. Vulnerability Existed: not sure Potential Binary Hijacking [File] taskcluster/scripts/misc/build-cctools-port.sh [Lines 87-89] [Old Code] # cctools-port doesn't include dsymutil but clang will need to find it. cp $CLANG_DIR/bin/dsymutil $CROSSTOOLS_BUILD_DIR/bin/x86_64-apple-darwin-dsymutil [Fixed Code] (removed these lines) Additional Details: The diff shows removal of copying dsymutil binary from CLANG_DIR to CROSSTOOLS_BUILD_DIR. While not clearly a security vulnerability, this change could potentially prevent: 1. Binary hijacking if CLANG_DIR was untrusted 2. Accidental execution of wrong binary if paths were misconfigured 3. Potential issues if the copied binary became out of sync with the system However, without more context about the build environment and security requirements, I can't definitively classify this as a security fix. The change appears to be more about build system cleanup than direct security hardening. No other obvious vulnerabilities were identified in this small 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-rectangles-to-the-canvas/2d.clearRect.zero.html+++ /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.clearRect.zero.html@@ -17,15 +17,15 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50); ctx.clearRect(0, 0, 100, 0); ctx.clearRect(0, 0, 0, 50); ctx.clearRect(0, 0, 0, 0);-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); t.done(); });
Based on the provided diff, I'll analyze it for potential security vulnerabilities: 1. Vulnerability Existed: no No specific vulnerability found [File] [Lines 17-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 appear to be purely variable renaming (from `offscreenCanvas` to `canvas`) with no security implications. The functionality remains exactly the same, just with a different variable name. There are no security vulnerabilities being fixed 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/streams/writable-streams/bad-strategies.any.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/streams/writable-streams/bad-strategies.any.js@@ -1,4 +1,4 @@-// META: global=window,worker,jsshell+// META: global=window,worker 'use strict'; const error1 = new Error('a unique string');
Analysis: 1. Vulnerability Existed: not sure [Potential Shell Environment Exposure] [testing/web-platform/tests/streams/writable-streams/bad-strategies.any.js] [Lines 1] [Old Code] `// META: global=window,worker,jsshell` [Fixed Code] `// META: global=window,worker` Additional Details: - The removal of 'jsshell' from the global environments suggests a potential security consideration, though it's unclear if this was directly fixing a vulnerability or just a test environment change. - 'jsshell' might expose test cases to shell environments, which could be a security concern if not properly isolated. - Without more context, this could be either a security hardening measure or just a test scope reduction. Note: No other vulnerabilities were identified in the provided diff. The change appears to be limited to the test environment configuration.
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-hsla-5.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.worker.js@@ -13,14 +13,14 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillStyle = 'hsl(120deg, 100.0%, 50.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(); });
Here is the analysis of the provided code diff: 1. Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.worker.js [Lines] 13-14, 20 [Old Code] ```javascript 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] ```javascript 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"); ``` Additional Details: The changes appear to be a simple variable renaming from `offscreenCanvas` to `canvas`. There is no indication of a security vulnerability being fixed here. This seems to be a code style or consistency improvement rather than a security patch. The diff does not show any clear security vulnerabilities being addressed. The changes are purely variable naming adjustments with no functional impact on 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/testing/web-platform/tests/css/css-values/angle-units-005.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-values/angle-units-005.html@@ -10,7 +10,6 @@ <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> <meta content="This test checks that 'turn' angle unit is case-insensitive." name="assert">- <meta name="flags" content=""> <style> div
Based on the provided code diff, I'll analyze it for potential security vulnerabilities. Vulnerability Existed: no No security vulnerability found [File] [Lines 10] [Old Code] <meta name="flags" content=""> [Fixed Code] (line removed) Additional Details: 1. The change simply removes a meta tag with an empty "flags" attribute. This appears to be a test configuration change rather than a security fix. 2. There's no indication of any security-related vulnerability being addressed (no XSS, injection, or other common web vulnerabilities). 3. The modification is in a test file (angle-units-005.html) which tests CSS angle unit case sensitivity, not production code. The change seems to be a minor cleanup of test metadata rather than addressing any security concern. No known vulnerability patterns match 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/python/mozbuild/mozpack/test/test_packager_l10n.py+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/python/mozbuild/mozpack/test/test_packager_l10n.py@@ -19,7 +19,6 @@ ManifestContent, ) from mozpack.copier import FileRegistry-from mozpack.packager.formats import FlatFormatter class TestL10NRepack(unittest.TestCase):@@ -63,6 +62,10 @@ "app/chrome/bar/search/foo.xml": foo, "app/chrome/bar/search/bar.xml": bar, "app/chrome/bar/search/lst.txt": lst,+ "META-INF/foo": foo, # Stripped.+ "inner/META-INF/foo": foo, # Not stripped.+ "app/META-INF/foo": foo, # Stripped.+ "app/inner/META-INF/foo": foo, # Not stripped. } ) app_finder.jarlogs = {}@@ -103,7 +106,7 @@ ) l10n_finder.base = "l10n" copier = FileRegistry()- formatter = FlatFormatter(copier)+ formatter = l10n.FlatFormatter(copier) l10n._repack( app_finder,@@ -143,6 +146,8 @@ "app/chrome/bar-l10n/search/foo.xml": foo_l10n, "app/chrome/bar-l10n/search/qux.xml": qux_l10n, "app/chrome/bar-l10n/search/lst.txt": lst_l10n,+ "inner/META-INF/foo": foo,+ "app/inner/META-INF/foo": foo, } self.assertEqual(
Analyzing the provided code diff, here are the security-related findings: 1. Vulnerability Existed: not sure [Potential META-INF File Handling Issue] [python/mozbuild/mozpack/test/test_packager_l10n.py] [Lines 63-66, 146] [Old Code] ```python # No explicit META-INF file handling ``` [Fixed Code] ```python "META-INF/foo": foo, # Stripped. "inner/META-INF/foo": foo, # Not stripped. "app/META-INF/foo": foo, # Stripped. "app/inner/META-INF/foo": foo, # Not stripped. # ... later in the file ... "inner/META-INF/foo": foo, "app/inner/META-INF/foo": foo, ``` Additional Details: The changes show explicit handling of META-INF files, which could indicate a security fix for potential JAR/package manipulation vulnerabilities, though this is just test code. 2. Vulnerability Existed: not sure [Formatter Change] [python/mozbuild/mozpack/test/test_packager_l10n.py] [Lines 106] [Old Code] ```python formatter = FlatFormatter(copier) ``` [Fixed Code] ```python formatter = l10n.FlatFormatter(copier) ``` Additional Details: The change in formatter implementation could potentially relate to security hardening, though without more context it's unclear if this addresses a specific vulnerability. Note: Since this is test code, it's difficult to determine if these changes represent actual security fixes or just test case updates. The META-INF changes could be related to preventing potential package manipulation attacks, but this is speculative based on the test 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/rust/ash/src/extensions/khr/acceleration_structure.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/ash/src/extensions/khr/acceleration_structure.rs@@ -8,18 +8,16 @@ #[derive(Clone)] pub struct AccelerationStructure { handle: vk::Device,- acceleration_structure_fn: vk::KhrAccelerationStructureFn,+ fp: vk::KhrAccelerationStructureFn, } impl AccelerationStructure { pub fn new(instance: &Instance, device: &Device) -> Self {- let acceleration_structure_fn = vk::KhrAccelerationStructureFn::load(|name| unsafe {- mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr()))+ let handle = device.handle();+ let fp = vk::KhrAccelerationStructureFn::load(|name| unsafe {+ mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) });- Self {- handle: device.handle(),- acceleration_structure_fn,- }+ Self { handle, fp } } pub unsafe fn get_properties(@@ -41,7 +39,7 @@ allocation_callbacks: Option<&vk::AllocationCallbacks>, ) -> VkResult<vk::AccelerationStructureKHR> { let mut accel_struct = mem::zeroed();- self.acceleration_structure_fn+ self.fp .create_acceleration_structure_khr( self.handle, create_info,@@ -57,12 +55,11 @@ accel_struct: vk::AccelerationStructureKHR, allocation_callbacks: Option<&vk::AllocationCallbacks>, ) {- self.acceleration_structure_fn- .destroy_acceleration_structure_khr(- self.handle,- accel_struct,- allocation_callbacks.as_raw_ptr(),- );+ self.fp.destroy_acceleration_structure_khr(+ self.handle,+ accel_struct,+ allocation_callbacks.as_raw_ptr(),+ ); } #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBuildAccelerationStructuresKHR.html>"]@@ -83,13 +80,12 @@ }) .collect::<Vec<_>>();- self.acceleration_structure_fn- .cmd_build_acceleration_structures_khr(- command_buffer,- infos.len() as _,- infos.as_ptr(),- build_range_infos.as_ptr(),- );+ self.fp.cmd_build_acceleration_structures_khr(+ command_buffer,+ infos.len() as _,+ infos.as_ptr(),+ build_range_infos.as_ptr(),+ ); } #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBuildAccelerationStructuresIndirectKHR.html>"]@@ -114,15 +110,14 @@ }) .collect::<Vec<_>>();- self.acceleration_structure_fn- .cmd_build_acceleration_structures_indirect_khr(- command_buffer,- infos.len() as _,- infos.as_ptr(),- indirect_device_addresses.as_ptr(),- indirect_strides.as_ptr(),- max_primitive_counts.as_ptr(),- );+ self.fp.cmd_build_acceleration_structures_indirect_khr(+ command_buffer,+ infos.len() as _,+ infos.as_ptr(),+ indirect_device_addresses.as_ptr(),+ indirect_strides.as_ptr(),+ max_primitive_counts.as_ptr(),+ ); } #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkBuildAccelerationStructuresKHR.html>"]@@ -143,7 +138,7 @@ }) .collect::<Vec<_>>();- self.acceleration_structure_fn+ self.fp .build_acceleration_structures_khr( self.handle, deferred_operation,@@ -151,7 +146,7 @@ infos.as_ptr(), build_range_infos.as_ptr(), )- .into()+ .result() } #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCopyAccelerationStructureKHR.html>"]@@ -160,9 +155,9 @@ deferred_operation: vk::DeferredOperationKHR, info: &vk::CopyAccelerationStructureInfoKHR, ) -> VkResult<()> {- self.acceleration_structure_fn+ self.fp .copy_acceleration_structure_khr(self.handle, deferred_operation, info as *const _)- .into()+ .result() } #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCopyAccelerationStructureToMemoryKHR.html>"]@@ -171,13 +166,13 @@ deferred_operation: vk::DeferredOperationKHR, info: &vk::CopyAccelerationStructureToMemoryInfoKHR, ) -> VkResult<()> {- self.acceleration_structure_fn+ self.fp .copy_acceleration_structure_to_memory_khr( self.handle, deferred_operation, info as *const _, )- .into()+ .result() } #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCopyMemoryToAccelerationStructureKHR.html>"]@@ -186,13 +181,13 @@ deferred_operation: vk::DeferredOperationKHR, info: &vk::CopyMemoryToAccelerationStructureInfoKHR, ) -> VkResult<()> {- self.acceleration_structure_fn+ self.fp .copy_memory_to_acceleration_structure_khr( self.handle, deferred_operation, info as *const _, )- .into()+ .result() } #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkWriteAccelerationStructuresPropertiesKHR.html>"]@@ -203,7 +198,7 @@ data: &mut [u8], stride: usize, ) -> VkResult<()> {- self.acceleration_structure_fn+ self.fp .write_acceleration_structures_properties_khr( self.handle, acceleration_structures.len() as _,@@ -213,7 +208,7 @@ data.as_mut_ptr() as *mut std::ffi::c_void, stride, )- .into()+ .result() } #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdCopyAccelerationStructureKHR.html>"]@@ -222,7 +217,7 @@ command_buffer: vk::CommandBuffer, info: &vk::CopyAccelerationStructureInfoKHR, ) {- self.acceleration_structure_fn+ self.fp .cmd_copy_acceleration_structure_khr(command_buffer, info); }@@ -232,7 +227,7 @@ command_buffer: vk::CommandBuffer, info: &vk::CopyAccelerationStructureToMemoryInfoKHR, ) {- self.acceleration_structure_fn+ self.fp .cmd_copy_acceleration_structure_to_memory_khr(command_buffer, info as *const _); }@@ -242,7 +237,7 @@ command_buffer: vk::CommandBuffer, info: &vk::CopyMemoryToAccelerationStructureInfoKHR, ) {- self.acceleration_structure_fn+ self.fp .cmd_copy_memory_to_acceleration_structure_khr(command_buffer, info as *const _); }@@ -251,7 +246,7 @@ &self, info: &vk::AccelerationStructureDeviceAddressInfoKHR, ) -> vk::DeviceAddress {- self.acceleration_structure_fn+ self.fp .get_acceleration_structure_device_address_khr(self.handle, info as *const _) }@@ -264,15 +259,14 @@ query_pool: vk::QueryPool, first_query: u32, ) {- self.acceleration_structure_fn- .cmd_write_acceleration_structures_properties_khr(- command_buffer,- structures.len() as _,- structures.as_ptr(),- query_type,- query_pool,- first_query,- );+ self.fp.cmd_write_acceleration_structures_properties_khr(+ command_buffer,+ structures.len() as _,+ structures.as_ptr(),+ query_type,+ query_pool,+ first_query,+ ); } #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetDeviceAccelerationStructureCompatibilityKHR.html>"]@@ -282,12 +276,11 @@ ) -> vk::AccelerationStructureCompatibilityKHR { let mut compatibility = vk::AccelerationStructureCompatibilityKHR::default();- self.acceleration_structure_fn- .get_device_acceleration_structure_compatibility_khr(- self.handle,- version,- &mut compatibility as *mut _,- );+ self.fp.get_device_acceleration_structure_compatibility_khr(+ self.handle,+ version,+ &mut compatibility as *mut _,+ ); compatibility }@@ -303,14 +296,13 @@ let mut size_info = vk::AccelerationStructureBuildSizesInfoKHR::default();- self.acceleration_structure_fn- .get_acceleration_structure_build_sizes_khr(- self.handle,- build_type,- build_info as *const _,- max_primitive_counts.as_ptr(),- &mut size_info as *mut _,- );+ self.fp.get_acceleration_structure_build_sizes_khr(+ self.handle,+ build_type,+ build_info as *const _,+ max_primitive_counts.as_ptr(),+ &mut size_info as *mut _,+ ); size_info }@@ -320,7 +312,7 @@ } pub fn fp(&self) -> &vk::KhrAccelerationStructureFn {- &self.acceleration_structure_fn+ &self.fp } pub fn device(&self) -> vk::Device {
After analyzing the provided code diff, I don't find any clear security vulnerabilities being fixed. The changes appear to be primarily code style improvements and variable renaming. Here's the analysis: Vulnerability Existed: no No security vulnerability found [third_party/rust/ash/src/extensions/khr/acceleration_structure.rs] [8-16] [Old Code] handle: vk::Device, acceleration_structure_fn: vk::KhrAccelerationStructureFn, ... let acceleration_structure_fn = vk::KhrAccelerationStructureFn::load(|name| unsafe { mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) }); [Fixed Code] handle: vk::Device, fp: vk::KhrAccelerationStructureFn, ... let handle = device.handle(); let fp = vk::KhrAccelerationStructureFn::load(|name| unsafe { mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) }); The main changes are: 1. Renaming `acceleration_structure_fn` to `fp` (likely for brevity) 2. Storing device handle before loading functions 3. Minor formatting changes in function calls These changes don't appear to address any security vulnerabilities but rather improve code organization and readability. The unsafe blocks remain unchanged in their core functionality.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/browsers/browsing-the-web/back-forward-cache/resources/helper.sub.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/browsers/browsing-the-web/back-forward-cache/resources/helper.sub.js@@ -67,7 +67,8 @@ // Run a test that navigates A->B->A: // 1. Page A is opened by `params.openFunc(url)`.-// 2. `params.funcBeforeNavigation` is executed on page A.+// 2. `params.funcBeforeNavigation(params.argsBeforeNavigation)` is executed+// on page A. // 3. The window is navigated to page B on `params.targetOrigin`. // 4. The window is back navigated to page A (expecting BFCached). //@@ -104,7 +105,7 @@ runBfcacheTest(params, description); }-async function navigateAndThenBack(pageA, pageB, urlB) {+async function navigateAndThenBack(pageA, pageB, urlB, funcBeforeBackNavigation) { await pageA.execute_script( (url) => { prepareNavigation(() => {@@ -115,6 +116,9 @@ ); await pageB.execute_script(waitForPageShow);+ if (funcBeforeBackNavigation) {+ await pageB.execute_script(funcBeforeBackNavigation);+ } await pageB.execute_script( () => { prepareNavigation(() => { history.back(); });@@ -129,7 +133,9 @@ openFunc: url => window.open(url, '_blank', 'noopener'), scripts: [], funcBeforeNavigation: () => {},+ argsBeforeNavigation: [], targetOrigin: originCrossSite,+ funcBeforeBackNavigation: () => {}, shouldBeCached: true, funcAfterAssertion: () => {}, }@@ -156,8 +162,10 @@ }, [src]); }- await pageA.execute_script(params.funcBeforeNavigation);- await navigateAndThenBack(pageA, pageB, urlB);+ await pageA.execute_script(params.funcBeforeNavigation,+ params.argsBeforeNavigation);+ await navigateAndThenBack(pageA, pageB, urlB,+ params.funcBeforeBackNavigation); if (params.shouldBeCached) { await assert_bfcached(pageA);@@ -166,7 +174,7 @@ } if (params.funcAfterAssertion) {- await params.funcAfterAssertion(pageA, pageB);+ await params.funcAfterAssertion(pageA, pageB, t); } }, description); }
I'll analyze the code diff and provide the security assessment following the specified format. 1. Vulnerability Existed: not sure [Potential Cross-Site Scripting (XSS) via Script Execution] [File: testing/web-platform/tests/html/browsers/browsing-the-web/back-forward-cache/resources/helper.sub.js] [Lines: 116, 162] [Old Code] No explicit handling of script execution parameters [Fixed Code] Added parameter passing for funcBeforeNavigation and funcBeforeBackNavigation 2. Vulnerability Existed: not sure [Potential Argument Injection] [File: testing/web-platform/tests/html/browsers/browsing-the-web/back-forward-cache/resources/helper.sub.js] [Lines: 162] [Old Code] await pageA.execute_script(params.funcBeforeNavigation); [Fixed Code] await pageA.execute_script(params.funcBeforeNavigation, params.argsBeforeNavigation); 3. Vulnerability Existed: not sure [Potential Information Leakage] [File: testing/web-platform/tests/html/browsers/browsing-the-web/back-forward-cache/resources/helper.sub.js] [Lines: 174] [Old Code] await params.funcAfterAssertion(pageA, pageB); [Fixed Code] await params.funcAfterAssertion(pageA, pageB, t); The changes appear to be more about improving test functionality and parameter handling rather than fixing specific security vulnerabilities. The modifications allow for more flexible test scenarios by: 1. Adding parameter passing to script execution functions 2. Adding a new hook (funcBeforeBackNavigation) for test customization 3. Passing additional context (t) to assertion functions While these changes could potentially affect security by providing more controlled execution contexts, there's no clear evidence they were made to address specific vulnerabilities. The changes seem focused on test flexibility rather than security fixes.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoMediaDrmBridgeV21.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/media/GeckoMediaDrmBridgeV21.java@@ -15,6 +15,7 @@ import android.os.Handler; import android.os.HandlerThread; import android.util.Log;+import androidx.annotation.RequiresApi; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader;@@ -31,6 +32,7 @@ import org.mozilla.gecko.util.ProxySelector; @TargetApi(Build.VERSION_CODES.LOLLIPOP)+@RequiresApi(Build.VERSION_CODES.LOLLIPOP) public class GeckoMediaDrmBridgeV21 implements GeckoMediaDrm { protected final String LOGTAG; private static final String INVALID_SESSION_ID = "Invalid";
Analyzing the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential API Level Enforcement Issue] [mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoMediaDrmBridgeV21.java] [Lines: 15,31] [Old Code] ```java @TargetApi(Build.VERSION_CODES.LOLLIPOP) public class GeckoMediaDrmBridgeV21 implements GeckoMediaDrm { ``` [Fixed Code] ```java @TargetApi(Build.VERSION_CODES.LOLLIPOP) @RequiresApi(Build.VERSION_CODES.LOLLIPOP) public class GeckoMediaDrmBridgeV21 implements GeckoMediaDrm { ``` Additional Details: The diff adds @RequiresApi annotation alongside @TargetApi. While this isn't a direct security vulnerability fix, it could potentially prevent runtime crashes on unsupported API levels, which might have security implications if the class was being incorrectly instantiated on lower API levels. The exact security impact is unclear. Note: The diff shows only an annotation change without any functional code modifications, so no clear security vulnerabilities are being fixed. The change appears to be more about code correctness and potential runtime safety rather than addressing a specific known 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/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.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.put.created.worker.js@@ -13,8 +13,8 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); var imgdata = ctx.createImageData(100, 50); for (var i = 0; i < imgdata.data.length; i += 4) {@@ -26,7 +26,7 @@ ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50) ctx.putImageData(imgdata, 0, 0);-_assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); t.done(); });
Based on the provided diff, I'll analyze it for security vulnerabilities: 1. Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.worker.js [Lines] 13-26 [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'); 2. Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.worker.js [Lines] 26 [Old Code] _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); [Fixed Code] _assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); The changes appear to be purely variable renaming (from 'offscreenCanvas' to 'canvas') and don't indicate any security fixes. The functionality remains the same, just with different variable names. No security vulnerabilities were identified 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/compositing/2d.composite.transparent.xor.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.transparent.xor.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, 0, 0.5)';@@ -22,7 +22,7 @@ ctx.globalCompositeOperation = 'xor'; ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; ctx.fillRect(0, 0, 100, 50);-_assertPixelApprox(offscreenCanvas, 50,25, 0,64,191,128, "50,25", "0,64,191,128", 5);+_assertPixelApprox(canvas, 50,25, 0,64,191,128, "50,25", "0,64,191,128", 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 for better code clarity. Here's the analysis: 1. Vulnerability Existed: no Variable Renaming [testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.worker.js] [Lines 13-22] Old Code: ``` var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixelApprox(offscreenCanvas, 50,25, 0,64,191,128, "50,25", "0,64,191,128", 5); ``` Fixed Code: ``` var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixelApprox(canvas, 50,25, 0,64,191,128, "50,25", "0,64,191,128", 5); ``` The changes simply rename the variable `offscreenCanvas` to `canvas` throughout the file. There are no security implications to this change - it's purely a code style/readability improvement. No security vulnerabilities were identified 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/dom/serviceworkers/ServiceWorkerRegistrationInfo.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/serviceworkers/ServiceWorkerRegistrationInfo.h@@ -13,7 +13,6 @@ #include "mozilla/dom/ServiceWorkerInfo.h" #include "mozilla/dom/ServiceWorkerRegistrationBinding.h" #include "mozilla/dom/ServiceWorkerRegistrationDescriptor.h"-#include "nsContentUtils.h" #include "nsProxyRelease.h" #include "nsTObserverArray.h"@@ -39,7 +38,7 @@ }; nsTArray<UniquePtr<VersionEntry>> mVersionList;- const nsID mAgentClusterId = nsContentUtils::GenerateUUID();+ const nsID mAgentClusterId = nsID::GenerateUUID(); uint32_t mControlledClientsCounter; uint32_t mDelayMultiplier;
Here's the analysis of the provided code diff: 1. Vulnerability Existed: not sure [Potential UUID Generation Vulnerability] [dom/serviceworkers/ServiceWorkerRegistrationInfo.h] [Lines 39] [Old Code] const nsID mAgentClusterId = nsContentUtils::GenerateUUID(); [Fixed Code] const nsID mAgentClusterId = nsID::GenerateUUID(); Additional Details: - The change involves switching from nsContentUtils::GenerateUUID() to nsID::GenerateUUID() for generating UUIDs. - While this isn't a clear security vulnerability fix, it could be related to: 1) Using a more appropriate/secure UUID generation method 2) Removing a dependency on nsContentUtils which might have had security implications 3) Standardizing UUID generation across the codebase - Without more context about the implementations of both methods, it's hard to determine if this was a security fix or just a code cleanup. Note: The diff doesn't show any obvious security vulnerabilities being fixed, but the change in UUID generation method could potentially have security implications if the old method was found to be insecure.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-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.invalid.css-color-4-hsl-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 = '#0f0'; try { ctx.fillStyle = 'hsl(0 100% 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does ctx.fillRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); t.done(); });
Analyzing the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely cosmetic/refactoring (variable name change from `offscreenCanvas` to `canvas` and corresponding usage updates). Here's the analysis following your requested format: Vulnerability Existed: no [No security vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html] [Lines 17-25] [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 variable naming improvements with no security implications. The test logic and assertions remain the same.
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/serviceworkers/ServiceWorkerPrivate.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/serviceworkers/ServiceWorkerPrivate.cpp@@ -184,8 +184,12 @@ } nsresult Cancel() override {+ // We need to check first if cancel is permitted+ nsresult rv = WorkerRunnable::Cancel();+ NS_ENSURE_SUCCESS(rv, rv);+ ReportScriptEvaluationResult(false);- return WorkerRunnable::Cancel();+ return NS_OK; } private:@@ -297,11 +301,13 @@ return true; }- void ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) override {+ void ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue,+ ErrorResult& aRv) override { RemovePromise(Resolved); }- void RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) override {+ void RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue,+ ErrorResult& aRv) override { RemovePromise(Rejected); }@@ -602,10 +608,14 @@ } nsresult Cancel() override {+ // We need to check first if cancel is permitted+ nsresult rv = WorkerRunnable::Cancel();+ NS_ENSURE_SUCCESS(rv, rv);+ mCallback->SetResult(false); MOZ_ALWAYS_SUCCEEDS(mWorkerPrivate->DispatchToMainThread(mCallback));- return WorkerRunnable::Cancel();+ return NS_OK; } private:@@ -1344,11 +1354,14 @@ } nsresult Cancel() override {+ // We need to check first if cancel is permitted+ nsresult rv = WorkerRunnable::Cancel();+ NS_ENSURE_SUCCESS(rv, rv);+ nsCOMPtr<nsIRunnable> runnable = new ResumeRequest(mInterceptedChannel); if (NS_FAILED(mWorkerPrivate->DispatchToMainThread(runnable))) { NS_WARNING("Failed to resume channel on FetchEventRunnable::Cancel()!\n"); }- WorkerRunnable::Cancel(); return NS_OK; }
Here's the analysis of the provided code diff for security fixes: 1. Vulnerability Existed: yes Race Condition in Cancel Operations [dom/serviceworkers/ServiceWorkerPrivate.cpp] [Lines 184-189] [Old Code] ```cpp nsresult Cancel() override { ReportScriptEvaluationResult(false); return WorkerRunnable::Cancel(); } ``` [Fixed Code] ```cpp nsresult Cancel() override { // We need to check first if cancel is permitted nsresult rv = WorkerRunnable::Cancel(); NS_ENSURE_SUCCESS(rv, rv); ReportScriptEvaluationResult(false); return NS_OK; } ``` 2. Vulnerability Existed: yes Race Condition in Cancel Operations [dom/serviceworkers/ServiceWorkerPrivate.cpp] [Lines 602-610] [Old Code] ```cpp nsresult Cancel() override { mCallback->SetResult(false); MOZ_ALWAYS_SUCCEEDS(mWorkerPrivate->DispatchToMainThread(mCallback)); return WorkerRunnable::Cancel(); } ``` [Fixed Code] ```cpp nsresult Cancel() override { // We need to check first if cancel is permitted nsresult rv = WorkerRunnable::Cancel(); NS_ENSURE_SUCCESS(rv, rv); mCallback->SetResult(false); MOZ_ALWAYS_SUCCEEDS(mWorkerPrivate->DispatchToMainThread(mCallback)); return NS_OK; } ``` 3. Vulnerability Existed: yes Race Condition in Cancel Operations [dom/serviceworkers/ServiceWorkerPrivate.cpp] [Lines 1344-1354] [Old Code] ```cpp nsresult Cancel() override { nsCOMPtr<nsIRunnable> runnable = new ResumeRequest(mInterceptedChannel); if (NS_FAILED(mWorkerPrivate->DispatchToMainThread(runnable))) { NS_WARNING("Failed to resume channel on FetchEventRunnable::Cancel()!\n"); } WorkerRunnable::Cancel(); return NS_OK; } ``` [Fixed Code] ```cpp nsresult Cancel() override { // We need to check first if cancel is permitted nsresult rv = WorkerRunnable::Cancel(); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr<nsIRunnable> runnable = new ResumeRequest(mInterceptedChannel); if (NS_FAILED(mWorkerPrivate->DispatchToMainThread(runnable))) { NS_WARNING("Failed to resume channel on FetchEventRunnable::Cancel()!\n"); } return NS_OK; } ``` 4. Vulnerability Existed: not sure Potential Error Handling Issue [dom/serviceworkers/ServiceWorkerPrivate.cpp] [Lines 297-301] [Old Code] ```cpp void ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) override { RemovePromise(Resolved); } ``` [Fixed Code] ```cpp void ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue, ErrorResult& aRv) override { RemovePromise(Resolved); } ``` 5. Vulnerability Existed: not sure Potential Error Handling Issue [dom/serviceworkers/ServiceWorkerPrivate.cpp] [Lines 303-307] [Old Code] ```cpp void RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) override { RemovePromise(Rejected); } ``` [Fixed Code] ```cpp void RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue, ErrorResult& aRv) override { RemovePromise(Rejected); } ``` The main security fixes address race conditions in cancel operations by ensuring proper sequencing of cancellation checks before performing other operations. The changes to the callback functions might be related to better error handling, but it's not clear if they address specific 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/layout/xul/nsMenuBarFrame.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/layout/xul/nsMenuBarFrame.cpp@@ -190,8 +190,7 @@ // behavior on Windows - this item is on the menu bar, beep and deactivate // the menu bar if (mIsActive) {- nsCOMPtr<nsISound> soundInterface =- do_CreateInstance("@mozilla.org/sound;1");+ nsCOMPtr<nsISound> soundInterface = do_GetService("@mozilla.org/sound;1"); if (soundInterface) soundInterface->Beep(); }@@ -260,7 +259,9 @@ if (mNewMenu && weakMenuBar.IsAlive()) menubar->SetStayActive(false); }- if (mNewMenu) pm->ShowMenu(mNewMenu, mSelectFirstItem, false);+ if (mNewMenu) {+ pm->ShowMenu(mNewMenu, mSelectFirstItem);+ } return NS_OK; }
Here's the analysis of the provided code diff following the specified format: 1. First change analysis: Vulnerability Existed: not sure Potential Service Initialization Change [File] layout/xul/nsMenuBarFrame.cpp [Lines 190-191] [Old Code] nsCOMPtr<nsISound> soundInterface = do_CreateInstance("@mozilla.org/sound;1"); [Fixed Code] nsCOMPtr<nsISound> soundInterface = do_GetService("@mozilla.org/sound;1"); Note: This changes from creating a new instance to getting a service instance. While not clearly a security fix, it might relate to resource management or singleton pattern usage. 2. Second change analysis: Vulnerability Existed: not sure Parameter Removal in ShowMenu Call [File] layout/xul/nsMenuBarFrame.cpp [Lines 259-260] [Old Code] if (mNewMenu) pm->ShowMenu(mNewMenu, mSelectFirstItem, false); [Fixed Code] if (mNewMenu) { pm->ShowMenu(mNewMenu, mSelectFirstItem); } Note: The removal of the 'false' parameter might indicate a security-related parameter was removed, but without knowing the API contract, it's unclear if this was a security fix. The added braces improve code structure but don't appear security-related. No clear security vulnerabilities were identified in these changes, but there are modifications that might relate to security or robustness improvements. The exact security implications would require more context about the nsISound interface and ShowMenu API.
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/uriloader/exthandler/tests/mochitest/browser_download_open_with_internal_handler.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/uriloader/exthandler/tests/mochitest/browser_download_open_with_internal_handler.js@@ -121,6 +121,7 @@ registerRestoreHandler("application/pdf", "pdf"); registerRestoreHandler("binary/octet-stream", "pdf"); registerRestoreHandler("application/unknown", "pdf");+ registerRestoreHandler("image/webp", "webp"); }); /**@@ -572,18 +573,21 @@ */ add_task( async function test_internal_handler_hidden_with_viewable_internally_type() {+ await SpecialPowers.pushPrefEnv({+ set: [["image.webp.enabled", true]],+ }); Services.telemetry.clearEvents(); const mimeInfosToRestore = alwaysAskForHandlingTypes({- "text/xml": "xml", "binary/octet-stream": "xml",+ "image/webp": "webp", }); for (let [file, checkDefault] of [ // The default for binary/octet-stream is changed by the PDF tests above, // this may change given bug 1659008, so I'm just ignoring the default for now. ["file_xml_attachment_binary_octet_stream.xml", false],- ["file_xml_attachment_test.xml", true],+ ["file_green.webp", true], ]) { let dialogWindowPromise = BrowserTestUtils.domWindowOpenedAndLoaded(); let loadingTab = await BrowserTestUtils.openNewForegroundTab({@@ -608,13 +612,21 @@ checkTelemetry( "open " + file + " for viewable internal type", "ask",- file == "file_xml_attachment_test.xml" ? "other" : "octetstream",+ file.endsWith(".webp") ? "other" : "octetstream", "attachment" );- ok(!internalHandlerRadio.hidden, "The option should be visible for XML");+ let fileDesc = file.substring(file.lastIndexOf(".") + 1);++ ok(+ !internalHandlerRadio.hidden,+ `The option should be visible for ${fileDesc}`+ ); if (checkDefault) {- ok(internalHandlerRadio.selected, "The option should be selected");+ ok(+ internalHandlerRadio.selected,+ `The option should be selected for ${fileDesc}`+ ); } let dialog = doc.querySelector("#unknownContentType");
Analyzing the provided code diff, I don't see any clear security vulnerabilities being fixed. The changes appear to be primarily about adding support for WEBP image handling and adjusting test cases accordingly. However, I'll provide the analysis in the requested format: 1. Vulnerability Existed: no No security vulnerability found. The changes are functional/test updates: File: uriloader/exthandler/tests/mochitest/browser_download_open_with_internal_handler.js Lines: Various Old Code: XML-focused test cases Fixed Code: Added WEBP support and updated test cases 2. Vulnerability Existed: not sure Potential test coverage improvement: File: uriloader/exthandler/tests/mochitest/browser_download_open_with_internal_handler.js Lines: 121, 573-612 Old Code: Missing WEBP handler registration and tests Fixed Code: Added WEBP handler registration and test cases The changes appear to be: 1. Adding WEBP as a supported MIME type (line 121) 2. Updating tests to include WEBP files instead of XML files 3. Adding a preference setting for WEBP support 4. Improving test assertions with more descriptive messages These changes don't appear to address any specific security vulnerabilities but rather expand functionality and improve test coverage. The telemetry checks and handler visibility tests have been updated to accommodate the new file type.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/devtools/server/actors/resources/utils/parent-process-storage.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/server/actors/resources/utils/parent-process-storage.js@@ -7,6 +7,10 @@ const { storageTypePool } = require("devtools/server/actors/storage"); const EventEmitter = require("devtools/shared/event-emitter"); const Services = require("Services");+const {+ getAllBrowsingContextsForContext,+ isWindowGlobalPartOfContext,+} = require("devtools/server/actors/watcher/browsing-context-helpers.jsm"); // ms of delay to throttle updates const BATCH_DELAY = 200;@@ -201,23 +205,25 @@ * @param {Boolean} isBfCacheNavigation */ async _onNewWindowGlobal(windowGlobal, isBfCacheNavigation) {- // If the watcher is bound to one browser element (i.e. a tab), ignore- // windowGlobals related to other browser elements+ // Only process WindowGlobals which are related to the debugged scope. if (- this.watcherActor.sessionContext.type == "browser-element" &&- windowGlobal.browsingContext.browserId !=- this.watcherActor.sessionContext.browserId+ !isWindowGlobalPartOfContext(+ windowGlobal,+ this.watcherActor.sessionContext,+ { acceptNoWindowGlobal: true, acceptSameProcessIframes: true }+ ) ) { return; }- // ignore about:blank++ // Ignore about:blank if (windowGlobal.documentURI.displaySpec === "about:blank") { return; }+ // Only process top BrowsingContext (ignore same-process iframe ones) const isTopContext = windowGlobal.browsingContext.top == windowGlobal.browsingContext;- if (!isTopContext) { return; }@@ -228,7 +234,7 @@ // - target switching is enabled OR bfCacheInParent is enabled, and a bfcache navigation // is performed (See handling of "pageshow" event in DevToolsFrameChild) const isNewTargetBeingCreated =- this.watcherActor.isServerTargetSwitchingEnabled ||+ this.watcherActor.sessionContext.isServerTargetSwitchingEnabled || (isBfCacheNavigation && this.isBfcacheInParentEnabled); if (!isNewTargetBeingCreated) {@@ -287,7 +293,7 @@ // We only need to react to those events here if target switching is not enabled; when // it is enabled, ParentProcessStorage will spawn a whole new actor which will allow // the client to get the information it needs.- if (!this.watcherActor.isServerTargetSwitchingEnabled) {+ if (!this.watcherActor.sessionContext.isServerTargetSwitchingEnabled) { this._offPageShow = watcherActor.on( "bf-cache-navigation-pageshow", ({ windowGlobal }) => {@@ -335,14 +341,18 @@ } get windows() {- // NOTE: we are removing about:blank because we might get them for iframes- // whose src attribute has not been set yet.- return this.getAllBrowsingContexts()- .map(x => {- const uri = x.currentWindowGlobal.documentURI;- return { location: uri };+ return (+ getAllBrowsingContextsForContext(this.watcherActor.sessionContext, {+ acceptSameProcessIframes: true, })- .filter(x => x.location.displaySpec !== "about:blank");+ .map(x => {+ const uri = x.currentWindowGlobal.documentURI;+ return { location: uri };+ })+ // NOTE: we are removing about:blank because we might get them for iframes+ // whose src attribute has not been set yet.+ .filter(x => x.location.displaySpec !== "about:blank")+ ); } // NOTE: this uri argument is not a real window.Location, but the@@ -364,27 +374,11 @@ } }- getAllBrowsingContexts() {- if (this.watcherActor.sessionContext.type == "browser-element") {- const browsingContext = this.watcherActor.browserElement.browsingContext;- return browsingContext- .getAllBrowsingContextsInSubtree()- .filter(x => !!x.currentWindowGlobal);- } else if (this.watcherActor.sessionContext.type == "webextension") {- return [- BrowsingContext.get(- this.watcherActor.sessionContext.addonBrowsingContextID- ),- ];- }- throw new Error(- "Unsupported session context type=" +- this.watcherActor.sessionContext.type- );- }- getWindowFromHost(host) {- const hostBrowsingContext = this.getAllBrowsingContexts().find(x => {+ const hostBrowsingContext = getAllBrowsingContextsForContext(+ this.watcherActor.sessionContext,+ { acceptSameProcessIframes: true }+ ).find(x => { const hostName = this.getHostName(x.currentWindowGlobal.documentURI); return hostName === host; });@@ -410,31 +404,37 @@ * Event handler for any docshell update. This lets us figure out whenever * any new window is added, or an existing window is removed. */- async observe(subject, topic) {- // If the watcher is bound to one browser element (i.e. a tab), ignore- // updates related to other browser elements+ async observe(windowGlobal, topic) {+ // Only process WindowGlobals which are related to the debugged scope. if (- this.watcherActor.sessionContext.type == "browser-element" &&- subject.browsingContext.browserId !=- this.watcherActor.sessionContext.browserId+ !isWindowGlobalPartOfContext(+ windowGlobal,+ this.watcherActor.sessionContext,+ { acceptNoWindowGlobal: true, acceptSameProcessIframes: true }+ ) ) { return; }- // ignore about:blank- if (subject.documentURI.displaySpec === "about:blank") {++ // Ignore about:blank+ if (windowGlobal.documentURI.displaySpec === "about:blank") { return; } // Only notify about remote iframe windows when JSWindowActor based targets are enabled // We will create a new StorageActor for the top level tab documents when server side target // switching is enabled- const isTopContext = subject.browsingContext.top == subject.browsingContext;- if (isTopContext && this.watcherActor.isServerTargetSwitchingEnabled) {+ const isTopContext =+ windowGlobal.browsingContext.top == windowGlobal.browsingContext;+ if (+ isTopContext &&+ this.watcherActor.sessionContext.isServerTargetSwitchingEnabled+ ) { return; } // emit window-wready and window-destroyed events when needed- const windowMock = { location: subject.documentURI };+ const windowMock = { location: windowGlobal.documentURI }; if (topic === "window-global-created") { this.emit("window-ready", windowMock); } else if (topic === "window-global-destroyed") {
Let me analyze the code diff for security vulnerabilities: 1. Vulnerability Existed: not sure [Potential Cross-Origin Resource Sharing Issue] [devtools/server/actors/resources/utils/parent-process-storage.js] [Lines 201-210] [Old Code] if ( this.watcherActor.sessionContext.type == "browser-element" && windowGlobal.browsingContext.browserId != this.watcherActor.sessionContext.browserId ) { [Fixed Code] if ( !isWindowGlobalPartOfContext( windowGlobal, this.watcherActor.sessionContext, { acceptNoWindowGlobal: true, acceptSameProcessIframes: true } ) ) { Additional Details: The change replaces a simple browser ID check with a more comprehensive context validation, which might address potential cross-origin issues, but without more context it's unclear if this was fixing an actual vulnerability. 2. Vulnerability Existed: not sure [Potential Information Leak] [devtools/server/actors/resources/utils/parent-process-storage.js] [Lines 335-350] [Old Code] return this.getAllBrowsingContexts() .map(x => { const uri = x.currentWindowGlobal.documentURI; return { location: uri }; }) .filter(x => x.location.displaySpec !== "about:blank"); [Fixed Code] return ( getAllBrowsingContextsForContext(this.watcherActor.sessionContext, { acceptSameProcessIframes: true, }) .map(x => { const uri = x.currentWindowGlobal.documentURI; return { location: uri }; }) .filter(x => x.location.displaySpec !== "about:blank") ); Additional Details: The change replaces a custom context gathering method with a more standardized one that properly respects the session context, which might prevent information leakage between contexts. 3. Vulnerability Existed: not sure [Potential Privilege Escalation] [devtools/server/actors/resources/utils/parent-process-storage.js] [Lines 404-420] [Old Code] async observe(subject, topic) { if ( this.watcherActor.sessionContext.type == "browser-element" && subject.browsingContext.browserId != this.watcherActor.sessionContext.browserId ) { [Fixed Code] async observe(windowGlobal, topic) { if ( !isWindowGlobalPartOfContext( windowGlobal, this.watcherActor.sessionContext, { acceptNoWindowGlobal: true, acceptSameProcessIframes: true } ) ) { Additional Details: Similar to the first change, this replaces a simple ID check with a more comprehensive context validation in the observer method, which might prevent unauthorized access to window events. Note: While these changes appear to strengthen security by implementing more robust context checks, without additional context about the threat model and previous vulnerabilities, it's difficult to definitively identify specific vulnerabilities being fixed. The changes seem to focus on better isolation between browsing contexts and more precise window global validation.
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/js/xpconnect/src/XPCWrapper.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/js/xpconnect/src/XPCWrapper.cpp@@ -49,6 +49,10 @@ } if (!args[0].isObject()) {+ if (args.isConstructing()) {+ return ThrowException(NS_ERROR_XPC_BAD_CONVERT_JS, cx);+ }+ args.rval().set(args[0]); return true; }
Here's the analysis following your requested format: Vulnerability Existed: yes Type Confusion Vulnerability [js/xpconnect/src/XPCWrapper.cpp] [Lines 49-55] [Old Code] if (!args[0].isObject()) { args.rval().set(args[0]); return true; } [Fixed Code] if (!args[0].isObject()) { if (args.isConstructing()) { return ThrowException(NS_ERROR_XPC_BAD_CONVERT_JS, cx); } args.rval().set(args[0]); return true; } Additional Details: - The fix adds a check for construction context (args.isConstructing()) when the argument is not an object - Without this check, non-object arguments could potentially be used incorrectly during object construction, leading to type confusion - The error NS_ERROR_XPC_BAD_CONVERT_JS suggests this was related to improper type conversion during construction - This appears to be a hardening fix against potential type confusion attacks in XPConnect (Firefox's cross-domain communication system)
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/js/src/gc/Scheduling.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/js/src/gc/Scheduling.cpp@@ -78,7 +78,6 @@ // Limit various parameters to reasonable levels to catch errors. const double MaxHeapGrowthFactor = 100; const size_t MaxNurseryBytesParam = 128 * 1024 * 1024;- const size_t MaxHeapBytesParam = 0xffffffff; // ~4GB, must fit in 32bit word. switch (key) { case JSGC_MAX_BYTES:@@ -109,7 +108,7 @@ break; case JSGC_SMALL_HEAP_SIZE_MAX: { size_t newLimit;- if (!megabytesToBytes(value, &newLimit) || newLimit > MaxHeapBytesParam) {+ if (!megabytesToBytes(value, &newLimit)) { return false; } setSmallHeapSizeMaxBytes(newLimit);@@ -117,8 +116,7 @@ } case JSGC_LARGE_HEAP_SIZE_MIN: { size_t newLimit;- if (!megabytesToBytes(value, &newLimit) || newLimit == 0 ||- newLimit > MaxHeapBytesParam) {+ if (!megabytesToBytes(value, &newLimit) || newLimit == 0) { return false; } setLargeHeapSizeMinBytes(newLimit);@@ -150,8 +148,7 @@ } case JSGC_ALLOCATION_THRESHOLD: { size_t threshold;- if (!megabytesToBytes(value, &threshold) ||- threshold > MaxHeapBytesParam) {+ if (!megabytesToBytes(value, &threshold)) { return false; } gcZoneAllocThresholdBase_ = threshold;@@ -226,8 +223,7 @@ break; case JSGC_ZONE_ALLOC_DELAY_KB: { size_t delay;- if (!kilobytesToBytes(value, &delay) || delay == 0 ||- delay > MaxHeapBytesParam) {+ if (!kilobytesToBytes(value, &delay) || delay == 0) { return false; } zoneAllocDelayBytes_ = delay;@@ -235,8 +231,7 @@ } case JSGC_MALLOC_THRESHOLD_BASE: { size_t threshold;- if (!megabytesToBytes(value, &threshold) ||- threshold > MaxHeapBytesParam) {+ if (!megabytesToBytes(value, &threshold)) { return false; } mallocThresholdBase_ = threshold;@@ -244,8 +239,7 @@ } case JSGC_URGENT_THRESHOLD_MB: { size_t threshold;- if (!megabytesToBytes(value, &threshold) ||- threshold > MaxHeapBytesParam) {+ if (!megabytesToBytes(value, &threshold)) { return false; } urgentThresholdBytes_ = threshold;@@ -261,7 +255,10 @@ /* static */ bool GCSchedulingTunables::megabytesToBytes(uint32_t value, size_t* bytesOut) { MOZ_ASSERT(bytesOut);- CheckedInt<size_t> size = CheckedInt<size_t>(value) * 1024 * 1024;++ // Parameters which represent heap sizes in bytes are restricted to values+ // which can be represented on 32 bit platforms.+ CheckedInt<uint32_t> size = CheckedInt<uint32_t>(value) * 1024 * 1024; if (!size.isValid()) { return false; }
Here's the analysis of the provided code diff following the specified format: 1. Vulnerability Existed: yes Integer Overflow Vulnerability [js/src/gc/Scheduling.cpp] [Lines: 78, 109-110, 117-118, 150-151, 226-227, 235-236, 244-245, 261-265] [Old Code] const size_t MaxHeapBytesParam = 0xffffffff; // ~4GB, must fit in 32bit word. ... if (!megabytesToBytes(value, &newLimit) || newLimit > MaxHeapBytesParam) { ... CheckedInt<size_t> size = CheckedInt<size_t>(value) * 1024 * 1024; [Fixed Code] (removed MaxHeapBytesParam) ... if (!megabytesToBytes(value, &newLimit)) { ... CheckedInt<uint32_t> size = CheckedInt<uint32_t>(value) * 1024 * 1024; Additional Details: The changes indicate a fix for potential integer overflow vulnerabilities in heap size calculations. The key changes are: 1. Removal of the MaxHeapBytesParam constant which was previously used to cap values at 4GB 2. Removal of size checks against MaxHeapBytesParam in multiple locations 3. Change from CheckedInt<size_t> to CheckedInt<uint32_t> in the megabytesToBytes function to ensure values stay within 32-bit limits The vulnerability appears to be related to improper size checks that could potentially lead to integer overflows when dealing with heap size calculations. The fix ensures proper bounds checking by using uint32_t consistently and removing redundant checks. 2. Vulnerability Existed: not sure Potential Type Confusion Vulnerability [js/src/gc/Scheduling.cpp] [Lines: 261-265] [Old Code] CheckedInt<size_t> size = CheckedInt<size_t>(value) * 1024 * 1024; [Fixed Code] CheckedInt<uint32_t> size = CheckedInt<uint32_t>(value) * 1024 * 1024; Additional Details: The change from size_t to uint32_t might be addressing a potential type confusion issue where the size calculation could behave differently on different platforms (32-bit vs 64-bit). However, without more context about how these values are used elsewhere in the code, I can't be certain if this was actually a security vulnerability.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.