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/devtools/client/performance-new/@types/gecko.d.ts+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/client/performance-new/@types/gecko.d.ts@@ -73,7 +73,19 @@ interface ChromeWindow { gBrowser: Browser;- focus: () => void;+ focus(): void;+ openWebLinkIn(+ url: string,+ where: "current" | "tab" | "window",+ options: Partial<{+ // Not all possible options are present, please add more if/when needed.+ userContextId: number;+ forceNonPrivate: boolean;+ resolveOnContentBrowserCreated: (+ contentBrowser: ChromeBrowser+ ) => unknown;+ }>+ ): void; } interface ChromeBrowser {@@ -138,7 +150,6 @@ type Services = { prefs: nsIPrefBranch; profiler: {- CanProfile: () => boolean; StartProfiler: ( entryCount: number, interval: number,@@ -170,6 +181,7 @@ }; wm: { getMostRecentWindow: (name: string) => ChromeWindow;+ getMostRecentNonPBWindow: (name: string) => ChromeWindow; }; focus: { activeWindow: ChromeWindow;
Analyzing the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential TypeScript Interface Expansion] [devtools/client/performance-new/@types/gecko.d.ts] [Lines 73-86] [Old Code] interface ChromeWindow { gBrowser: Browser; focus: () => void; } [Fixed Code] interface ChromeWindow { gBrowser: Browser; focus(): void; openWebLinkIn( url: string, where: "current" | "tab" | "window", options: Partial<{ // Not all possible options are present, please add more if/when needed. userContextId: number; forceNonPrivate: boolean; resolveOnContentBrowserCreated: ( contentBrowser: ChromeBrowser ) => unknown; }> ): void; } 2. Vulnerability Existed: not sure [Potential Function Removal] [devtools/client/performance-new/@types/gecko.d.ts] [Lines 138-150] [Old Code] profiler: { CanProfile: () => boolean; StartProfiler: ( entryCount: number, interval: number, features: string[], filters: string[] ) => void; [Fixed Code] profiler: { StartProfiler: ( entryCount: number, interval: number, features: string[], filters: string[] ) => void; 3. Vulnerability Existed: not sure [Potential Window Management Enhancement] [devtools/client/performance-new/@types/gecko.d.ts] [Lines 170-172] [Old Code] wm: { getMostRecentWindow: (name: string) => ChromeWindow; [Fixed Code] wm: { getMostRecentWindow: (name: string) => ChromeWindow; getMostRecentNonPBWindow: (name: string) => ChromeWindow; Note: The changes appear to be TypeScript interface modifications rather than direct security fixes. The additions/removals could potentially affect security but there's no clear evidence of vulnerabilities being fixed in this diff. The changes seem more related to API expansion and refinement.
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/smallvec/src/lib.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/smallvec/src/lib.rs@@ -1651,6 +1651,9 @@ #[cfg(feature = "specialization")] mod specialization;+#[cfg(feature = "arbitrary")]+mod arbitrary;+ #[cfg(feature = "specialization")] impl<'a, A: Array> SpecFrom<A, &'a [A::Item]> for SmallVec<A> where
Based on the provided code diff, here's the analysis following the required format: Vulnerability Existed: no [No specific vulnerability] [third_party/rust/smallvec/src/lib.rs] [Lines 1651-1654] [Old Code] #[cfg(feature = "specialization")] mod specialization; [Fixed Code] #[cfg(feature = "specialization")] mod specialization; #[cfg(feature = "arbitrary")] mod arbitrary; Analysis: 1. The diff shows an addition of a new module `arbitrary` guarded by a feature flag, but no security-related changes. 2. There's no evidence of any vulnerability being fixed in this change. 3. The change appears to be purely additive functionality rather than a security fix. 4. No old code was removed or modified, only new code was added. This appears to be a routine feature addition rather than a security fix. No vulnerabilities are evident 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/html/canvas/offscreen/line-styles/2d.line.join.invalid.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.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.lineJoin = 'bevel' _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
Analysis of the provided code diff: 1. Vulnerability Existed: no No security vulnerability found [File] [Lines 17-18] Old Code: var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); Fixed Code: var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); Additional Details: - The change appears to be purely a variable name change from `offscreenCanvas` to `canvas` - No security implications are evident in this change - The modification doesn't affect any security-related functionality or introduce/remove any security checks - This seems 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/uriloader/exthandler/tests/mochitest/browser_launched_app_save_directory.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/uriloader/exthandler/tests/mochitest/browser_launched_app_save_directory.js@@ -13,7 +13,10 @@ add_task(async function setup() { await SpecialPowers.pushPrefEnv({- set: [["browser.download.improvements_to_download_panel", true]],+ set: [+ ["browser.download.improvements_to_download_panel", true],+ ["image.webp.enabled", true],+ ], }); const allowDirectoriesVal = DownloadIntegration.allowDirectories; DownloadIntegration.allowDirectories = true;@@ -35,7 +38,7 @@ let loadingTab = await BrowserTestUtils.openNewForegroundTab({ gBrowser,- opening: TEST_PATH + "file_image_svgxml.svg",+ opening: TEST_PATH + "file_green.webp", waitForLoad: false, waitForStateStop: true, });
Here's the analysis of the provided code diff: 1. Vulnerability Existed: not sure [Potential Content-Type Handling Issue] [uriloader/exthandler/tests/mochitest/browser_launched_app_save_directory.js] [Lines 35] [Old Code] `opening: TEST_PATH + "file_image_svgxml.svg"` [Fixed Code] `opening: TEST_PATH + "file_green.webp"` Additional Details: The file type being tested changed from SVG to WebP. While this might indicate a fix for SVG-related vulnerabilities, there's no direct evidence of a security vulnerability being fixed here. The change could be related to test coverage improvements or other non-security reasons. 2. Vulnerability Existed: not sure [Potential WebP Feature Control] [uriloader/exthandler/tests/mochitest/browser_launched_app_save_directory.js] [Lines 13] [Old Code] `set: [["browser.download.improvements_to_download_panel", true]]` [Fixed Code] `set: [ ["browser.download.improvements_to_download_panel", true], ["image.webp.enabled", true], ]` Additional Details: The addition of WebP image format support might be related to security, but without more context, it's unclear if this was fixing a vulnerability or simply adding feature support. WebP has had vulnerabilities in the past, but this change appears to be enabling rather than fixing it. Note: While there are changes in the test file, they appear to be test configuration updates rather than direct security fixes. The changes could be related to underlying security improvements in the browser's handling of different file types, but the diff alone doesn't provide enough evidence to confirm specific vulnerabilities.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.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'); var promise = new Promise(function(resolve, reject) { var xhr = new XMLHttpRequest();
Based on the provided diff, I'll analyze it for potential security vulnerabilities: 1. Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.html [Lines] 17-18 Old Code: var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); Fixed Code: var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); Additional Details: - The change appears to be a simple variable renaming from 'offscreenCanvas' to 'canvas' - No security-related changes are evident in this diff - The modification doesn't affect any security-sensitive operations or introduce/remove any security controls - The rest of the code (including the XMLHttpRequest usage) remains unchanged This 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/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.worker.js@@ -13,8 +13,8 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50);@@ -26,7 +26,7 @@ ctx.moveTo(50, 25); ctx.lineTo(50, 25); ctx.stroke();-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); t.done(); });
Based on the provided diff, I don't see any security vulnerabilities being fixed. This appears to be a simple variable renaming change for better code clarity/consistency. Here's the analysis following your format: Vulnerability Existed: no [Code Improvement] [testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.worker.js] [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 simply rename the variable `offscreenCanvas` to `canvas` throughout the file, which doesn't appear to address any security issues but rather improves code consistency. No vulnerability names apply 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/rust_decimal/VERSION.md+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/rust_decimal/VERSION.md@@ -1,4 +1,34 @@ # Version History++## 1.20.0++* Additional fuzz testing for deserialize ([#452](https://github.com/paupino/rust-decimal/pull/452))+* Documentation fix for rounding strategy ([#458](https://github.com/paupino/rust-decimal/pull/458))+* `from_str` is now over 4x faster, utilizing const generics and TCO ([#456](https://github.com/paupino/rust-decimal/pull/456))+* Fixed `from_str` issue with rounding issues when too many digits in source string. ([#453](https://github.com/paupino/rust-decimal/issues/453))+* New `serde-with` functionality for greater configurability when using `serde` ([#459](https://github.com/paupino/rust-decimal/pull/459))+* Various maintenance tasks ([#460](https://github.com/paupino/rust-decimal/pull/460))++This is truly a collaborative release and has some significant contributions from the community. A huge thank+you to everyone involved:++* [@chris-cantor](https://github.com/chris-cantor)+* [@TradingTomatillo](https://github.com/TradingTomatillo)+* [@c410-f3r](https://github.com/c410-f3r)+* [@ShigotoMitame](https://github.com/ShigotoMitame)+* [@luke-brown](https://github.com/luke-brown)++## 1.19.0++This is a minor dot release and contains library updates ([#334](https://github.com/paupino/rust-decimal/pull/334)) and +expanded scope in `prelude` to include `num_traits::Signed` ([#450](https://github.com/paupino/rust-decimal/pull/450)). +While subtle, it also expands the way towards some bigger improvements including variable precision.++Of a larger note, the minimum Rust compiler version has been updated so we can start utilizing various compiler features+(such as const generics). The miminum compiler version is now `1.51.0`.++Thank you to [@c410-f3r](https://github.com/c410-f3r) and [@jracollins](https://github.com/jracollins) for your contributions+to this release. ## 1.18.0
Based on the provided diff, which is a version history changelog, I can analyze the mentioned changes for potential security fixes. Here's the analysis: Vulnerability Existed: not sure [Potential Deserialization Vulnerability] [third_party/rust/rust_decimal/VERSION.md] [Lines mentioning #452] [Old Code: Not explicitly shown, but previous versions may have had less robust deserialization] [Fixed Code: "Additional fuzz testing for deserialize ([#452](https://github.com/paupino/rust-decimal/pull/452))"] Vulnerability Existed: yes [String Parsing Rounding Issue] [third_party/rust/rust_decimal/VERSION.md] [Lines mentioning #453] [Old Code: Previous version had rounding issues in from_str with too many digits] [Fixed Code: "Fixed `from_str` issue with rounding issues when too many digits in source string. ([#453](https://github.com/paupino/rust-decimal/issues/453))"] Note: The first entry is marked "not sure" because while fuzz testing was added for deserialization, we don't know if any specific vulnerabilities were found and fixed. The second entry clearly describes a fix for a string parsing rounding issue, which could potentially lead to security-related bugs in numeric operations.
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.transform.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.transform.worker.js@@ -13,15 +13,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.scale(10, 10); ctx.translate(0, 5); ctx.strokeStyle = '#0f0'; ctx.lineWidth = 5; ctx.strokeRect(2.5, -2.6, 5, 0.2);-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); t.done(); });
Based on the provided code diff, I don't see any security-related fixes. The changes appear to be purely cosmetic/refactoring changes (variable renaming) rather than security fixes. Here's the analysis: 1. Vulnerability Existed: no Variable Renaming Refactor [File] [Lines 13-15, 21] 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 simply rename the variable `offscreenCanvas` to `canvas` throughout the file. There are no security implications to this change, and no vulnerabilities are being fixed. The functionality remains exactly 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/layout/style/StreamLoader.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/layout/style/StreamLoader.cpp@@ -117,7 +117,7 @@ } // run destructor for `bytes` auto info = nsContentUtils::GetSubresourceCacheValidationInfo(- aRequest, mSheetLoadData->mURI, nsContentUtils::SubresourceKind::Style);+ aRequest, mSheetLoadData->mURI); // For now, we never cache entries that we have to revalidate, or whose // channel don't support caching.
Let me analyze the code diff for security fixes: Vulnerability Existed: not sure [Potentially Insecure Subresource Cache Validation] [layout/style/StreamLoader.cpp] [Lines 117-118] [Old Code] auto info = nsContentUtils::GetSubresourceCacheValidationInfo( aRequest, mSheetLoadData->mURI, nsContentUtils::SubresourceKind::Style); [Fixed Code] auto info = nsContentUtils::GetSubresourceCacheValidationInfo( aRequest, mSheetLoadData->mURI); Additional Details: - The change removes the explicit SubresourceKind::Style parameter from the cache validation call - While this might affect caching behavior, it's not clear if this was fixing a security vulnerability or just refactoring code - Without more context, I can't determine if this was fixing a specific vulnerability, but changes to cache validation could potentially impact security - The modification might be related to making cache validation more consistent across different resource types
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/num_cpus/README.md+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/num_cpus/README.md@@ -1,6 +1,6 @@ # num_cpus-[](https://crates.io/crates/num_cpus)+[](https://crates.io/crates/num_cpus) [](https://travis-ci.org/seanmonstar/num_cpus) [](https://ci.appveyor.com/project/seanmonstar/num-cpus)
Analysis of the provided code diff: 1. Vulnerability Existed: not sure [Potential Mixed Content Vulnerability] [third_party/rust/num_cpus/README.md] [Lines 1-6] [Old Code: `[](https://crates.io/crates/num_cpus)`] [Fixed Code: `[](https://crates.io/crates/num_cpus)`] Additional Details: - The change involves switching from HTTP to HTTPS for an image badge URL - While this isn't a direct security vulnerability in the code itself, it could be considered a security improvement as it prevents potential mixed content issues when the README is viewed over HTTPS - The old HTTP link could potentially be intercepted or modified in transit - No specific CVE or vulnerability name applies to this change, but it's a security best practice improvement Note: This appears to be a documentation change rather than a code vulnerability fix. The change improves security by using HTTPS instead of HTTP, but doesn't fix an active vulnerability in the traditional sense.
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/build/midl.py+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/build/midl.py@@ -3,6 +3,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. import buildconfig+import shutil import subprocess import os import sys@@ -23,22 +24,118 @@ return os.path.relpath(path, base)+def search_path(paths, path):+ for p in paths:+ f = os.path.join(p, path)+ if os.path.isfile(f):+ return f+ raise RuntimeError(f"Cannot find {path}")+++# Preprocess all the direct and indirect inputs of midl, and put all the+# preprocessed inputs in the given `base` directory. Returns a tuple containing+# the path of the main preprocessed input, and the modified flags to use instead+# of the flags given as argument.+def preprocess(base, input, flags):+ import argparse+ import re+ from collections import deque++ IMPORT_RE = re.compile('import\s*"([^"]+)";')++ parser = argparse.ArgumentParser()+ parser.add_argument("-I", action="append")+ parser.add_argument("-D", action="append")+ parser.add_argument("-acf")+ args, remainder = parser.parse_known_args(flags)+ preprocessor = (+ [buildconfig.substs["_CXX"]]+ # Ideally we'd use the real midl version, but querying it adds a+ # significant overhead to configure. In practice, the version number+ # doesn't make a difference at the moment.+ + ["-E", "-D__midl=801"]+ + [f"-D{d}" for d in args.D or ()]+ + [f"-I{i}" for i in args.I or ()]+ )+ includes = ["."] + buildconfig.substs["INCLUDE"].split(";") + (args.I or [])+ seen = set()+ queue = deque([input])+ if args.acf:+ queue.append(args.acf)+ output = os.path.join(base, os.path.basename(input))+ while True:+ try:+ input = queue.popleft()+ except IndexError:+ break+ if os.path.basename(input) in seen:+ continue+ seen.add(os.path.basename(input))+ input = search_path(includes, input)+ # If there is a .acf file corresponding to the .idl we're processing,+ # we also want to preprocess that file because midl might look for it too.+ if input.endswith(".idl") and os.path.exists(input[:-4] + ".acf"):+ queue.append(input[:-4] + ".acf")+ command = preprocessor + [input]+ preprocessed = os.path.join(base, os.path.basename(input))+ subprocess.run(command, stdout=open(preprocessed, "wb"), check=True)+ # Read the resulting file, and search for imports, that we'll want to+ # preprocess as well.+ with open(preprocessed, "r") as fh:+ for line in fh:+ if not line.startswith("import"):+ continue+ m = IMPORT_RE.match(line)+ if not m:+ continue+ imp = m.group(1)+ queue.append(imp)+ flags = []+ # Add -I<base> first in the flags, so that midl resolves imports to the+ # preprocessed files we created.+ for i in [base] + (args.I or []):+ flags.extend(["-I", i])+ # Add the preprocessed acf file if one was given on the command line.+ if args.acf:+ flags.extend(["-acf", os.path.join(base, os.path.basename(args.acf))])+ flags.extend(remainder)+ return output, flags++ def midl(out, input, *flags): out.avoid_writing_to_file()- midl = buildconfig.substs["MIDL"]- wine = buildconfig.substs.get("WINE")+ midl_flags = buildconfig.substs["MIDL_FLAGS"] base = os.path.dirname(out.name) or "."- if midl.lower().endswith(".exe") and wine:- command = [wine, midl]- else:- command = [midl]- command.extend(buildconfig.substs["MIDL_FLAGS"])- command.extend([relativize(f, base) for f in flags])- command.append("-Oicf")- command.append(relativize(input, base))- print("Executing:", " ".join(command))- result = subprocess.run(command, cwd=base)- return result.returncode+ tmpdir = None+ try:+ # If the build system is asking to not use the preprocessor to midl,+ # we need to do the preprocessing ourselves.+ if "-no_cpp" in midl_flags:+ # Normally, we'd use tempfile.TemporaryDirectory, but in this specific+ # case, we actually want a deterministic directory name, because it's+ # recorded in the code midl generates.+ tmpdir = os.path.join(base, os.path.basename(input) + ".tmp")+ os.makedirs(tmpdir, exist_ok=True)+ try:+ input, flags = preprocess(tmpdir, input, flags)+ except subprocess.CalledProcessError as e:+ return e.returncode+ midl = buildconfig.substs["MIDL"]+ wine = buildconfig.substs.get("WINE")+ if midl.lower().endswith(".exe") and wine:+ command = [wine, midl]+ else:+ command = [midl]+ command.extend(midl_flags)+ command.extend([relativize(f, base) for f in flags])+ command.append("-Oicf")+ command.append(relativize(input, base))+ print("Executing:", " ".join(command))+ result = subprocess.run(command, cwd=base)+ return result.returncode+ finally:+ if tmpdir:+ shutil.rmtree(tmpdir) # midl outputs dlldata to a single dlldata.c file by default. This prevents running
Here's the security analysis of the provided code diff: 1. Vulnerability Existed: yes Temporary Directory Information Disclosure [File] build/midl.py [Lines 114-116] [Old Code] (No previous handling of temporary directory cleanup) [Fixed Code] ``` finally: if tmpdir: shutil.rmtree(tmpdir) ``` Additional Details: The fix properly cleans up temporary directories after use, preventing potential information disclosure through leftover temporary files. 2. Vulnerability Existed: yes Insecure File Handling [File] build/midl.py [Lines 78-80] [Old Code] (No previous input validation or path searching) [Fixed Code] ``` input = search_path(includes, input) ``` Additional Details: The fix adds proper path searching for input files, preventing potential path traversal or file inclusion vulnerabilities. 3. Vulnerability Existed: not sure Potential Command Injection [File] build/midl.py [Lines 125-135] [Old Code] ``` command = [midl] command.extend(buildconfig.substs["MIDL_FLAGS"]) command.extend([relativize(f, base) for f in flags]) ``` [Fixed Code] (Similar structure but with additional preprocessing) Additional Details: While the code uses subprocess.run() with command arrays (which is safer than shell=True), there's no explicit validation of the flags being passed, which could potentially lead to command injection if an attacker controls any of these values. 4. Vulnerability Existed: not sure Potential Race Condition [File] build/midl.py [Lines 114-116] [Old Code] (No previous temporary directory handling) [Fixed Code] ``` tmpdir = os.path.join(base, os.path.basename(input) + ".tmp") os.makedirs(tmpdir, exist_ok=True) ``` Additional Details: The temporary directory creation uses a predictable name and doesn't implement any security measures against race conditions, though the impact is unclear without knowing the full context of usage.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/browser/components/downloads/test/browser/head.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/browser/components/downloads/test/browser/head.js@@ -35,7 +35,13 @@ "resource://testing-common/httpd.js" );-var gTestTargetFile = FileUtils.getFile("TmpD", ["dm-ui-test.file"]);+let gTestTargetFile = new FileUtils.File(+ PathUtils.join(+ Services.dirsvc.get("TmpD", Ci.nsIFile).path,+ "dm-ui-test.file"+ )+);+ gTestTargetFile.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, FileUtils.PERMS_FILE); Services.prefs.setIntPref("security.dialog_enable_delay", 0);
Here's the analysis of the provided code diff: Vulnerability Existed: not sure Potential Path Manipulation Vulnerability [browser/components/downloads/test/browser/head.js] [Lines 35] [Old Code] `var gTestTargetFile = FileUtils.getFile("TmpD", ["dm-ui-test.file"]);` [Fixed Code] `let gTestTargetFile = new FileUtils.File( PathUtils.join( Services.dirsvc.get("TmpD", Ci.nsIFile).path, "dm-ui-test.file" ) );` Additional Details: 1. The change appears to be a more secure way of constructing file paths, using PathUtils.join() which helps prevent path manipulation attacks. 2. The old code used a simple concatenation approach which could potentially be vulnerable to path traversal if the input wasn't properly sanitized. 3. The new code explicitly gets the temporary directory path and joins it securely with the filename. 4. The variable declaration was also changed from `var` to `let`, which is a better practice but not directly security-related. Note: While this appears to be a security improvement, I can't be certain there was an actual vulnerability being fixed here as it's test code and the context is limited. The change does follow security best practices for path construction.
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/the-canvas-state/2d.state.saverestore.stackdepth.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.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'); var limit = 512; for (var i = 1; i < limit; ++i)
Analyzing the provided code diff, here's the security assessment: Vulnerability Existed: no [Variable Renaming] [testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.html] [Lines 17-18] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); Additional Details: The changes in this diff appear to be purely cosmetic/refactoring changes where a variable name was changed from 'offscreenCanvas' to 'canvas'. There are no security implications to this change as it doesn't affect the functionality or security properties of the code. The change seems to be for consistency or readability purposes rather than addressing any security vulnerability.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.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.hsla-clamp-4.html@@ -17,14 +17,14 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillStyle = 'hsla(120, 100%, -200%, 1)'; ctx.fillRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 50,25, 0,0,0,255, "50,25", "0,0,0,255");+_assertPixel(canvas, 50,25, 0,0,0,255, "50,25", "0,0,0,255"); t.done(); });
Based on the provided code diff, here's the analysis following the required format: Vulnerability Existed: no [No Vulnerability Found] [testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html] [Lines 17-25] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillStyle = 'hsla(120, 100%, -200%, 1)'; ctx.fillRect(0, 0, 100, 50); _assertPixel(offscreenCanvas, 50,25, 0,0,0,255, "50,25", "0,0,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillStyle = 'hsla(120, 100%, -200%, 1)'; ctx.fillRect(0, 0, 100, 50); _assertPixel(canvas, 50,25, 0,0,0,255, "50,25", "0,0,0,255"); Additional Details: The changes appear to be purely variable renaming (from `offscreenCanvas` to `canvas`) with no security implications. The test logic remains the same, just using a different variable name. There are no apparent 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/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.worker.js@@ -13,14 +13,14 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#0f0'; try { ctx.fillStyle = '#fg0000ff'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does ctx.fillRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); t.done(); });
Based on the provided diff, I'll analyze it for security vulnerabilities: 1. Vulnerability Existed: no No specific vulnerability [File] [Lines 13-14, 20] Old Code: var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); Fixed Code: var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); Additional Details: This appears to be a simple variable name change from 'offscreenCanvas' to 'canvas' with no security implications. 2. Vulnerability Existed: no No specific vulnerability [File] [Line 20] Old Code: _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); Fixed Code: _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); Additional Details: This is just updating the variable name in the assertion call to match the previous change. The changes appear to be purely cosmetic (variable renaming) with no security implications. The test logic remains the same, and there are no changes to the actual security-sensitive operations being performed.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.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/fill-and-stroke-styles/2d.pattern.paint.repeat.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 = '#f00'; ctx.fillRect(0, 0, 100, 50);@@ -33,10 +33,10 @@ ctx.fillStyle = pattern; ctx.translate(50, 25); ctx.fillRect(-50, -25, 100, 50);- _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_fail); }).then(t_pass, t_fail);
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 references. Here's the analysis following your format: Vulnerability Existed: no No security vulnerability found File: testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js Lines: 13-14, 33-36 Old Code: var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); _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"); Fixed Code: var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); _assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); _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"); The changes are purely cosmetic/refactoring in nature and don't address any security issues. The functionality remains exactly the same, just with a different variable name.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-backgrounds/background-attachment-353.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-backgrounds/background-attachment-353.html@@ -20,7 +20,6 @@ -->- <meta content="" name="flags"> <meta content="This test checks that when an element has 'background-attachment: local', then the background image is fixed with regard to what is the element's scrollable area and not to its viewport. In this test, what would be the scrollable area for the div#target element is where the red area of its background image 100x100-gr-rr.png is and such area is clipped due to 'overflow: hidden'." name="assert"> <style>
Analysis of the code diff: 1. Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/css/css-backgrounds/background-attachment-353.html [Lines] 20 Old Code: `<meta content="" name="flags">` Fixed Code: (line removed) Additional Details: - The diff shows removal of an empty meta tag with name="flags" - This appears to be test configuration cleanup rather than a security fix - No known vulnerability patterns are present in this change - The change is likely related to test maintenance rather than security Note: While no vulnerability is apparent here, the removal of unused or empty tags is generally good practice for code hygiene.
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-hsl-4.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html@@ -17,14 +17,14 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; 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's the analysis of the provided code diff following the specified format: Vulnerability Existed: no No Vulnerability Found [File] [Lines 17-25] [Old Code] ```javascript var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; ctx.fillRect(0, 0, 100, 50); _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'); ctx.fillStyle = '#f00'; ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; ctx.fillRect(0, 0, 100, 50); _assertPixel(canvas, 50,25, 0,255,0,51, "50,25", "0,255,0,51"); ``` The changes in this diff appear to be purely variable renaming (from `offscreenCanvas` to `canvas`) and don't indicate any security fixes. The functionality remains identical, and there are no security-related patterns being modified (no input validation changes, no sanitization, no security-related API changes, etc.). The changes seem to be for code consistency or readability 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/gfx/tests/gtest/TestConfigManager.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/gfx/tests/gtest/TestConfigManager.cpp@@ -23,6 +23,7 @@ int32_t mStatusWrCompositor; int32_t mStatusWrShaderCache; int32_t mStatusWrOptimizedShaders;+ int32_t mStatusWrPartialPresent; int32_t mMaxRefreshRate; bool mHasMixedRefreshRate; Maybe<bool> mHasBattery;@@ -35,6 +36,7 @@ mStatusWrCompositor(nsIGfxInfo::FEATURE_STATUS_OK), mStatusWrShaderCache(nsIGfxInfo::FEATURE_STATUS_OK), mStatusWrOptimizedShaders(nsIGfxInfo::FEATURE_STATUS_OK),+ mStatusWrPartialPresent(nsIGfxInfo::FEATURE_STATUS_OK), mMaxRefreshRate(-1), mHasMixedRefreshRate(false), mHasBattery(Some(false)),@@ -56,6 +58,9 @@ case nsIGfxInfo::FEATURE_WEBRENDER_OPTIMIZED_SHADERS: *_retval = mStatusWrOptimizedShaders; break;+ case nsIGfxInfo::FEATURE_WEBRENDER_PARTIAL_PRESENT:+ *_retval = mStatusWrPartialPresent;+ break; default: return NS_ERROR_NOT_IMPLEMENTED; }@@ -375,12 +380,20 @@ EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); }-TEST_F(GfxConfigManager, WebRenderPartialPresentMali) {+TEST_F(GfxConfigManager, WebRenderPartialBlocked) { mWrPartialPresent = true;- mMockGfxInfo->mDeviceId = "Mali-T760";+ mMockGfxInfo->mStatusWrPartialPresent = nsIGfxInfo::FEATURE_BLOCKED_DEVICE; ConfigureWebRender(); EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled());+}++TEST_F(GfxConfigManager, WebRenderForcePartialBlocked) {+ mWrForcePartialPresent = true;+ mMockGfxInfo->mStatusWrPartialPresent = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;+ ConfigureWebRender();++ EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderScaledResolutionWithHwStretching) {
Based on the provided code diff, I'll analyze it for security vulnerabilities: 1. Vulnerability Existed: no No specific vulnerability found [File] gfx/tests/gtest/TestConfigManager.cpp [Lines] Various [Old Code] Various test cases and configuration management code [Fixed Code] Added new test cases and configuration for WebRender partial present feature The changes appear to be: 1. Adding support for a new WebRender feature (partial present) to the configuration manager 2. Adding new test cases to verify the behavior of this feature 3. No security vulnerabilities are apparent in these changes - they're primarily feature additions and test coverage improvements The changes are focused on: - Adding a new status field (mStatusWrPartialPresent) - Adding handling for a new feature flag (FEATURE_WEBRENDER_PARTIAL_PRESENT) - Adding test cases to verify the feature's behavior when blocked or forced There are no obvious security issues like buffer overflows, injection vulnerabilities, or memory safety problems in these changes. The modifications are focused on feature support and testing infrastructure.
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/nimbus/test/unit/test_ExperimentAPI_ExperimentFeature_getAllVariables.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/toolkit/components/nimbus/test/unit/test_ExperimentAPI_ExperimentFeature_getAllVariables.js@@ -28,6 +28,9 @@ type: "json", fallbackPref: TEST_FALLBACK_PREF, },+ source: {+ type: "string",+ }, }, };@@ -118,6 +121,71 @@ ); add_task(+ async function test_ExperimentFeature_getAllVariables_experimentOverRemote() {+ Services.prefs.clearUserPref(TEST_FALLBACK_PREF);+ const { manager } = await setupForExperimentFeature();+ const { doExperimentCleanup } = ExperimentFakes.enrollmentHelper(+ undefined,+ {+ manager,+ }+ );+ const featureInstance = new ExperimentFeature(+ FEATURE_ID,+ FAKE_FEATURE_MANIFEST+ );+ const recipe = ExperimentFakes.experiment("aw-experiment", {+ branch: {+ slug: "treatment",+ features: [+ {+ featureId: FEATURE_ID,+ value: { screens: ["test-value"] },+ },+ ],+ },+ });+ const rollout = ExperimentFakes.rollout("aw-rollout", {+ branch: {+ slug: "treatment",+ features: [+ { featureId: FEATURE_ID, value: { screens: [], source: "rollout" } },+ ],+ },+ });+ // We're using the store in this test we need to wait for it to load+ await manager.store.ready();++ const rolloutPromise = new Promise(resolve =>+ featureInstance.onUpdate((feature, reason) => {+ if (reason === "rollout-updated") {+ resolve();+ }+ })+ );+ const experimentPromise = new Promise(resolve =>+ featureInstance.onUpdate((feature, reason) => {+ if (reason === "experiment-updated") {+ resolve();+ }+ })+ );+ manager.store.addEnrollment(recipe);+ manager.store.addEnrollment(rollout);+ await rolloutPromise;+ await experimentPromise;++ let allVariables = featureInstance.getAllVariables();++ Assert.equal(allVariables.screens.length, 1, "Returns experiment value");+ Assert.ok(!allVariables.source, "Does not include rollout value");++ await doExperimentCleanup();+ cleanupStorePrefCache();+ }+);++add_task( async function test_ExperimentFeature_getAllVariables_remoteOverPrefDefaults() { const { manager } = await setupForExperimentFeature(); const featureInstance = new ExperimentFeature(
Based on the provided code diff, I'll analyze it for security vulnerabilities: 1. Vulnerability Existed: no The diff primarily adds a new test case (`test_ExperimentFeature_getAllVariables_experimentOverRemote`) and extends the feature manifest with a new `source` field. These changes appear to be functional test additions rather than security fixes. 2. Vulnerability Existed: no The changes to the FAKE_FEATURE_MANIFEST (adding `source` field) are test configuration updates and don't represent security fixes. 3. Vulnerability Existed: no The new test case verifies behavior where experiment values take precedence over rollout values, which is a functional test rather than a security fix. The diff shows: - Addition of a new string-type field in the feature manifest - Addition of a new test case that verifies experiment values override rollout values - No security-related changes or fixes are apparent - No vulnerabilities are being addressed in this diff The changes appear to be part of normal test coverage expansion and feature development 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.