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/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.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();@@ -39,10 +39,10 @@ ctx.fillStyle = pattern; ctx.translate(50, 0); ctx.fillRect(-50, 0, 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);
After analyzing the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely variable renaming (from `offscreenCanvas` to `canvas`) and updating the corresponding references in the assertions. Here's the analysis following your requested format: Vulnerability Existed: no No security vulnerability found File: testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html Lines: Variable renaming throughout Old Code: Used variable name 'offscreenCanvas' Fixed Code: Uses variable name 'canvas' Additional Notes: - The changes are purely cosmetic/refactoring in nature - No security-related patterns were modified (e.g., no changes to input validation, no changes to security-sensitive operations) - The XMLHttpRequest usage remains unchanged and appears properly implemented - The test assertions remain functionally identical, just using the renamed variable
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/toolkit/mozapps/update/tests/TestAUSHelper.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/toolkit/mozapps/update/tests/TestAUSHelper.cpp@@ -142,6 +142,7 @@ " or: setup-symlink dir1 dir2 file symlink\n" " or: remove-symlink dir1 dir2 file symlink\n" " or: check-symlink symlink\n"+ " or: check-umask existing-umask\n" " or: post-update\n" " or: create-update-dir\n" "\n"@@ -286,6 +287,37 @@ #endif }+ if (!NS_tstrcmp(argv[1], NS_T("check-umask"))) {+#ifdef XP_UNIX+ // Discover the current value of the umask. There is no way to read the+ // umask without changing it. The system call is specified as unable to+ // fail.+ uint32_t umask = ::umask(0777);+ ::umask(umask);++ NS_tchar logFilePath[MAXPATHLEN];+ if (!NS_tvsnprintf(logFilePath,+ sizeof(logFilePath) / sizeof(logFilePath[0]), NS_T("%s"),+ argv[2])) {+ return 1;+ }++ FILE* logFP = NS_tfopen(logFilePath, NS_T("wb"));+ if (!logFP) {+ return 1;+ }+ fprintf(logFP, "check-umask\numask-%d\n", umask);++ fclose(logFP);+ logFP = nullptr;++ return 0;+#else+ // Not implemented on non-Unix platforms+ return 1;+#endif+ }+ if (!NS_tstrcmp(argv[1], NS_T("wait-for-service-stop"))) { #if defined(XP_WIN) && defined(MOZ_MAINTENANCE_SERVICE) const int maxWaitSeconds = NS_ttoi(argv[3]);
Based on the provided code diff, here's the analysis: Vulnerability Existed: not sure [Potential Information Leak] [toolkit/mozapps/update/tests/TestAUSHelper.cpp] [Lines 142, 286-287] [Old Code] No check-umask command existed [Fixed Code] Added check-umask command that writes the current umask value to a file Additional Details: 1. The change adds functionality to check and log the current umask value on Unix systems 2. While not clearly a security vulnerability, exposing umask information could potentially be used by an attacker to understand file permission settings 3. The implementation appears safe as it: - Only works on Unix systems - Properly restores the original umask after reading it - Uses proper file handling with checks 4. However, logging sensitive system information like umask could be considered an information leak in some contexts No other clear vulnerabilities are identified in this diff. The change appears to be adding test functionality rather than fixing a security issue.
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/newtab/test/unit/asrouter/CFRPageActions.test.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/browser/components/newtab/test/unit/asrouter/CFRPageActions.test.js@@ -727,6 +727,7 @@ hideClose: true, eventCallback: pageAction._popupStateChange, persistent: false,+ persistWhileVisible: false, } ); });
Let me analyze the code diff for security fixes. Vulnerability Existed: not sure [Potential Popup Persistence Issue] [browser/components/newtab/test/unit/asrouter/CFRPageActions.test.js] [Lines 727-734] [Old Code] hideClose: true, eventCallback: pageAction._popupStateChange, persistent: false, } [Fixed Code] hideClose: true, eventCallback: pageAction._popupStateChange, persistent: false, persistWhileVisible: false, } Additional Details: - The change adds a new property `persistWhileVisible: false` to the popup configuration - This appears to be hardening the popup behavior by explicitly preventing persistence while visible - Without more context about the actual popup implementation, I can't definitively say if this was fixing a security vulnerability - The change suggests there might have been a potential issue with popup persistence that could lead to unwanted behavior Note: Since this is a test file, it's less likely to represent an actual security fix in production code, but rather a test case update to match changed behavior.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/netwerk/dns/TRRService.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/netwerk/dns/TRRService.cpp@@ -35,8 +35,7 @@ #define TRR_PREF_PREFIX "network.trr." #define TRR_PREF(x) TRR_PREF_PREFIX x-namespace mozilla {-namespace net {+namespace mozilla::net { StaticRefPtr<nsIThread> sTRRBackgroundThread; static Atomic<TRRService*> sTRRServicePtr;@@ -356,14 +355,6 @@ MutexAutoLock lock(mLock); Preferences::GetCString(TRR_PREF("bootstrapAddr"), mBootstrapAddr); clearEntireCache = true;- }- if (!name || !strcmp(name, TRR_PREF("blacklist-duration"))) {- // prefs is given in number of seconds- uint32_t secs;- if (NS_SUCCEEDED(- Preferences::GetUint(TRR_PREF("blacklist-duration"), &secs))) {- mBlocklistDurationSeconds = secs;- } } if (!name || !strcmp(name, kDisableIpv6Pref)) { bool tmp;@@ -852,7 +843,8 @@ // use a unified casing for the hashkey nsAutoCString hashkey(aHost + aOriginSuffix); if (auto val = bl->Lookup(hashkey)) {- int32_t until = *val + mBlocklistDurationSeconds;+ int32_t until =+ *val + int32_t(StaticPrefs::network_trr_temp_blocklist_duration_sec()); int32_t expire = NowInSeconds(); if (until > expire) { LOG(("Host [%s] is TRR blocklisted\n", nsCString(aHost).get()));@@ -1315,5 +1307,4 @@ } }-} // namespace net-} // namespace mozilla+} // namespace mozilla::net
I'll analyze the code diff for security fixes following the specified format. 1. Vulnerability Existed: yes Hardcoded Blocklist Duration [netwerk/dns/TRRService.cpp] [Lines 356-363] [Old Code] if (!name || !strcmp(name, TRR_PREF("blacklist-duration"))) { // prefs is given in number of seconds uint32_t secs; if (NS_SUCCEEDED( Preferences::GetUint(TRR_PREF("blacklist-duration"), &secs))) { mBlocklistDurationSeconds = secs; } } [Fixed Code] (removed entirely) 2. Vulnerability Existed: yes Insecure Blocklist Duration Handling [netwerk/dns/TRRService.cpp] [Lines 852-854] [Old Code] if (auto val = bl->Lookup(hashkey)) { int32_t until = *val + mBlocklistDurationSeconds; int32_t expire = NowInSeconds(); [Fixed Code] if (auto val = bl->Lookup(hashkey)) { int32_t until = *val + int32_t(StaticPrefs::network_trr_temp_blocklist_duration_sec()); int32_t expire = NowInSeconds(); The changes indicate: 1. Removal of a hardcoded preference for blocklist duration which could have been a security issue if the duration wasn't properly configured 2. Replacement with a more secure approach using StaticPrefs for the blocklist duration, which provides better control and security through centralized preference management The fixes appear to address potential security concerns around the configuration and management of TRR (Trusted Recursive Resolver) blocklist durations.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.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.font = "math serif"; t.done();
Analyzing the provided code diff, here's the security assessment: 1. Vulnerability Existed: no No security vulnerability found [File] testing/web-platform/tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.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'); The changes in this diff appear to be purely cosmetic/refactoring, changing the variable name from `offscreenCanvas` to `canvas`. There are no security-related changes or vulnerability fixes in this diff. The modification doesn't affect any security-sensitive operations or introduce/remove any security controls.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.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.uncovered.image.source-out.worker.js@@ -13,8 +13,8 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';@@ -32,8 +32,8 @@ promise.then(function(response) { createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10);- _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5);- _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);+ _assertPixelApprox(canvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5);+ _assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); }, t_fail); }).then(t_pass, t_fail);
Based on the provided code diff, here's the analysis following the required format: Vulnerability Existed: no [No security vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.worker.js] [Lines 13-32] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixelApprox(canvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); _assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); 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 a different variable name. No security vulnerabilities are addressed in this diff.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/third_party/rust/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs@@ -1648,18 +1648,33 @@ } cfg_if! {- if #[cfg(target_arch = "x86")] {+ if #[cfg(target_arch = "aarch64")] {+ mod aarch64;+ pub use self::aarch64::*;+ } else if #[cfg(target_arch = "arm")] {+ mod arm;+ pub use self::arm::*;+ } else if #[cfg(target_arch = "mips64")] {+ mod mips64;+ pub use self::mips64::*;+ } else if #[cfg(target_arch = "powerpc")] {+ mod powerpc;+ pub use self::powerpc::*;+ } else if #[cfg(target_arch = "powerpc64")] {+ mod powerpc64;+ pub use self::powerpc64::*;+ } else if #[cfg(target_arch = "riscv64")] {+ mod riscv64;+ pub use self::riscv64::*;+ } else if #[cfg(target_arch = "sparc64")] {+ mod sparc64;+ pub use self::sparc64::*;+ } else if #[cfg(target_arch = "x86")] { mod x86; pub use self::x86::*; } else if #[cfg(target_arch = "x86_64")] { mod x86_64; pub use self::x86_64::*;- } else if #[cfg(target_arch = "aarch64")] {- mod aarch64;- pub use self::aarch64::*;- } else if #[cfg(target_arch = "sparc64")] {- mod sparc64;- pub use self::sparc64::*; } else { // Unknown target_arch }
Analyzing the provided code diff, I don't see any direct security vulnerabilities being fixed. The changes appear to be architectural improvements and additions rather than security fixes. Here's the analysis: 1. Vulnerability Existed: no Architectural Improvements [File] [Lines 1648-1668] [Old Code] cfg_if! { if #[cfg(target_arch = "x86")] { mod x86; pub use self::x86::*; } else if #[cfg(target_arch = "x86_64")] { mod x86_64; pub use self::x86_64::*; } else if #[cfg(target_arch = "aarch64")] { mod aarch64; pub use self::aarch64::*; } else if #[cfg(target_arch = "sparc64")] { mod sparc64; pub use self::sparc64::*; } else { // Unknown target_arch } } [Fixed Code] cfg_if! { if #[cfg(target_arch = "aarch64")] { mod aarch64; pub use self::aarch64::*; } else if #[cfg(target_arch = "arm")] { mod arm; pub use self::arm::*; } else if #[cfg(target_arch = "mips64")] { mod mips64; pub use self::mips64::*; } else if #[cfg(target_arch = "powerpc")] { mod powerpc; pub use self::powerpc::*; } else if #[cfg(target_arch = "powerpc64")] { mod powerpc64; pub use self::powerpc64::*; } else if #[cfg(target_arch = "riscv64")] { mod riscv64; pub use self::riscv64::*; } else if #[cfg(target_arch = "sparc64")] { mod sparc64; pub use self::sparc64::*; } else if #[cfg(target_arch = "x86")] { mod x86; pub use self::x86::*; } else if #[cfg(target_arch = "x86_64")] { mod x86_64; pub use self::x86_64::*; } else { // Unknown target_arch } } The changes involve: 1. Reordering the architecture checks 2. Adding support for new architectures (arm, mips64, powerpc, powerpc64, riscv64) 3. No security-related changes are visible in this diff This appears to be a maintenance/feature update rather than a security fix. The modification improves support for additional CPU architectures but doesn't address any specific 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/editor/libeditor/HTMLEditor.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/editor/libeditor/HTMLEditor.h@@ -1262,10 +1262,10 @@ * NOTE: The result may be point of editing host. I.e., the container may * be outside of editing host. */- template <typename PT, typename RT>+ template <typename EditorDOMPointType> EditorDOMPoint GetCurrentHardLineStartPoint(- const RangeBoundaryBase<PT, RT>& aPoint,- EditSubAction aEditSubAction) const;+ const EditorDOMPointType& aPoint, EditSubAction aEditSubAction,+ const Element& aEditingHost) const; /** * GetCurrentHardLineEndPoint() returns end point of hard line including@@ -1275,21 +1275,22 @@ * immediately before a block boundary. If the line ends with a block * boundary, returns the block. */- template <typename PT, typename RT>- EditorDOMPoint GetCurrentHardLineEndPoint(- const RangeBoundaryBase<PT, RT>& aPoint) const;+ template <typename EditorDOMPointType>+ EditorDOMPoint GetCurrentHardLineEndPoint(const EditorDOMPointType& aPoint,+ const Element& aEditingHost) const; /** * CreateRangeIncludingAdjuscentWhiteSpaces() creates an nsRange instance * which may be expanded from the given range to include adjuscent * white-spaces. If this fails handling something, returns nullptr. */+ template <typename EditorDOMRangeType> already_AddRefed<nsRange> CreateRangeIncludingAdjuscentWhiteSpaces(- const dom::AbstractRange& aAbstractRange);- template <typename SPT, typename SRT, typename EPT, typename ERT>+ const EditorDOMRangeType& aRange);+ template <typename EditorDOMPointType1, typename EditorDOMPointType2> already_AddRefed<nsRange> CreateRangeIncludingAdjuscentWhiteSpaces(- const RangeBoundaryBase<SPT, SRT>& aStartRef,- const RangeBoundaryBase<EPT, ERT>& aEndRef);+ const EditorDOMPointType1& aStartPoint,+ const EditorDOMPointType2& aEndPoint); /** * GetSelectionRangesExtendedToIncludeAdjuscentWhiteSpaces() collects@@ -1308,14 +1309,13 @@ * which may be expanded to start/end of hard line at both edges of the given * range. If this fails handling something, returns nullptr. */+ template <typename EditorDOMRangeType> already_AddRefed<nsRange> CreateRangeExtendedToHardLineStartAndEnd(- const dom::AbstractRange& aAbstractRange,- EditSubAction aEditSubAction) const;- template <typename SPT, typename SRT, typename EPT, typename ERT>+ const EditorDOMRangeType& aRange, EditSubAction aEditSubAction) const;+ template <typename EditorDOMPointType1, typename EditorDOMPointType2> already_AddRefed<nsRange> CreateRangeExtendedToHardLineStartAndEnd(- const RangeBoundaryBase<SPT, SRT>& aStartRef,- const RangeBoundaryBase<EPT, ERT>& aEndRef,- EditSubAction aEditSubAction) const;+ const EditorDOMPointType1& aStartPoint,+ const EditorDOMPointType2& aEndPoint, EditSubAction aEditSubAction) const; /** * GetSelectionRangesExtendedToHardLineStartAndEnd() collects selection ranges@@ -1366,12 +1366,14 @@ nsTArray<OwningNonNull<nsIContent>>& aOutArrayOfContents, EditSubAction aEditSubAction, CollectNonEditableNodes aCollectNonEditableNodes) {- if (NS_WARN_IF(!aPointInOneHardLine.IsSet())) {+ if (MOZ_UNLIKELY(+ NS_WARN_IF(!aPointInOneHardLine.IsSet()) ||+ NS_WARN_IF(aPointInOneHardLine.IsInNativeAnonymousSubtree()))) { return NS_ERROR_INVALID_ARG; }+ RefPtr<nsRange> oneLineRange = CreateRangeExtendedToHardLineStartAndEnd(- aPointInOneHardLine.ToRawRangeBoundary(),- aPointInOneHardLine.ToRawRangeBoundary(), aEditSubAction);+ aPointInOneHardLine, aPointInOneHardLine, aEditSubAction); if (!oneLineRange) { // XXX It seems odd to create collapsed range for one line range... ErrorResult error;@@ -1417,12 +1419,12 @@ * CreateRangeIncludingAdjuscentWhiteSpaces() and * CreateRangeExtendedToLineStartAndEnd(). If the given range is collapsed * in a block and the block has only one `<br>` element, this makes- * aStartRef and aEndRef select the `<br>` element.- */- template <typename SPT, typename SRT, typename EPT, typename ERT>+ * aStartPoint and aEndRef select the `<br>` element.+ */+ template <typename EditorDOMPointType1, typename EditorDOMPointType2> void SelectBRElementIfCollapsedInEmptyBlock(- RangeBoundaryBase<SPT, SRT>& aStartRef,- RangeBoundaryBase<EPT, ERT>& aEndRef) const;+ EditorDOMPointType1& aStartPoint, EditorDOMPointType2& aEndPoint,+ const Element& aEditingHost) const; /** * GetChildNodesOf() returns all child nodes of aParent with an array.
After analyzing the code diff, I don't find any clear security vulnerabilities being fixed. The changes appear to be primarily template parameter refactoring and adding additional parameter checks. Here's my analysis: 1. Vulnerability Existed: no No specific vulnerability found [File] editor/libeditor/HTMLEditor.h [Lines] various The changes mainly involve: - Template parameter simplification (RangeBoundaryBase -> EditorDOMPointType) - Adding additional parameter (aEditingHost) to several methods - Adding additional checks for native anonymous subtree - General code cleanup and refactoring 2. Vulnerability Existed: not sure Potential Input Validation Improvement [File] editor/libeditor/HTMLEditor.h [Lines] 1366-1369 Old Code: if (NS_WARN_IF(!aPointInOneHardLine.IsSet())) { Fixed Code: if (MOZ_UNLIKELY( NS_WARN_IF(!aPointInOneHardLine.IsSet()) || NS_WARN_IF(aPointInOneHardLine.IsInNativeAnonymousSubtree()))) { This adds a check for native anonymous subtree which could potentially prevent some edge cases, but I'm not sure if this was fixing a specific vulnerability. The changes appear to be more about code quality and maintainability rather than addressing specific security vulnerabilities. The template parameter changes make the code more consistent and the additional parameter checks improve robustness, but I don't see evidence of security fixes 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/system/tests/ioutils/test_ioutils_copy_move.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/system/tests/ioutils/test_ioutils_copy_move.html@@ -16,8 +16,7 @@ const { ObjectUtils } = ChromeUtils.import("resource://gre/modules/ObjectUtils.jsm"); add_task(async function test_move_relative_path() {- const tmpDir = await PathUtils.getTempDir();- const tmpFileName = PathUtils.join(tmpDir, "test_ioutils_move_relative_path.tmp");+ const tmpFileName = PathUtils.join(PathUtils.tempDir, "test_ioutils_move_relative_path.tmp"); const dest = "relative_to_cwd.tmp"; await createFile(tmpFileName, "source");@@ -37,9 +36,8 @@ add_task(async function test_move_rename() { // Set up.- const tmpDir = await PathUtils.getTempDir();- const tmpFileName = PathUtils.join(tmpDir, "test_ioutils_move_src.tmp");- const destFileName = PathUtils.join(tmpDir, "test_ioutils_move_dest.tmp");+ const tmpFileName = PathUtils.join(PathUtils.tempDir, "test_ioutils_move_src.tmp");+ const destFileName = PathUtils.join(PathUtils.tempDir, "test_ioutils_move_dest.tmp"); await createFile(tmpFileName, "dest"); // Test. info("Test move to new file in same directory");@@ -82,9 +80,8 @@ add_task(async function test_move_to_dir() { // Set up. info("Test move and rename to non-existing directory");- const tmpDir = await PathUtils.getTempDir();- const tmpFileName = PathUtils.join(tmpDir, "test_move_to_dir.tmp");- const destDir = PathUtils.join(tmpDir, "test_move_to_dir.tmp.d");+ const tmpFileName = PathUtils.join(PathUtils.tempDir, "test_move_to_dir.tmp");+ const destDir = PathUtils.join(PathUtils.tempDir, "test_move_to_dir.tmp.d"); const dest = PathUtils.join(destDir, "dest.tmp"); await createFile(tmpFileName); // Test.@@ -126,9 +123,8 @@ add_task(async function test_move_dir() { // Set up. info("Test rename an empty directory");- const tmpDir = await PathUtils.getTempDir();- const srcDir = PathUtils.join(tmpDir, "test_move_dir.tmp.d");- const destDir = PathUtils.join(tmpDir, "test_move_dir_dest.tmp.d");+ const srcDir = PathUtils.join(PathUtils.tempDir, "test_move_dir.tmp.d");+ const destDir = PathUtils.join(PathUtils.tempDir, "test_move_dir_dest.tmp.d"); await createDir(srcDir); // Test. await IOUtils.move(srcDir, destDir);@@ -159,9 +155,8 @@ add_task(async function test_move_failures() { // Set up. info("Test attempt to rename a non-existent source file");- const tmpDir = await PathUtils.getTempDir();- const notExistsSrc = PathUtils.join(tmpDir, "not_exists_src.tmp");- const notExistsDest = PathUtils.join(tmpDir, "not_exists_dest.tmp");+ const notExistsSrc = PathUtils.join(PathUtils.tempDir, "not_exists_src.tmp");+ const notExistsDest = PathUtils.join(PathUtils.tempDir, "not_exists_dest.tmp"); // Test. await Assert.rejects( IOUtils.move(notExistsSrc, notExistsDest),@@ -175,8 +170,8 @@ // Set up. info("Test attempt to move a directory to a file");- const destFile = PathUtils.join(tmpDir, "test_move_failures_file_dest.tmp");- const srcDir = PathUtils.join(tmpDir, "test_move_failure_src.tmp.d");+ const destFile = PathUtils.join(PathUtils.tempDir, "test_move_failures_file_dest.tmp");+ const srcDir = PathUtils.join(PathUtils.tempDir, "test_move_failure_src.tmp.d"); await createFile(destFile); await createDir(srcDir); // Test.@@ -192,9 +187,8 @@ add_task(async function test_copy() { // Set up.- const tmpDir = await PathUtils.getTempDir();- const tmpFileName = PathUtils.join(tmpDir, "test_ioutils_orig.tmp");- const destFileName = PathUtils.join(tmpDir, "test_ioutils_copy.tmp");+ const tmpFileName = PathUtils.join(PathUtils.tempDir, "test_ioutils_orig.tmp");+ const destFileName = PathUtils.join(PathUtils.tempDir, "test_ioutils_copy.tmp"); await createFile(tmpFileName, "original"); // Test. info("Test copy to new file in same directory");@@ -236,9 +230,8 @@ add_task(async function test_copy_file_to_dir() { // Set up. info("Test copy file to non-existing directory");- const tmpDir = await PathUtils.getTempDir();- const tmpFileName = PathUtils.join(tmpDir, "test_copy_file_to_dir.tmp");- const destDir = PathUtils.join(tmpDir, "test_copy_file_to_dir.tmp.d");+ const tmpFileName = PathUtils.join(PathUtils.tempDir, "test_copy_file_to_dir.tmp");+ const destDir = PathUtils.join(PathUtils.tempDir, "test_copy_file_to_dir.tmp.d"); const dest = PathUtils.join(destDir, "dest.tmp"); await createFile(tmpFileName); // Test.@@ -280,9 +273,8 @@ add_task(async function test_copy_dir_recursive() { // Set up. info("Test rename an empty directory");- const tmpDir = await PathUtils.getTempDir();- const srcDir = PathUtils.join(tmpDir, "test_copy_dir.tmp.d");- const destDir = PathUtils.join(tmpDir, "test_copy_dir_dest.tmp.d");+ const srcDir = PathUtils.join(PathUtils.tempDir, "test_copy_dir.tmp.d");+ const destDir = PathUtils.join(PathUtils.tempDir, "test_copy_dir_dest.tmp.d"); await createDir(srcDir); // Test. await IOUtils.copy(srcDir, destDir, { recursive: true });@@ -313,9 +305,8 @@ add_task(async function test_copy_failures() { // Set up. info("Test attempt to copy a non-existent source file");- const tmpDir = await PathUtils.getTempDir();- const notExistsSrc = PathUtils.join(tmpDir, "test_copy_not_exists_src.tmp");- const notExistsDest = PathUtils.join(tmpDir, "test_copy_not_exists_dest.tmp");+ const notExistsSrc = PathUtils.join(PathUtils.tempDir, "test_copy_not_exists_src.tmp");+ const notExistsDest = PathUtils.join(PathUtils.tempDir, "test_copy_not_exists_dest.tmp"); // Test. await Assert.rejects( IOUtils.copy(notExistsSrc, notExistsDest),@@ -329,8 +320,8 @@ // Set up. info("Test attempt to copy a directory to a file");- const destFile = PathUtils.join(tmpDir, "test_copy_failures_file_dest.tmp");- const srcDir = PathUtils.join(tmpDir, "test_copy_failure_src.tmp.d");+ const destFile = PathUtils.join(PathUtils.tempDir, "test_copy_failures_file_dest.tmp");+ const srcDir = PathUtils.join(PathUtils.tempDir, "test_copy_failure_src.tmp.d"); await createFile(destFile); await createDir(srcDir); // Test.
After analyzing the provided code diff, I don't find any clear security vulnerabilities being fixed. The changes primarily involve refactoring how temporary directory paths are accessed, replacing `await PathUtils.getTempDir()` with direct access to `PathUtils.tempDir`. This appears to be a performance optimization rather than a security fix. Here's the analysis following your requested format: Vulnerability Existed: no No security vulnerability found [dom/system/tests/ioutils/test_ioutils_copy_move.html] [Various lines] [Old Code: const tmpDir = await PathUtils.getTempDir(); const tmpFileName = PathUtils.join(tmpDir, ...)] [Fixed Code: const tmpFileName = PathUtils.join(PathUtils.tempDir, ...)] The changes are consistent throughout the file, replacing the asynchronous directory access with a synchronous property access, but this doesn't appear to address any security issues. The functionality remains the same, just implemented more efficiently. If I were to speculate about potential security implications (though none are evident in this diff), the change could theoretically reduce the window of opportunity for race conditions by eliminating an async operation, but this would be extremely minor and not a documented vulnerability 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/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html@@ -18,8 +18,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);@@ -37,7 +37,7 @@ ctx.drawImage(bitmap, 0, 0, 100, 50); ctx.drawImage(bitmap, 0, 0, 100, 50); ctx.drawImage(bitmap, 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_fail); }).then(t_pass, t_fail);
After analyzing the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely variable renaming and don't affect security. Here's the analysis: Vulnerability Existed: no No vulnerability found [File] [Lines 18-19, 37] [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 from `offscreenCanvas` to `canvas` for consistency or readability, without any security implications. The functionality remains exactly the same. No security-related patterns (like input validation, resource handling, etc.) were modified 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/pixel-manipulation/2d.imageData.put.alpha.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.alpha.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.25)'; ctx.fillRect(0, 0, 100, 50)@@ -22,7 +22,7 @@ ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50) ctx.putImageData(imgdata, 0, 0);-_assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,64, "50,25", "0,255,0,64", 2);+_assertPixelApprox(canvas, 50,25, 0,255,0,64, "50,25", "0,255,0,64", 2); t.done(); });
Based on the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely variable renaming and don't affect security aspects. Here's the analysis: Vulnerability Existed: no No security vulnerability found [File] testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.worker.js [Lines 13-22] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,64, "50,25", "0,255,0,64", 2); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixelApprox(canvas, 50,25, 0,255,0,64, "50,25", "0,255,0,64", 2); The changes simply rename the variable from `offscreenCanvas` to `canvas` and update all references to it. This is a code style/readability change rather than a security fix. No security vulnerabilities are being addressed in this diff.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.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.moveTo(0, 0); ctx.lineTo(100, 0);@@ -49,8 +49,8 @@ ctx.lineTo(0, 50); ctx.fillStyle = '#0f0'; ctx.fill();-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");-_assertPixel(offscreenCanvas, 90,45, 0,255,0,255, "90,45", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 90,45, 0,255,0,255, "90,45", "0,255,0,255"); t.done(); });
Analysis of the provided code diff: 1. Vulnerability Existed: no No security vulnerability found [File] testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.html [Lines] 17-49 [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"); _assertPixel(offscreenCanvas, 90,45, 0,255,0,255, "90,45", "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"); _assertPixel(canvas, 90,45, 0,255,0,255, "90,45", "0,255,0,255"); 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 the same, just with a different variable name. No security vulnerabilities were addressed 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/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.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-rgba-3.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 = 'rgba(0, 255, 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(); });
Analyzing the provided code diff, here's the security assessment: 1. Vulnerability Existed: no No security vulnerability found [File] testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html [Lines] 17-25 [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); _assertPixel(offscreenCanvas, 50,25, 0,255,0,51, "50,25", "0,255,0,51"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); _assertPixel(canvas, 50,25, 0,255,0,51, "50,25", "0,255,0,51"); The changes appear to be purely cosmetic/refactoring, renaming the variable from `offscreenCanvas` to `canvas`. There are no security-related changes in this diff, no changes to the actual functionality or security-sensitive operations. The color parsing and assertion logic remains 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/devtools/client/debugger/src/workers/parser/findOutOfScopeLocations.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/client/debugger/src/workers/parser/findOutOfScopeLocations.js@@ -1,9 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */--import findIndex from "lodash/findIndex";-import findLastIndex from "lodash/findLastIndex"; import { containsLocation, containsPosition } from "./utils/contains";@@ -35,38 +32,42 @@ /** * Find the nearest location containing the input position and- * return new locations without inner locations under that nearest location+ * return inner locations under that nearest location *- * @param locations Notice! The locations MUST be sorted by `sortByStart`+ * @param {Array<Object>} locations Notice! The locations MUST be sorted by `sortByStart` * so that we can do linear time complexity operation.+ * @returns {Array<Object>} */-function removeInnerLocations(locations, position) {+function getInnerLocations(locations, position) { // First, let's find the nearest position-enclosing function location, // which is to find the last location enclosing the position.- const newLocs = locations.slice();- const parentIndex = findLastIndex(newLocs, loc =>- containsPosition(loc, position)- );- if (parentIndex < 0) {- return newLocs;+ let parentIndex;+ for (let i = locations.length - 1; i >= 0; i--) {+ const loc = locations[i];+ if (containsPosition(loc, position)) {+ parentIndex = i;+ break;+ } }- // Second, from the nearest location, loop locations again, stop looping- // once seeing the 1st location not enclosed by the nearest location- // to find the last inner locations inside the nearest location.- const innerStartIndex = parentIndex + 1;- const parentLoc = newLocs[parentIndex];- const outerBoundaryIndex = findIndex(- newLocs,- loc => !containsLocation(parentLoc, loc),- innerStartIndex- );- const innerBoundaryIndex =- outerBoundaryIndex < 0 ? newLocs.length - 1 : outerBoundaryIndex - 1;+ if (parentIndex == undefined) {+ return [];+ }+ const parentLoc = locations[parentIndex];- // Third, remove those inner functions- newLocs.splice(innerStartIndex, innerBoundaryIndex - parentIndex);- return newLocs;+ // Then, from the nearest location, loop locations again and put locations into+ // the innerLocations array until we get to a location not enclosed by the nearest location.+ const innerLocations = [];+ for (let i = parentIndex + 1; i < locations.length; i++) {+ const loc = locations[i];+ if (!containsLocation(parentLoc, loc)) {+ break;+ }++ innerLocations.push(loc);+ }++ return innerLocations; } /**@@ -112,16 +113,20 @@ function findOutOfScopeLocations(sourceId, position) { const { functions, comments } = findSymbols(sourceId); const commentLocations = comments.map(c => c.location);- let locations = functions+ const locations = functions .map(getLocation) .concat(commentLocations) .sort(sortByStart);- // Must remove inner locations then filter, otherwise,- // we will mis-judge in-scope inner locations as out of scope.- locations = removeInnerLocations(locations, position).filter(- loc => !containsPosition(loc, position)- );- return removeOverlaps(locations);++ const innerLocations = getInnerLocations(locations, position);+ const outerLocations = locations.filter(loc => {+ if (innerLocations.includes(loc)) {+ return false;+ }++ return !containsPosition(loc, position);+ });+ return removeOverlaps(outerLocations); } export default findOutOfScopeLocations;
Let me analyze the code diff for potential security vulnerabilities: 1. Vulnerability Existed: no The changes primarily involve refactoring the logic for handling locations in the debugger. The main changes are: - Renamed `removeInnerLocations` to `getInnerLocations` - Changed from using lodash functions to native loops - Modified the logic to collect inner locations rather than remove them - Improved the filtering logic in `findOutOfScopeLocations` No security vulnerabilities were fixed in this diff. The changes appear to be functional improvements and code cleanup rather than security fixes. 2. Vulnerability Existed: no The changes in the function signatures and documentation (adding JSDoc types) are purely for code quality and don't indicate any security fixes. 3. Vulnerability Existed: no The removal of lodash imports (`findIndex` and `findLastIndex`) is a performance optimization and doesn't relate to any security issues. The diff shows significant refactoring of the location handling logic, but there's no evidence of any security vulnerabilities being addressed. The changes appear to be focused on: 1. Improving code clarity 2. Switching from lodash to native implementations 3. Changing the approach from removing inner locations to collecting them 4. Making the filtering logic more explicit No CVE or known vulnerability patterns are present in either the old or new code.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/security/manager/ssl/StaticHPKPins.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/security/manager/ssl/StaticHPKPins.h@@ -1134,4 +1134,4 @@ static const int32_t kUnknownId = -1;-static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1652093468513000);+static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1654166999548000);
Here's the analysis of the provided code diff: Vulnerability Existed: not sure [Potential Certificate Pinning Expiration] [security/manager/ssl/StaticHPKPins.h] [Lines 1134] [Old Code] `static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1652093468513000);` [Fixed Code] `static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1654166999548000);` Additional Details: - The change updates the expiration time for preloaded HPKP (HTTP Public Key Pinning) pins - This appears to be a routine update of the pinning expiration date rather than a security fix - Without more context, it's unclear if the previous expiration time had already passed or was about to pass, which could have caused security issues - The change ensures continued security by extending the validity period of the pinning 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/path-objects/2d.path.arcTo.coincide.1.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.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'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50);@@ -34,9 +34,9 @@ ctx.moveTo(50, 25); ctx.arcTo(50, 25, 100, 25, 1); ctx.stroke();-_assertPixel(offscreenCanvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");-_assertPixel(offscreenCanvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255"); t.done(); });
After analyzing the provided code diff, I don't find any security vulnerabilities. The changes appear to be purely variable renaming and don't affect security. Here's the analysis following your requested format: Vulnerability Existed: no [No security vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.html] [Lines 17-34] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixel(offscreenCanvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255"); _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); _assertPixel(offscreenCanvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255"); _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); _assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255"); The changes simply rename the variable from `offscreenCanvas` to `canvas` and update all references to it. This doesn't introduce or fix any security issues.
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/display_swapchain.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/ash/src/extensions/khr/display_swapchain.rs@@ -8,22 +8,16 @@ #[derive(Clone)] pub struct DisplaySwapchain { handle: vk::Device,- swapchain_fn: vk::KhrDisplaySwapchainFn,+ fp: vk::KhrDisplaySwapchainFn, } impl DisplaySwapchain { pub fn new(instance: &Instance, device: &Device) -> Self {- let swapchain_fn = vk::KhrDisplaySwapchainFn::load(|name| unsafe {- mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr()))+ let handle = device.handle();+ let fp = vk::KhrDisplaySwapchainFn::load(|name| unsafe {+ mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) });- Self {- handle: device.handle(),- swapchain_fn,- }- }-- pub fn name() -> &'static CStr {- vk::KhrDisplaySwapchainFn::name()+ Self { handle, fp } } #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateSharedSwapchainsKHR.html>"]@@ -33,7 +27,7 @@ allocation_callbacks: Option<&vk::AllocationCallbacks>, ) -> VkResult<Vec<vk::SwapchainKHR>> { let mut swapchains = Vec::with_capacity(create_infos.len());- let err_code = self.swapchain_fn.create_shared_swapchains_khr(+ let err_code = self.fp.create_shared_swapchains_khr( self.handle, create_infos.len() as u32, create_infos.as_ptr(),@@ -44,8 +38,12 @@ err_code.result_with_success(swapchains) }+ pub fn name() -> &'static CStr {+ vk::KhrDisplaySwapchainFn::name()+ }+ pub fn fp(&self) -> &vk::KhrDisplaySwapchainFn {- &self.swapchain_fn+ &self.fp } pub fn device(&self) -> vk::Device {
Let me analyze the code diff for security vulnerabilities: 1. Vulnerability Existed: no The changes appear to be primarily structural/refactoring changes rather than security fixes. The main changes are: - Renaming `swapchain_fn` to `fp` (likely just a naming convention change) - Moving the `name()` function implementation - Simplifying the constructor by inlining the handle assignment - No changes to the actual security-sensitive operations 2. Vulnerability Existed: not sure Memory Safety [File] third_party/rust/ash/src/extensions/khr/display_swapchain.rs [Lines] 8-16 [Old Code] let swapchain_fn = vk::KhrDisplaySwapchainFn::load(|name| unsafe { mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) }); [Fixed Code] let handle = device.handle(); let fp = vk::KhrDisplaySwapchainFn::load(|name| unsafe { mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) }); While this change appears to be primarily about code organization, there's a slight possibility it could relate to memory safety by ensuring the device handle is captured before the unsafe block. However, this seems unlikely to be an actual security fix. The changes seem to be primarily code quality improvements rather than security fixes. No obvious vulnerabilities were introduced or fixed in this diff. The unsafe block remains the same, just moved to a slightly different location in the code flow.
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/base/content/browser-ctrlTab.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/browser/base/content/browser-ctrlTab.js@@ -575,6 +575,13 @@ this.removeClosingTabFromUI(event.target); } break;+ case "TabHide":+ this.detachTab(event.target);+ break;+ case "TabShow":+ this.attachTab(event.target);+ this._sortRecentlyUsedTabs();+ break; case "keydown": this.onKeyDown(event); break;@@ -640,11 +647,17 @@ aCallback(urls); },-+ _sortRecentlyUsedTabs() {+ this._recentlyUsedTabs.sort(+ (tab1, tab2) => tab2.lastAccessed - tab1.lastAccessed+ );+ }, _initRecentlyUsedTabs() {- this._recentlyUsedTabs = Array.prototype.filter- .call(gBrowser.tabs, tab => !tab.closing)- .sort((tab1, tab2) => tab2.lastAccessed - tab1.lastAccessed);+ this._recentlyUsedTabs = Array.prototype.filter.call(+ gBrowser.tabs,+ tab => !tab.closing && !tab.hidden+ );+ this._sortRecentlyUsedTabs(); }, _init: function ctrlTab__init(enable) {@@ -659,6 +672,8 @@ tabContainer[toggleEventListener]("TabAttrModified", this); tabContainer[toggleEventListener]("TabSelect", this); tabContainer[toggleEventListener]("TabClose", this);+ tabContainer[toggleEventListener]("TabHide", this);+ tabContainer[toggleEventListener]("TabShow", this); if (enable) { Services.els.addSystemEventListener(document, "keydown", this, false);
Here's the analysis of the provided code diff for security fixes: 1. Vulnerability Existed: not sure Potential Tab State Management Issue [browser/base/content/browser-ctrlTab.js] [Lines 575-583, 659-672] [Old Code] No handling for TabHide/TabShow events [Fixed Code] Added event handlers for TabHide/TabShow events and proper tab state management 2. Vulnerability Existed: not sure Potential Race Condition in Tab Sorting [browser/base/content/browser-ctrlTab.js] [Lines 640-647] [Old Code] Sorting done only during initialization [Fixed Code] Added _sortRecentlyUsedTabs() method and calls it when needed 3. Vulnerability Existed: not sure Potential Hidden Tab Leak [browser/base/content/browser-ctrlTab.js] [Lines 647-657] [Old Code] Did not filter out hidden tabs [Fixed Code] Added check for !tab.hidden in _initRecentlyUsedTabs() Note: While these changes appear to be more about functionality improvements and bug fixes rather than explicit security vulnerabilities, they could potentially address subtle security-related issues around tab state management and information leakage. The changes ensure proper handling of tab visibility states and maintain consistent sorting of recently used tabs, which could have security implications in certain scenarios.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/toolkit/components/extensions/webidl-api/ExtensionTest.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/toolkit/components/extensions/webidl-api/ExtensionTest.cpp@@ -322,7 +322,7 @@ } if (NS_WARN_IF(!AssertMatchInternal(aCx, exn, aExpectedError,- u"Function did throw, expected error"_ns,+ u"Function threw, expecting error"_ns, aMessage, nullptr, aRv))) { ThrowUnexpectedError(aCx, aRv); }@@ -359,8 +359,9 @@ aPromise->AppendNativeHandler(handler); }- MOZ_CAN_RUN_SCRIPT void ResolvedCallback(- JSContext* aCx, JS::Handle<JS::Value> aValue) override {+ MOZ_CAN_RUN_SCRIPT void ResolvedCallback(JSContext* aCx,+ JS::Handle<JS::Value> aValue,+ ErrorResult& aRv) override { nsAutoJSString expectedErrorSource; JS::Rooted<JS::Value> rootedExpectedMatchValue(aCx, mExpectedMatchValue); JS::Rooted<JSString*> expectedErrorToSource(@@ -402,8 +403,9 @@ mOutPromise->MaybeResolve(JS::UndefinedValue()); }- MOZ_CAN_RUN_SCRIPT void RejectedCallback(- JSContext* aCx, JS::Handle<JS::Value> aValue) override {+ MOZ_CAN_RUN_SCRIPT void RejectedCallback(JSContext* aCx,+ JS::Handle<JS::Value> aValue,+ ErrorResult& aRv) override { JS::Rooted<JS::Value> expectedMatchRooted(aCx, mExpectedMatchValue); ErrorResult erv;
Based on the provided code diff, I don't see any clear security vulnerabilities being fixed. The changes appear to be primarily textual/descriptive changes and adding ErrorResult parameters to callback functions. Here's the analysis: 1. Vulnerability Existed: no Textual Change [File] [Lines 322-323] Old Code: `u"Function did throw, expected error"_ns` Fixed Code: `u"Function threw, expecting error"_ns` 2. Vulnerability Existed: no Callback Signature Change [File] [Lines 359-361] Old Code: `MOZ_CAN_RUN_SCRIPT void ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) override` Fixed Code: `MOZ_CAN_RUN_SCRIPT void ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue, ErrorResult& aRv) override` 3. Vulnerability Existed: no Callback Signature Change [File] [Lines 402-404] Old Code: `MOZ_CAN_RUN_SCRIPT void RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) override` Fixed Code: `MOZ_CAN_RUN_SCRIPT void RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue, ErrorResult& aRv) override` The changes appear to be: 1. A simple text message change in an error string 2. Adding ErrorResult parameters to callback functions for better error handling 3. No obvious security vulnerabilities are being addressed in these changes These modifications seem focused on improving code clarity and error handling rather than fixing security issues.
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-contain/container-queries/container-for-shadow-dom.tentative.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-contain/container-queries/container-for-shadow-dom.tentative.html@@ -15,7 +15,8 @@ #inclusive-ancestor-slotted-before, #inclusive-ancestor-host-before, #inclusive-ancestor-part-before,- #inclusive-ancestor-inner-part {+ #inclusive-ancestor-inner-part,+ #inclusive-ancestor-slot-fallback { width: 400px; container-type: inline-size; }@@ -128,7 +129,7 @@ </template> <style> #t6 {- width: 200px;+ width: 400px; container-type: inline-size; } </style>@@ -156,6 +157,14 @@ </div> <div id="inclusive-ancestor-part-before">+ <style>+ @container size(width = 400px) {+ #inclusive-ancestor-part-before > div::part(part)::before {+ content: "X";+ color: green;+ }+ }+ </style> <div> <template shadowroot="open"> <style>@@ -168,21 +177,13 @@ <span id="t8" part="part"></span> </div> </template>- <style>- @container size(width = 400px) {- #inclusive-ancestor-part > div::part(part)::before {- content: "X";- color: green;- }- }- </style> </div> </div> <div id="inclusive-ancestor-inner-part"> <style> @container size(width = 400px) {- #inclusive-ancestor-part > div::part(inner-part) { color: green; }+ #inclusive-ancestor-inner-part > div::part(inner-part) { color: green; } } </style> <div>@@ -210,6 +211,23 @@ </div> </div>+<div id="inclusive-ancestor-slot-fallback">+ <div><template shadowroot="open">+ <style>+ div {+ width: 200px;+ container-type: inline-size;+ }+ @container size(width = 200px) {+ #t10 { color: green; }+ }+ </style>+ <div>+ <slot><span id="t10"></span></slot>+ </div>+ </template></div>+</div>+ <script> setup(() => assert_implements_container_queries());@@ -242,17 +260,17 @@ test(() => { const t6 = document.querySelector("#t6");- assert_equals(getComputedStyle(t6).color, green);+ assert_equals(getComputedStyle(t6, "::before").color, green); }, "Match container for ::before in ::slotted selector's originating element tree"); test(() => { const t7 = document.querySelector("#t7");- assert_equals(getComputedStyle(t7).color, green);+ assert_equals(getComputedStyle(t7, "::before").color, green); }, "Match container in outer tree for :host::before"); test(() => { const t8 = document.querySelector("#inclusive-ancestor-part-before > div").shadowRoot.querySelector("#t8");- assert_equals(getComputedStyle(t8).color, green);+ assert_equals(getComputedStyle(t8, "::before").color, green); }, "Match container for ::before in ::part selector's originating element tree"); test(() => {@@ -261,4 +279,9 @@ const t9 = innerhost.shadowRoot.querySelector("#t9"); assert_equals(getComputedStyle(t9).color, green); }, "Match container for ::part selector's originating element tree for exportparts");++ test(() => {+ const t10 = document.querySelector("#inclusive-ancestor-slot-fallback > div").shadowRoot.querySelector("#t10");+ assert_equals(getComputedStyle(t10).color, green);+ }, "Match container for slot light tree child fallback"); </script>
After analyzing the provided code diff, I don't find any clear security vulnerabilities. The changes appear to be related to CSS container queries and shadow DOM functionality tests, primarily focusing on styling and layout adjustments rather than security fixes. Here's the analysis following your requested format: 1. Vulnerability Existed: no No security vulnerability found [File] [Lines 15-16, 128-130, 156-170, 210-225, 260-264] The changes are test case adjustments and CSS selector corrections for container queries in shadow DOM contexts. 2. Vulnerability Existed: no No security vulnerability found [File] [Lines 242-283] The test assertions were updated to check ::before pseudo-elements and added a new test case for slot fallback content, but these are test improvements, not security fixes. The diff shows: 1. Added a new test case for slot fallback content 2. Fixed CSS selectors to properly target elements 3. Adjusted test assertions to check pseudo-elements 4. Corrected container width values 5. Reorganized style blocks for better test organization None of these changes appear to address security vulnerabilities, but rather improve test accuracy and coverage for CSS container queries in shadow DOM contexts.
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.