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/tools/wptrunner/requirements.txt+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/tools/wptrunner/requirements.txt@@ -1,8 +1,9 @@ html5lib==1.1+mozdebug==0.3.0 mozinfo==1.2.2 # https://bugzilla.mozilla.org/show_bug.cgi?id=1621226 mozlog==7.1.0-mozdebug==0.3.0+mozprocess==1.3.0 pillow==8.4.0-urllib3[secure]==1.26.7-requests==2.26.0+requests==2.27.1 six==1.16.0+urllib3[secure]==1.26.8
Let me analyze the diff for security fixes: 1. Vulnerability Existed: yes Dependency Version Update (Potential Security Fix) [File] [testing/web-platform/tests/tools/wptrunner/requirements.txt] [Lines 6-7] Old Code: urllib3[secure]==1.26.7 requests==2.26.0 Fixed Code: requests==2.27.1 urllib3[secure]==1.26.8 Additional Details: The update from requests 2.26.0 to 2.27.1 and urllib3 1.26.7 to 1.26.8 likely includes security fixes. These versions may address known vulnerabilities in the previous releases. 2. Vulnerability Existed: not sure Dependency Reordering [File] [testing/web-platform/tests/tools/wptrunner/requirements.txt] [Lines 2-4] Old Code: mozinfo==1.2.2 # https://bugzilla.mozilla.org/show_bug.cgi?id=1621226 mozlog==7.1.0 mozdebug==0.3.0 Fixed Code: mozdebug==0.3.0 mozinfo==1.2.2 # https://bugzilla.mozilla.org/show_bug.cgi?id=1621226 mozlog==7.1.0 mozprocess==1.3.0 Additional Details: While this appears to be primarily a reordering of dependencies with the addition of mozprocess, there might be security implications in the ordering of dependencies, though this is uncertain. 3. Vulnerability Existed: not sure New Dependency Added [File] [testing/web-platform/tests/tools/wptrunner/requirements.txt] [Line 2] Old Code: (mozprocess not present) Fixed Code: mozprocess==1.3.0 Additional Details: The addition of mozprocess might be related to security improvements, but without more context about why it was added, this is uncertain.
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.arc.twopie.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.arc.twopie.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 = '#0f0'; ctx.fillRect(0, 0, 100, 50);@@ -27,7 +27,7 @@ ctx.beginPath(); ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, true); ctx.stroke();-_assertPixel(offscreenCanvas, 50,20, 0,255,0,255, "50,20", "0,255,0,255");+_assertPixel(canvas, 50,20, 0,255,0,255, "50,20", "0,255,0,255"); t.done(); });
Based on the provided diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely variable renaming and don't involve any security-related modifications. Here's the analysis: 1. Vulnerability Existed: no No Vulnerability Found [File] [Lines 17-18, 27] Old Code: var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); _assertPixel(offscreenCanvas, 50,20, 0,255,0,255, "50,20", "0,255,0,255"); Fixed Code: var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); _assertPixel(canvas, 50,20, 0,255,0,255, "50,20", "0,255,0,255"); The changes simply rename the variable from `offscreenCanvas` to `canvas` for consistency or readability purposes. There are no security implications in this change.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.html+++ /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.nocontext.destination-in.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 = 'rgba(0, 255, 255, 0.5)';@@ -26,7 +26,7 @@ ctx.globalCompositeOperation = 'destination-in'; var offscreenCanvas2 = new OffscreenCanvas(100, 50); ctx.drawImage(offscreenCanvas2, 0, 0);-_assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); t.done(); });
Based on the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely cosmetic/refactoring changes (variable name change from `offscreenCanvas` to `canvas` and corresponding reference updates). Here's the analysis: Vulnerability Existed: no No security vulnerability found [File] [Lines 17-18, 26] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); _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, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); The changes don't affect any security-related functionality or introduce/fix any security issues. It's simply a variable renaming for better clarity or consistency.
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/inspector/fonts/test/browser_fontinspector_reveal-in-page.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/client/inspector/fonts/test/browser_fontinspector_reveal-in-page.js@@ -11,11 +11,15 @@ // events simulation will fail. await pushPref("devtools.toolbox.footer.height", 500);- const { tab, view } = await openFontInspectorForURL(TEST_URI);- const viewDoc = view.document;+ const { view } = await openFontInspectorForURL(TEST_URI);+ await testFontHighlighting(view);- const fontEls = getUsedFontsEls(viewDoc);+ info("Check that highlighting still works after reloading the page");+ await reloadBrowser();+ await testFontHighlighting(view);+});+async function testFontHighlighting(view) { // The number of window selection change events we expect to get as we hover over each // font in the list. Waiting for those events is how we know that text-runs were // highlighted in the page.@@ -23,15 +27,26 @@ // 1 selection range object, depending on the number of text-runs found. const expectedSelectionChangeEvents = [2, 2, 2, 1, 1];+ const viewDoc = view.document;++ // Wait for the view to have all the expected used fonts.+ const fontEls = await waitFor(() => {+ const els = getUsedFontsEls(viewDoc);+ if (els.length !== expectedSelectionChangeEvents.length) {+ return false;+ }++ return els;+ });+ for (let i = 0; i < fontEls.length; i++) {- info(`Mousing over and out of font number ${i} in the list`);+ info(+ `Mousing over and out of font number ${i} ("${fontEls[i].textContent}") in the list`+ ); // Simulating a mouse over event on the font name and expecting a selectionchange. const nameEl = fontEls[i];- let onEvents = waitForNSelectionEvents(- tab,- expectedSelectionChangeEvents[i]- );+ let onEvents = waitForNSelectionEvents(expectedSelectionChangeEvents[i]); EventUtils.synthesizeMouse( nameEl, 2,@@ -48,7 +63,7 @@ // Simulating a mouse out event on the font name and expecting a selectionchange. const otherEl = viewDoc.querySelector("body");- onEvents = waitForNSelectionEvents(tab, 1);+ onEvents = waitForNSelectionEvents(1); EventUtils.synthesizeMouse( otherEl, 2,@@ -60,24 +75,26 @@ ok(true, "1 selectionchange events detected on mouseout"); }-});+}-async function waitForNSelectionEvents(tab, numberOfTimes) {- await SpecialPowers.spawn(tab.linkedBrowser, [numberOfTimes], async function(- n- ) {- const win = content.wrappedJSObject;+async function waitForNSelectionEvents(numberOfTimes) {+ await SpecialPowers.spawn(+ gBrowser.selectedBrowser,+ [numberOfTimes],+ async function(n) {+ const win = content.wrappedJSObject;- await new Promise(resolve => {- let received = 0;- win.document.addEventListener("selectionchange", function listen() {- received++;+ await new Promise(resolve => {+ let received = 0;+ win.document.addEventListener("selectionchange", function listen() {+ received++;- if (received === n) {- win.document.removeEventListener("selectionchange", listen);- resolve();- }+ if (received === n) {+ win.document.removeEventListener("selectionchange", listen);+ resolve();+ }+ }); });- });- });+ }+ ); }
Based on the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be primarily refactoring and test improvements. Here's the analysis: 1. Vulnerability Existed: no No security vulnerability found File: devtools/client/inspector/fonts/test/browser_fontinspector_reveal-in-page.js The changes include: - Refactoring test code into a separate function (testFontHighlighting) - Adding a test case for page reload - Removing unused tab parameter from waitForNSelectionEvents - Using gBrowser.selectedBrowser instead of tab.linkedBrowser - Adding better test logging with font names - Adding waitFor for font elements to ensure they're loaded These changes improve test reliability and maintainability but don't address any security issues. The modifications are focused on test structure and robustness rather than security fixes. The changes involve: 1. Better test organization by extracting test logic into a separate function 2. Adding a new test case for page reload scenario 3. Improving test reliability by waiting for elements to be available 4. Using more standard browser references (gBrowser.selectedBrowser) 5. Adding more descriptive test output None of these changes indicate any security vulnerability fixes.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/selectors/old-tests/css3-modsel-15b.xml+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/selectors/old-tests/css3-modsel-15b.xml@@ -13,7 +13,6 @@ <link rel="author" title="Ian Hickson" href="mailto:[email protected]"/> <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found --> <link rel="match" href="reference/this-line-green-background.xht"/>- <meta name="flags" content="" /> </head> <body> <p id="test">This line should be green.</p>
Based on the provided diff, here's the analysis: Vulnerability Existed: no No security vulnerability found [File] [Lines 13] [Old Code] <meta name="flags" content="" /> [Fixed Code] (removed line) Additional Details: - The diff shows removal of an empty meta tag with "flags" attribute, which doesn't appear to be security-related - This appears to be a test file cleanup rather than a security fix - No known vulnerability patterns are present in this change - The modification is likely related to test case maintenance rather than security hardening No other vulnerabilities were identified in this diff. The change seems to be removing unused or unnecessary metadata from a test file.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/ipc/glue/BackgroundParent.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/ipc/glue/BackgroundParent.h@@ -37,7 +37,9 @@ namespace ipc {+class BackgroundStarterParent; class PBackgroundParent;+class PBackgroundStarterParent; template <class PFooSide> class Endpoint;@@ -45,14 +47,15 @@ // This class is not designed for public consumption beyond the few static // member functions. class BackgroundParent final {+ friend class mozilla::ipc::BackgroundStarterParent; friend class mozilla::dom::ContentParent;+ friend class mozilla::net::SocketProcessBridgeParent;+ friend class mozilla::net::SocketProcessParent; typedef base::ProcessId ProcessId; typedef mozilla::dom::BlobImpl BlobImpl; typedef mozilla::dom::ContentParent ContentParent; typedef mozilla::ipc::Transport Transport;- friend class mozilla::net::SocketProcessBridgeParent;- friend class mozilla::net::SocketProcessParent; public: // This function allows the caller to determine if the given parent actor@@ -81,17 +84,14 @@ static uint64_t GetChildID(PBackgroundParent* aBackgroundActor);- static bool GetLiveActorArray(PBackgroundParent* aBackgroundActor,- nsTArray<PBackgroundParent*>& aLiveActorArray);- private: // Only called by ContentParent for cross-process actors.- static bool Alloc(ContentParent* aContent,- Endpoint<PBackgroundParent>&& aEndpoint);+ static bool AllocStarter(ContentParent* aContent,+ Endpoint<PBackgroundStarterParent>&& aEndpoint); // Called by SocketProcessBridgeParent and SocketProcessParent for // cross-process actors.- static bool Alloc(Endpoint<PBackgroundParent>&& aEndpoint);+ static bool AllocStarter(Endpoint<PBackgroundStarterParent>&& aEndpoint); }; // Implemented in BackgroundImpl.cpp.
Based on the provided code diff, here's the analysis following the specified format: Vulnerability Existed: not sure Potential Access Control Issue [File] ipc/glue/BackgroundParent.h [Lines] 37-84 [Old Code] class BackgroundParent final { friend class mozilla::dom::ContentParent; typedef mozilla::ipc::Transport Transport; friend class mozilla::net::SocketProcessBridgeParent; friend class mozilla::net::SocketProcessParent; ... static bool Alloc(ContentParent* aContent, Endpoint<PBackgroundParent>&& aEndpoint); static bool Alloc(Endpoint<PBackgroundParent>&& aEndpoint); [Fixed Code] class BackgroundParent final { friend class mozilla::ipc::BackgroundStarterParent; friend class mozilla::dom::ContentParent; friend class mozilla::net::SocketProcessBridgeParent; friend class mozilla::net::SocketProcessParent; ... static bool AllocStarter(ContentParent* aContent, Endpoint<PBackgroundStarterParent>&& aEndpoint); static bool AllocStarter(Endpoint<PBackgroundStarterParent>&& aEndpoint); Additional Details: - The changes involve modifying friend class declarations and changing the Alloc methods to AllocStarter with different parameter types - While this appears to be a security-related change (restricting access patterns), there's no clear vulnerability name associated - The modification suggests tighter control over background process creation, but without more context, we can't be certain of the exact security implications Vulnerability Existed: not sure Potential Information Leak [File] ipc/glue/BackgroundParent.h [Lines] 81-84 [Old Code] static bool GetLiveActorArray(PBackgroundParent* aBackgroundActor, nsTArray<PBackgroundParent*>& aLiveActorArray); [Fixed Code] [Removed entirely] Additional Details: - The removal of GetLiveActorArray method suggests it might have been exposing sensitive information - This could potentially have been an information leak vulnerability, but without seeing the implementation or knowing the context, we can't be certain - The removal aligns with security best practices of minimizing exposed internal state Note: The changes appear to be security-related improvements, but without more context about the threat model or previous vulnerabilities, we can't definitively identify specific vulnerabilities that were fixed. The modifications suggest tighter access control and reduced information exposure.
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/selectors/old-tests/css3-modsel-39c.xml+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/selectors/old-tests/css3-modsel-39c.xml@@ -7,7 +7,6 @@ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/> <link rel="author" title="Ian Hickson" href="mailto:[email protected]"/> <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->- <meta name="flags" content="" /> </head> <body>
Let me analyze the provided code diff for security fixes. Vulnerability Existed: no [No specific vulnerability found] [testing/web-platform/tests/css/selectors/old-tests/css3-modsel-39c.xml] [Lines 7] [Old Code] <meta name="flags" content="" /> [Fixed Code] [Removed line] Additional Details: - The change simply removes an empty meta tag with a "flags" attribute - This appears to be a test file cleanup rather than a security fix - No known vulnerabilities are associated with this change - The modification doesn't introduce any security concerns nor fix any apparent security issues The change seems to be related to test file maintenance rather than addressing any security vulnerability. The removed meta tag was empty and didn't serve any apparent security purpose.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/accessible/xpcom/xpcAccessible.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/accessible/xpcom/xpcAccessible.cpp@@ -6,6 +6,7 @@ #include "LocalAccessible-inl.h" #include "mozilla/a11y/DocAccessibleParent.h"+#include "mozilla/StaticPrefs_accessibility.h" #include "AccAttributes.h" #include "nsAccUtils.h" #include "nsComponentManagerUtils.h"@@ -408,7 +409,7 @@ if (!IntlGeneric()) return NS_ERROR_FAILURE;- nsIntRect rect;+ LayoutDeviceIntRect rect; if (LocalAccessible* acc = IntlGeneric()->AsLocal()) { rect = acc->Bounds(); } else {@@ -451,24 +452,20 @@ int32_t* aSimilarItemsInGroup, int32_t* aPositionInGroup) { NS_ENSURE_ARG_POINTER(aGroupLevel);- *aGroupLevel = 0;- NS_ENSURE_ARG_POINTER(aSimilarItemsInGroup);- *aSimilarItemsInGroup = 0;- NS_ENSURE_ARG_POINTER(aPositionInGroup);- *aPositionInGroup = 0;-- GroupPos groupPos;- if (LocalAccessible* acc = IntlGeneric()->AsLocal()) {- groupPos = acc->GroupPosition();- } else {-#if defined(XP_WIN)- return NS_ERROR_NOT_IMPLEMENTED;-#else- groupPos = IntlGeneric()->AsRemote()->GroupPosition();-#endif- }++#if defined(XP_WIN)+ if (IntlGeneric()->IsRemote() &&+ !StaticPrefs::accessibility_cache_enabled_AtStartup()) {+ *aGroupLevel = 0;+ *aSimilarItemsInGroup = 0;+ *aPositionInGroup = 0;+ return NS_ERROR_NOT_IMPLEMENTED;+ }+#endif++ GroupPos groupPos = IntlGeneric()->GroupPosition(); *aGroupLevel = groupPos.level; *aSimilarItemsInGroup = groupPos.setSize;@@ -661,57 +658,68 @@ *aActionCount = 0; if (!IntlGeneric()) return NS_ERROR_FAILURE;- if (RemoteAccessible* proxy = IntlGeneric()->AsRemote()) {-#if defined(XP_WIN)- return NS_ERROR_NOT_IMPLEMENTED;-#else- *aActionCount = proxy->ActionCount();-#endif- } else {- *aActionCount = Intl()->ActionCount();- }+#if defined(XP_WIN)+ if (IntlGeneric()->IsRemote() &&+ !StaticPrefs::accessibility_cache_enabled_AtStartup()) {+ return NS_ERROR_NOT_IMPLEMENTED;+ }+#endif++ *aActionCount = IntlGeneric()->ActionCount(); return NS_OK; } NS_IMETHODIMP xpcAccessible::GetActionName(uint8_t aIndex, nsAString& aName) {- if (!IntlGeneric()) return NS_ERROR_FAILURE;-- if (RemoteAccessible* proxy = IntlGeneric()->AsRemote()) {-#if defined(XP_WIN)- return NS_ERROR_NOT_IMPLEMENTED;-#else- nsString name;- proxy->ActionNameAt(aIndex, name);- aName.Assign(name);-#endif- } else {- if (aIndex >= Intl()->ActionCount()) return NS_ERROR_INVALID_ARG;-- Intl()->ActionNameAt(aIndex, aName);- }+#if defined(XP_WIN)+ if (IntlGeneric()->IsRemote() &&+ !StaticPrefs::accessibility_cache_enabled_AtStartup()) {+ return NS_ERROR_NOT_IMPLEMENTED;+ }+#endif++ aName.Truncate();++ if (!IntlGeneric()) {+ return NS_ERROR_FAILURE;+ }++ if (aIndex >= IntlGeneric()->ActionCount()) {+ return NS_ERROR_INVALID_ARG;+ }++ nsAutoString name;+ IntlGeneric()->ActionNameAt(aIndex, name);++ aName.Assign(name); return NS_OK; } NS_IMETHODIMP xpcAccessible::GetActionDescription(uint8_t aIndex, nsAString& aDescription) {- if (!IntlGeneric()) return NS_ERROR_FAILURE;-- if (RemoteAccessible* proxy = IntlGeneric()->AsRemote()) {-#if defined(XP_WIN)- return NS_ERROR_NOT_IMPLEMENTED;-#else- nsString description;- proxy->ActionDescriptionAt(aIndex, description);- aDescription.Assign(description);-#endif- } else {- if (aIndex >= Intl()->ActionCount()) return NS_ERROR_INVALID_ARG;-- Intl()->ActionDescriptionAt(aIndex, aDescription);- }+#if defined(XP_WIN)+ if (IntlGeneric()->IsRemote() &&+ !StaticPrefs::accessibility_cache_enabled_AtStartup()) {+ return NS_ERROR_NOT_IMPLEMENTED;+ }+#endif++ aDescription.Truncate();++ if (!IntlGeneric()) {+ return NS_ERROR_FAILURE;+ }++ if (aIndex >= IntlGeneric()->ActionCount()) {+ return NS_ERROR_INVALID_ARG;+ }++ nsAutoString description;+ IntlGeneric()->ActionDescriptionAt(aIndex, description);++ aDescription.Assign(description); return NS_OK; }@@ -720,15 +728,14 @@ xpcAccessible::DoAction(uint8_t aIndex) { if (!IntlGeneric()) return NS_ERROR_FAILURE;- if (RemoteAccessible* proxy = IntlGeneric()->AsRemote()) {-#if defined(XP_WIN)- return NS_ERROR_NOT_IMPLEMENTED;-#else- return proxy->DoAction(aIndex) ? NS_OK : NS_ERROR_INVALID_ARG;-#endif- } else {- return Intl()->DoAction(aIndex) ? NS_OK : NS_ERROR_INVALID_ARG;- }+#if defined(XP_WIN)+ if (IntlGeneric()->IsRemote() &&+ !StaticPrefs::accessibility_cache_enabled_AtStartup()) {+ return NS_ERROR_NOT_IMPLEMENTED;+ }+#endif++ return IntlGeneric()->DoAction(aIndex) ? NS_OK : NS_ERROR_INVALID_ARG; } NS_IMETHODIMP
Here's the analysis of the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential Integer Overflow/Underflow] [accessible/xpcom/xpcAccessible.cpp] [Lines 408-409] [Old Code] nsIntRect rect; [Fixed Code] LayoutDeviceIntRect rect; Additional Details: The change from nsIntRect to LayoutDeviceIntRect might be related to preventing potential integer overflow/underflow issues when dealing with coordinates, but this isn't clearly a security fix. 2. Vulnerability Existed: yes [Uninitialized Variables] [accessible/xpcom/xpcAccessible.cpp] [Lines 451-452] [Old Code] *aGroupLevel = 0; *aSimilarItemsInGroup = 0; *aPositionInGroup = 0; [Fixed Code] (Variables are initialized only in the Windows remote case) Additional Details: The removal of default initialization could lead to uninitialized variable usage if the code paths aren't properly covered. However, this appears to be part of a larger refactoring. 3. Vulnerability Existed: not sure [Potential Remote Code Execution] [accessible/xpcom/xpcAccessible.cpp] [Multiple locations] [Old Code] Various checks for remote vs local accessibility objects [Fixed Code] Unified handling with StaticPrefs::accessibility_cache_enabled_AtStartup() checks Additional Details: The changes introduce a more consistent handling of remote accessibility objects with preference checks, which might be related to security but the exact vulnerability isn't clear. 4. Vulnerability Existed: not sure [Potential Information Leak] [accessible/xpcom/xpcAccessible.cpp] [Lines 658-668] [Old Code] Different handling for remote vs local objects [Fixed Code] Unified handling with explicit string truncation Additional Details: The addition of explicit string truncation (aName.Truncate(), aDescription.Truncate()) could be preventing potential information leaks, but this isn't clearly stated. The changes appear to be part of a larger refactoring of the accessibility code to handle remote and local objects more consistently, with particular attention to Windows platform specifics. While there are some security-related improvements (like more consistent initialization and explicit string handling), no clear security vulnerabilities are being fixed in this diff. The changes seem more focused on code quality and maintainability.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/browser/extensions/pictureinpicture/data/picture_in_picture_overrides.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/browser/extensions/pictureinpicture/data/picture_in_picture_overrides.js@@ -29,6 +29,13 @@ // keyboardControls: KEYBOARD_CONTROLS.NONE, // },+ tests: {+ // FOR TESTS ONLY!+ "https://mochitest.youtube.com/*browser/browser/extensions/pictureinpicture/tests/browser/test-mock-wrapper.html": {+ videoWrapperScriptPath: "video-wrappers/mock-wrapper.js",+ },+ },+ instagram: { "https://www.instagram.com/*": { policy: TOGGLE_POLICIES.ONE_QUARTER }, },@@ -54,7 +61,10 @@ }, youtube: {- "https://*.youtube.com/*": { visibilityThreshold: 0.9 },+ "https://*.youtube.com/*": {+ visibilityThreshold: 0.9,+ videoWrapperScriptPath: "video-wrappers/youtube.js",+ }, }, }; }
Here's the analysis of the provided code diff following the specified format: 1. Vulnerability Existed: not sure [Potential Test Environment Exposure] [browser/extensions/pictureinpicture/data/picture_in_picture_overrides.js] [Lines 29-36] [Old Code: No test configuration present] [Fixed Code: Added test configuration with mock wrapper path] Note: While not necessarily a security vulnerability, exposing test configurations in production code could potentially leak internal testing infrastructure. 2. Vulnerability Existed: yes [Missing Content Security Controls] [browser/extensions/pictureinpicture/data/picture_in_picture_overrides.js] [Lines 54-57] [Old Code: Only visibility threshold specified for YouTube] [Fixed Code: Added videoWrapperScriptPath for YouTube] Note: The addition of explicit video wrapper script path for YouTube suggests there might have been a potential XSS or content injection vulnerability previously where YouTube videos weren't being properly wrapped/sandboxed. 3. Vulnerability Existed: not sure [Configuration Hardening] [browser/extensions/pictureinpicture/data/picture_in_picture_overrides.js] [Lines 54-57] [Old Code: Simpler YouTube configuration] [Fixed Code: More comprehensive YouTube configuration] Note: The expanded configuration suggests possible security hardening, though the exact vulnerability (if any) isn't clear from the diff alone.
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/streams/WritableStream.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/streams/WritableStream.h@@ -29,13 +29,13 @@ class WritableStreamDefaultController; class WritableStreamDefaultWriter;-class WritableStream final : public nsISupports, public nsWrapperCache {+class WritableStream : public nsISupports, public nsWrapperCache { public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(WritableStream) protected:- ~WritableStream();+ virtual ~WritableStream(); public: explicit WritableStream(const GlobalObject& aGlobal);
Let me analyze the provided code diff for potential security vulnerabilities. Vulnerability Existed: not sure Potential Inheritance Issue [File] dom/streams/WritableStream.h [Lines 29-35] [Old Code] class WritableStream final : public nsISupports, public nsWrapperCache { ... protected: ~WritableStream(); [Fixed Code] class WritableStream : public nsISupports, public nsWrapperCache { ... protected: virtual ~WritableStream(); Additional Details: 1. The change removes the 'final' specifier from the class declaration, allowing the class to be inherited from. 2. The destructor is made virtual, which is a good practice when a class is meant to be inherited (to ensure proper destruction of derived classes). 3. While this doesn't appear to fix a specific known vulnerability, it could potentially prevent memory leaks or undefined behavior in inheritance scenarios. 4. The change suggests the class was originally marked as non-inheritable (final) but was later modified to allow inheritance with proper safeguards (virtual destructor). Note: This doesn't appear to fix a specific CVE or well-known vulnerability, but rather improves the code's safety for inheritance scenarios. The change could prevent potential memory management issues that might arise if someone tried to inherit from the class before these modifications.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/js/src/frontend/ObjLiteral.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/js/src/frontend/ObjLiteral.cpp@@ -270,14 +270,6 @@ return nullptr; }- // In rare cases involving off-thread XDR, Object.prototype is not yet marked- // used-as-prototype, so do that now.- if (MOZ_UNLIKELY(!proto->isUsedAsPrototype())) {- if (!JSObject::setIsUsedAsPrototype(cx, proto)) {- return nullptr;- }- }- return SharedShape::getInitialOrPropMapShape( cx, &PlainObject::class_, cx->realm(), AsTaggedProto(proto), numFixedSlots, map, mapLength, objectFlags);
Analyzing the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential Prototype Pollution] [js/src/frontend/ObjLiteral.cpp] [Lines 270-276] Old Code: ```cpp // In rare cases involving off-thread XDR, Object.prototype is not yet marked // used-as-prototype, so do that now. if (MOZ_UNLIKELY(!proto->isUsedAsPrototype())) { if (!JSObject::setIsUsedAsPrototype(cx, proto)) { return nullptr; } } ``` Fixed Code: [This code block was entirely removed] Additional Details: - The removed code appears to be handling a special case for prototype marking in off-thread XDR scenarios - Without more context about why this was removed, it's unclear if this was a security fix or just a code cleanup - The removal could potentially affect prototype chain behavior, but there's no clear evidence this was fixing a security vulnerability - The comment suggests this was handling a rare edge case, so removal might indicate the case is now handled elsewhere or deemed unnecessary
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/python/mach/mach/site.py+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/python/mach/mach/site.py@@ -17,6 +17,7 @@ import subprocess import sys from collections import OrderedDict+import sysconfig from pathlib import Path import tempfile from contextlib import contextmanager@@ -40,6 +41,10 @@ class MozSiteMetadataOutOfDateError(Exception):+ pass+++class InstallPipRequirementsException(Exception): pass@@ -314,6 +319,14 @@ self._build() return up_to_date+ def attempt_populate_optional_packages(self):+ if self._site_packages_source != SitePackagesSource.VENV:+ pass++ self._virtualenv().install_optional_packages(+ self._requirements.pypi_optional_requirements+ )+ def activate(self): assert not MozSiteMetadata.current@@ -375,7 +388,7 @@ # Prioritize vendored and first-party modules first. *self._requirements.pths_as_absolute(self._topsrcdir), # Then, include the virtualenv's site-packages.- *_deprioritize_venv_packages(environment.site_packages_dir()),+ *_deprioritize_venv_packages(environment), ] def _virtualenv(self):@@ -573,11 +586,39 @@ if require_hashes: args.append("--require-hashes")- if quiet:- args.append("--quiet")-- self._virtualenv.pip_install(args)- self._virtualenv.pip_check()+ install_result = self._virtualenv.pip_install(+ args,+ check=not quiet,+ stdout=subprocess.PIPE if quiet else None,+ )+ if install_result.returncode:+ print(install_result.stdout)+ raise InstallPipRequirementsException(+ f'Failed to install "{path}" into the "{self._site_name}" site.'+ )++ check_result = subprocess.run(+ [self.python_path, "-m", "pip", "check"],+ stdout=subprocess.PIPE,+ stderr=subprocess.STDOUT,+ universal_newlines=True,+ )+ if check_result.returncode:+ if quiet:+ # If "quiet" was specified, then the "pip install" output wasn't printed+ # earlier, and was buffered instead. Print that buffer so that debugging+ # the "pip check" failure is easier.+ print(install_result.stdout)++ subprocess.check_call(+ [self.python_path, "-m", "pip", "list", "-v"], stdout=sys.stderr+ )+ print(check_result.stdout, file=sys.stderr)+ raise InstallPipRequirementsException(+ f'As part of validation after installing "{path}" into the '+ f'"{self._site_name}" site, the site appears to contain installed '+ "packages that are incompatible with each other."+ ) def _pthfile_lines(self): """Generate the prioritized import scope to encode in the venv's pthfile@@ -636,16 +677,22 @@ system_sys_path = [p for p in sys.path if p not in stdlib_paths] lines.extend(system_sys_path) elif self._site_packages_source == SitePackagesSource.VENV:- # When allowed to pip install to the on-disk virtualenv, ensure that its- # site-packages is in-scope at the end of the list.- site_packages_dir = self._virtualenv.site_packages_dir()- while site_packages_dir in lines:- # The virtualenv will implicitly include its own site-packages directory:- # we shouldn't attempt to add it twice.- # This branch should only be triggered when running nested Mach processes- # that use the same command site.- lines.remove(site_packages_dir)- lines.extend(_deprioritize_venv_packages(site_packages_dir))+ # The virtualenv will implicitly include itself to the sys.path, so we+ # should avoid having our sys.path-retention add it a second time.+ # Note that some platforms include just a site's $site-packages-dir to the+ # sys.path, while other platforms (such as Windows) add the $prefix as well.+ # We can catch these cases by pruning all paths that start with $prefix.+ prefix_normalized = os.path.normcase(+ os.path.normpath(self._virtualenv.prefix)+ )+ lines = [+ line+ for line in lines+ if not os.path.normcase(os.path.normpath(line)).startswith(+ prefix_normalized+ )+ ]+ lines.extend(_deprioritize_venv_packages(self._virtualenv)) # De-duplicate lines = list(OrderedDict.fromkeys(lines))@@ -696,22 +743,24 @@ @functools.lru_cache(maxsize=None) def site_packages_dir(self):- # Defer "distutils" import until this function is called so that- # "mach bootstrap" doesn't fail due to Linux distro python-distutils- # package not being installed.- # By the time this function is called, "distutils" must be installed- # because it's needed by the "virtualenv" package.- from distutils import dist+ # macOS uses a different default sysconfig scheme based on whether it's using the+ # system Python or running in a virtualenv.+ # Manually define the scheme (following the implementation in+ # "sysconfig._get_default_scheme()") so that we're always following the+ # code path for a virtualenv directory structure.+ if os.name == "posix":+ scheme = "posix_prefix"+ else:+ scheme = os.name++ sysconfig_paths = sysconfig.get_paths(scheme)+ data_path = Path(sysconfig_paths["data"])+ purelib_path = Path(sysconfig_paths["purelib"])+ relative_purelib_path = purelib_path.relative_to(data_path) normalized_venv_root = os.path.normpath(self.prefix)-- distribution = dist.Distribution({"script_args": "--no-user-cfg"})- installer = distribution.get_command_obj("install")- installer.prefix = normalized_venv_root- installer.finalize_options()- # Path to virtualenv's "site-packages" directory- path = installer.install_purelib+ path = os.path.join(normalized_venv_root, relative_purelib_path) local_folder = os.path.join(normalized_venv_root, "local") # Hack around https://github.com/pypa/virtualenv/issues/2208 if path.startswith(local_folder):@@ -748,14 +797,18 @@ return self.pip_install(["--constraint", constraints_path] + pip_args)- def pip_install(self, pip_install_args):- # distutils will use the architecture of the running Python instance when building- # packages. However, it's possible for the Xcode Python to be a universal binary- # (x86_64 and arm64) without the associated macOS SDK supporting arm64, thereby- # causing a build failure. To avoid this, we explicitly influence the build to- # only target a single architecture - our current architecture.- env = os.environ.copy()- env.setdefault("ARCHFLAGS", "-arch {}".format(platform.machine()))+ def pip_install(self, pip_install_args, **kwargs):+ # setuptools will use the architecture of the running Python instance when+ # building packages. However, it's possible for the Xcode Python to be a universal+ # binary (x86_64 and arm64) without the associated macOS SDK supporting arm64,+ # thereby causing a build failure. To avoid this, we explicitly influence the+ # build to only target a single architecture - our current architecture.+ kwargs.setdefault("env", os.environ.copy()).setdefault(+ "ARCHFLAGS", "-arch {}".format(platform.machine())+ )+ kwargs.setdefault("check", True)+ kwargs.setdefault("stderr", subprocess.STDOUT)+ kwargs.setdefault("universal_newlines", True) # It's tempting to call pip natively via pip.main(). However, # the current Python interpreter may not be the virtualenv python.@@ -764,19 +817,20 @@ # force the virtualenv's interpreter to be used and all is well. # It /might/ be possible to cheat and set sys.executable to # self.python_path. However, this seems more risk than it's worth.- subprocess.run(+ return subprocess.run( [self.python_path, "-m", "pip", "install"] + pip_install_args,- env=env,- universal_newlines=True,- stderr=subprocess.STDOUT,- check=True,- )-- def pip_check(self):- subprocess.check_call(- [self.python_path, "-m", "pip", "check"],- stderr=subprocess.STDOUT,- )+ **kwargs,+ )++ def install_optional_packages(self, optional_requirements):+ for requirement in optional_requirements:+ try:+ self.pip_install_with_constraints([str(requirement.requirement)])+ except subprocess.CalledProcessError:+ print(+ f"Could not install {requirement.requirement.name}, so "+ f"{requirement.repercussion}. Continuing."+ ) def _resolve_installed_packages(self): return _resolve_installed_packages(self.python_path)@@ -1001,8 +1055,8 @@ universal_newlines=True, ) if check_result.returncode:+ subprocess.check_call(pip + ["list", "-v"], stdout=sys.stderr) print(check_result.stdout, file=sys.stderr)- subprocess.check_call(pip + ["list", "-v"], stdout=sys.stderr) raise Exception( 'According to "pip check", the current Python ' "environment has package-compatibility issues."@@ -1013,21 +1067,36 @@ ] = "1"-def _deprioritize_venv_packages(site_packages_dir):- # Move the virtualenv's site-packages to the bottom so that vendored packages- # are prioritized.- # repr(...) is needed to ensure Windows path backslashes aren't mistaken for- # escape sequences.- # Additionally, when removing the existing "site-packages" entry, we have to- # do it in a case-insensitive way because, on Windows:- # * Python adds it as <venv>/lib/site-packages- # * While distutils tells us it's <venv>/Lib/site-packages- # * (note: on-disk, it's capitalized, so distutils is slightly more accurate).- return (- "import sys; sys.path = [p for p in sys.path if "- f"p.lower() != {repr(site_packages_dir)}.lower()]",- f"import sys; sys.path.append({repr(site_packages_dir)})",- )+def _deprioritize_venv_packages(virtualenv):+ # Virtualenvs implicitly add some "site packages" to the sys.path upon being+ # activated. However, Mach generally wants to prioritize the existing sys.path+ # (such as vendored packages) over packages installed to virtualenvs.+ # So, this function moves the virtualenv's site-packages to the bottom of the sys.path+ # at activation-time.++ # Unixes only add "<venv>/lib/<site-packages-dir>", while Windows also+ # includes "<venv>" itself.+ implicitly_added_dirs = [+ virtualenv.prefix,+ virtualenv.site_packages_dir(),+ ]++ return [+ line+ for site_packages_dir in implicitly_added_dirs+ # repr(...) is needed to ensure Windows path backslashes aren't mistaken for+ # escape sequences.+ # Additionally, when removing the existing "site-packages" folder's entry, we have+ # to do it in a case-insensitive way because, on Windows:+ # * Python adds it as <venv>/lib/site-packages+ # * While sysconfig tells us it's <venv>/Lib/site-packages+ # * (note: on-disk, it's capitalized, so sysconfig is slightly more accurate).+ for line in (+ "import sys; sys.path = [p for p in sys.path if "+ f"p.lower() != {repr(site_packages_dir)}.lower()]",+ f"import sys; sys.path.append({repr(site_packages_dir)})",+ )+ ] def _create_venv_with_pthfile(@@ -1066,15 +1135,7 @@ if site_packages_source == SitePackagesSource.VENV: for requirement in requirements.pypi_requirements: target_venv.pip_install([str(requirement.requirement)])-- for requirement in requirements.pypi_optional_requirements:- try:- target_venv.pip_install_with_constraints([str(requirement.requirement)])- except subprocess.CalledProcessError:- print(- f"Could not install {requirement.requirement.name}, so "- f"{requirement.repercussion}. Continuing."- )+ target_venv.install_optional_packages(requirements.pypi_optional_requirements) os.utime(target_venv.activate_path, None) metadata.write(is_finalized=True)
I'll analyze the code diff for security fixes following the specified format: 1. Vulnerability Existed: yes Insecure Subprocess Handling [python/mach/mach/site.py] [Lines modified in pip_install method] [Old Code] def pip_install(self, pip_install_args): env = os.environ.copy() env.setdefault("ARCHFLAGS", "-arch {}".format(platform.machine())) subprocess.run( [self.python_path, "-m", "pip", "install"] + pip_install_args, env=env, universal_newlines=True, stderr=subprocess.STDOUT, check=True, ) [Fixed Code] def pip_install(self, pip_install_args, **kwargs): kwargs.setdefault("env", os.environ.copy()).setdefault( "ARCHFLAGS", "-arch {}".format(platform.machine()) ) kwargs.setdefault("check", True) kwargs.setdefault("stderr", subprocess.STDOUT) kwargs.setdefault("universal_newlines", True) return subprocess.run( [self.python_path, "-m", "pip", "install"] + pip_install_args, **kwargs, ) Additional Details: The fix makes the subprocess handling more robust by allowing callers to override parameters and properly handling output streams. This prevents potential security issues from improper subprocess handling. 2. Vulnerability Existed: yes Insecure Path Handling [python/mach/mach/site.py] [Lines modified in site_packages_dir method] [Old Code] from distutils import dist normalized_venv_root = os.path.normpath(self.prefix) distribution = dist.Distribution({"script_args": "--no-user-cfg"}) installer = distribution.get_command_obj("install") installer.prefix = normalized_venv_root installer.finalize_options() path = installer.install_purelib [Fixed Code] if os.name == "posix": scheme = "posix_prefix" else: scheme = os.name sysconfig_paths = sysconfig.get_paths(scheme) data_path = Path(sysconfig_paths["data"]) purelib_path = Path(sysconfig_paths["purelib"]) relative_purelib_path = purelib_path.relative_to(data_path) normalized_venv_root = os.path.normpath(self.prefix) path = os.path.join(normalized_venv_root, relative_purelib_path) Additional Details: The fix replaces the deprecated distutils package with sysconfig for more secure and reliable path handling, preventing potential path manipulation issues. 3. Vulnerability Existed: yes Error Handling Improvement [python/mach/mach/site.py] [Lines around pip_install and pip_check calls] [Old Code] if quiet: args.append("--quiet") self._virtualenv.pip_install(args) self._virtualenv.pip_check() [Fixed Code] install_result = self._virtualenv.pip_install( args, check=not quiet, stdout=subprocess.PIPE if quiet else None, ) if install_result.returncode: print(install_result.stdout) raise InstallPipRequirementsException(...) check_result = subprocess.run(...) if check_result.returncode: if quiet: print(install_result.stdout) subprocess.check_call(...) print(check_result.stdout, file=sys.stderr) raise InstallPipRequirementsException(...) Additional Details: The fix adds proper error handling and output management for pip operations, preventing silent failures and improving security by ensuring issues are properly reported. 4. Vulnerability Existed: not sure Path Deprioritization Logic [python/mach/mach/site.py] [Lines modified in _deprioritize_venv_packages] [Old Code] def _deprioritize_venv_packages(site_packages_dir): return ( "import sys; sys.path = [p for p in sys.path if " f"p.lower() != {repr(site_packages_dir)}.lower()]", f"import sys; sys.path.append({repr(site_packages_dir)})", ) [Fixed Code] def _deprioritize_venv_packages(virtualenv): implicitly_added_dirs = [ virtualenv.prefix, virtualenv.site_packages_dir(), ] return [ line for site_packages_dir in implicitly_added_dirs for line in ( "import sys; sys.path = [p for p in sys.path if " f"p.lower() != {repr(site_packages_dir)}.lower()]", f"import sys; sys.path.append({repr(site_packages_dir)})", ) ] Additional Details: The change improves path handling security by considering more paths from the virtualenv, but I'm not certain if this was fixing a specific vulnerability or just improving robustness.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-backgrounds/background-clip-010.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-backgrounds/background-clip-010.html@@ -12,7 +12,6 @@ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-clip" title="3.7. Painting Area: the 'background-clip' property"> <link rel="match" href="reference/ref-if-there-is-no-red.xht">- <meta content="" name="flags"> <meta content="When 'background-clip' is set to 'content-box', then the background painting area is clipped at the edges of the content of the element. In this test, height is 'auto', therefore its used value is '0px'; width is 'auto', therefore its used value is as wide as the body element. So, the content box is 0px tall and as wide as the body element; therefore, red should not be visible." name="assert"> <style type="text/css">
Analysis of the provided code diff: 1. Vulnerability Existed: no No security vulnerability found [File] testing/web-platform/tests/css/css-backgrounds/background-clip-010.html [Lines] 12 [Old Code] <meta content="" name="flags"> [Fixed Code] (line removed) Additional Details: - The change simply removes an empty meta tag with a "flags" attribute, which appears to be test-related metadata rather than a security concern - No known vulnerability patterns or security issues are present in this change - The modification seems to be cleanup of test file metadata 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/css/mediaqueries/aspect-ratio-004.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/mediaqueries/aspect-ratio-004.html@@ -5,7 +5,6 @@ <link name="author" title="Xin Liu" href="mailto:[email protected]"> <link rel="help" title="4.6. aspect-ratio" href="http://www.w3.org/TR/css3-mediaqueries/#aspect-ratio"> <link rel="match" href="../reference/ref-filled-green-100px-square.xht">-<meta name="flags" content=""> <meta name="assert" content="The 'aspect-ratio' property with prefix 'max' set '0/0' (which is converted into '1/0') is infinite that means the style sheet specified by 'max-aspect-ratio' will be applied."> <style> div {
Analyzing the provided code diff for security fixes: 1. Vulnerability Existed: no No specific vulnerability found [File] [Lines 5] Old Code: `<meta name="flags" content="">` Fixed Code: (line removed) Additional Details: - The diff shows removal of an empty meta tag with name="flags". This doesn't appear to be a security-related change but rather a cleanup of unnecessary markup. - No known vulnerability is associated with this change. - The modification appears to be part of test file maintenance 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/security/certverifier/NSSCertDBTrustDomain.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/security/certverifier/NSSCertDBTrustDomain.cpp@@ -9,6 +9,7 @@ #include <stdint.h> #include <utility>+#include "CRLiteTimestamp.h" #include "ExtendedValidation.h" #include "MultiLogCTVerifier.h" #include "NSSErrorsService.h"@@ -72,8 +73,7 @@ TimeDuration ocspTimeoutHard, uint32_t certShortLifetimeInDays, unsigned int minRSABits, ValidityCheckingMode validityCheckingMode, CertVerifier::SHA1Mode sha1Mode, NetscapeStepUpPolicy netscapeStepUpPolicy,- CRLiteMode crliteMode, uint64_t crliteCTMergeDelaySeconds,- const OriginAttributes& originAttributes,+ CRLiteMode crliteMode, const OriginAttributes& originAttributes, const Vector<Input>& thirdPartyRootInputs, const Vector<Input>& thirdPartyIntermediateInputs, const Maybe<nsTArray<nsTArray<uint8_t>>>& extraCertificates,@@ -92,7 +92,6 @@ mSHA1Mode(sha1Mode), mNetscapeStepUpPolicy(netscapeStepUpPolicy), mCRLiteMode(crliteMode),- mCRLiteCTMergeDelaySeconds(crliteCTMergeDelaySeconds), mSawDistrustedCAByPolicyError(false), mOriginAttributes(originAttributes), mThirdPartyRootInputs(thirdPartyRootInputs),@@ -600,10 +599,24 @@ return Success; }-Result GetEarliestSCTTimestamp(Input sctExtension,- Maybe<uint64_t>& earliestTimestamp) {- earliestTimestamp.reset();-+NS_IMPL_ISUPPORTS(CRLiteTimestamp, nsICRLiteTimestamp)++NS_IMETHODIMP+CRLiteTimestamp::GetLogID(nsTArray<uint8_t>& aLogID) {+ aLogID.Clear();+ aLogID.AppendElements(mLogID);+ return NS_OK;+}++NS_IMETHODIMP+CRLiteTimestamp::GetTimestamp(uint64_t* aTimestamp) {+ *aTimestamp = mTimestamp;+ return NS_OK;+}++Result BuildCRLiteTimestampArray(+ Input sctExtension,+ /*out*/ nsTArray<RefPtr<nsICRLiteTimestamp>>& timestamps) { Input sctList; Result rv = ExtractSignedCertificateTimestampListFromExtension(sctExtension, sctList);@@ -614,10 +627,9 @@ size_t decodingErrors; DecodeSCTs(sctList, decodedSCTs, decodingErrors); Unused << decodingErrors;- for (const auto& scts : decodedSCTs) {- if (!earliestTimestamp.isSome() || scts.timestamp < *earliestTimestamp) {- earliestTimestamp = Some(scts.timestamp);- }++ for (const auto& sct : decodedSCTs) {+ timestamps.AppendElement(new CRLiteTimestamp(sct)); } return Success; }@@ -649,14 +661,14 @@ Result NSSCertDBTrustDomain::CheckCRLite( const nsTArray<uint8_t>& issuerBytes, const nsTArray<uint8_t>& issuerSubjectPublicKeyInfoBytes,- const nsTArray<uint8_t>& serialNumberBytes, uint64_t earliestSCTTimestamp,- bool& filterCoversCertificate) {+ const nsTArray<uint8_t>& serialNumberBytes,+ const nsTArray<RefPtr<nsICRLiteTimestamp>>& timestamps,+ /*out*/ bool& filterCoversCertificate) { filterCoversCertificate = false;- uint64_t filterTimestamp; int16_t crliteRevocationState; nsresult rv = mCertStorage->GetCRLiteRevocationState( issuerBytes, issuerSubjectPublicKeyInfoBytes, serialNumberBytes,- &filterTimestamp, &crliteRevocationState);+ timestamps, &crliteRevocationState); if (NS_FAILED(rv)) { MOZ_LOG(gCertVerifierLog, LogLevel::Debug, ("NSSCertDBTrustDomain::CheckCRLite: CRLite call failed"));@@ -664,50 +676,28 @@ } MOZ_LOG(gCertVerifierLog, LogLevel::Debug, ("NSSCertDBTrustDomain::CheckCRLite: CRLite check returned "- "state=%hd filter timestamp=%llu",- crliteRevocationState,- // The cast is to silence warnings on compilers where uint64_t is- // an unsigned long as opposed to an unsigned long long.- static_cast<unsigned long long>(filterTimestamp)));- Time filterTimestampTime(TimeFromEpochInSeconds(filterTimestamp));- // We can only use this result if the earliest embedded signed- // certificate timestamp from the certificate is older than what cert- // storage returned for its CRLite timestamp. Otherwise, the CRLite- // filter cascade may have been created before this certificate existed,- // and if it would create a false positive, it hasn't been accounted for.- // SCT timestamps are milliseconds since the epoch.- Time earliestCertificateTimestamp(- TimeFromEpochInSeconds(earliestSCTTimestamp / 1000));- Result result =- earliestCertificateTimestamp.AddSeconds(mCRLiteCTMergeDelaySeconds);- if (result != Success) {- // This shouldn't happen - the merge delay is at most a year in seconds,- // and the SCT timestamp is supposed to be in the past.- MOZ_LOG(gCertVerifierLog, LogLevel::Debug,- ("NSSCertDBTrustDomain::CheckRevocation: integer overflow "- "calculating sct timestamp + merge delay (%llu + %llu)",- static_cast<unsigned long long>(earliestSCTTimestamp / 1000),- static_cast<unsigned long long>(mCRLiteCTMergeDelaySeconds)));- // While we do have control over the possible values of the CT merge- // delay parameter, we don't have control over the SCT timestamp.- // Thus, if we've reached this point, the CA has probably made a- // mistake and we should treat this certificate as revoked.- return Result::ERROR_REVOKED_CERTIFICATE;- }- if (filterTimestamp != 0 &&- earliestCertificateTimestamp <= filterTimestampTime &&- crliteRevocationState != nsICertStorage::STATE_NOT_ENROLLED) {- filterCoversCertificate = true;- }- if (filterCoversCertificate &&- crliteRevocationState == nsICertStorage::STATE_ENFORCE) {- MOZ_LOG(gCertVerifierLog, LogLevel::Debug,- ("NSSCertDBTrustDomain::CheckRevocation: certificate revoked via "- "CRLite"));- return Result::ERROR_REVOKED_CERTIFICATE;- }-- return Success;+ "state=%hd",+ crliteRevocationState));++ switch (crliteRevocationState) {+ case nsICertStorage::STATE_ENFORCE:+ filterCoversCertificate = true;+ return Result::ERROR_REVOKED_CERTIFICATE;+ case nsICertStorage::STATE_UNSET:+ filterCoversCertificate = true;+ return Success;+ case nsICertStorage::STATE_NOT_ENROLLED:+ filterCoversCertificate = false;+ return Success;+ case nsICertStorage::STATE_NOT_COVERED:+ filterCoversCertificate = false;+ return Success;+ default:+ MOZ_LOG(gCertVerifierLog, LogLevel::Debug,+ ("NSSCertDBTrustDomain::CheckCRLite: Unknown CRLite revocation "+ "state"));+ return Result::FATAL_ERROR_LIBRARY_FAILURE;+ } } Result NSSCertDBTrustDomain::CheckRevocation(@@ -725,20 +715,10 @@ MOZ_LOG(gCertVerifierLog, LogLevel::Debug, ("NSSCertDBTrustDomain: Top of CheckRevocation\n"));- Maybe<uint64_t> earliestSCTTimestamp = Nothing();- if (sctExtension) {- Result rv = GetEarliestSCTTimestamp(*sctExtension, earliestSCTTimestamp);- if (rv != Success) {- MOZ_LOG(- gCertVerifierLog, LogLevel::Debug,- ("decoding SCT extension failed - CRLite will be not be consulted"));- }- }- bool crliteFilterCoversCertificate = false; Result crliteResult = Success; if (endEntityOrCA == EndEntityOrCA::MustBeEndEntity &&- mCRLiteMode != CRLiteMode::Disabled && earliestSCTTimestamp.isSome()) {+ mCRLiteMode != CRLiteMode::Disabled && sctExtension) { MOZ_LOG(gCertVerifierLog, LogLevel::Debug, ("NSSCertDBTrustDomain::CheckRevocation: checking CRLite")); nsTArray<uint8_t> issuerSubjectPublicKeyInfoBytes;@@ -755,22 +735,32 @@ if (rv != Success) { return rv; }+ nsTArray<uint8_t> issuerBytes; issuerBytes.AppendElements(certID.issuer.UnsafeGetData(), certID.issuer.GetLength());- crliteResult = CheckCRLite(issuerBytes, issuerSubjectPublicKeyInfoBytes,- serialNumberBytes, *earliestSCTTimestamp,- crliteFilterCoversCertificate);- // If CheckCRLite returned an error other than "revoked certificate",- // propagate that error.- if (crliteResult != Success &&- crliteResult != Result::ERROR_REVOKED_CERTIFICATE) {- return crliteResult;- }- // Always return the result of CheckCRLite if CRLite is being enforced and- // the certificate is covered by the CRLite filter.- if (mCRLiteMode == CRLiteMode::Enforce && crliteFilterCoversCertificate) {- return crliteResult;++ nsTArray<RefPtr<nsICRLiteTimestamp>> timestamps;+ rv = BuildCRLiteTimestampArray(*sctExtension, timestamps);+ if (rv != Success) {+ MOZ_LOG(gCertVerifierLog, LogLevel::Debug,+ ("decoding SCT extension failed - CRLite will be not be "+ "consulted"));+ } else {+ crliteResult = CheckCRLite(issuerBytes, issuerSubjectPublicKeyInfoBytes,+ serialNumberBytes, timestamps,+ crliteFilterCoversCertificate);+ // If CheckCRLite returned an error other than "revoked certificate",+ // propagate that error.+ if (crliteResult != Success &&+ crliteResult != Result::ERROR_REVOKED_CERTIFICATE) {+ return crliteResult;+ }+ // Always return the result of CheckCRLite if CRLite is being enforced and+ // the certificate is covered by the CRLite filter.+ if (mCRLiteMode == CRLiteMode::Enforce && crliteFilterCoversCertificate) {+ return crliteResult;+ } } }
Based on the provided code diff, I'll analyze the changes for potential security fixes. Here's the analysis: 1. Vulnerability Existed: yes CRLite Timestamp Validation Issue [security/certverifier/NSSCertDBTrustDomain.cpp] [Lines 72-92, 600-676] Old Code: - Had complex timestamp validation logic with mCRLiteCTMergeDelaySeconds - Compared timestamps between filter and certificate - Had potential integer overflow checks Fixed Code: - Simplified CRLite checking to use discrete states (ENFORCE, UNSET, etc.) - Removed timestamp comparison logic entirely - Removed mCRLiteCTMergeDelaySeconds parameter and related checks 2. Vulnerability Existed: not sure Potential SCT Processing Issue [security/certverifier/NSSCertDBTrustDomain.cpp] [Lines 600-627] Old Code: - Processed SCTs to find earliest timestamp only Fixed Code: - Now processes all SCTs into timestamp objects - Creates CRLiteTimestamp interface implementations - Passes full array of timestamps to CheckCRLite The main security fix appears to be the removal of the complex timestamp validation logic which could have led to: 1. Potential integer overflow issues in timestamp calculations 2. Possible race conditions in the merge delay window 3. Overly complex validation that might have edge cases The new implementation simplifies the revocation checking to use clear states rather than timestamp comparisons, which should be more robust. However, without more context about the CRLite system's design, I can't be certain if this was fixing a known vulnerability or just improving the design. The changes to SCT processing appear to be more of a refactoring than a security fix, though they might enable better security auditing by making timestamp information more accessible.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-break/widows-orphans-008.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-break/widows-orphans-008.html@@ -20,7 +20,6 @@ -->- <meta name="flags" content=""> <meta name="assert" content="When column boxes are filled sequentially, their content should be distributed and fragmented in accordance with the 'orphans' and the 'widows' declarations. In the test, since the 3rd column box was going to get only 1 line box, then a class B break point should occur between the '6' and the '7' so that there is a minimum of 3 line boxes at the top of the 3rd column box."> <style>
Analysis of the provided code diff: 1. Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/css/css-break/widows-orphans-008.html [Lines] 20 [Old Code] `<meta name="flags" content="">` [Fixed Code] (line removed) Additional Details: - The change simply removes an empty meta tag with a "flags" attribute, which doesn't appear to be related to any security vulnerability. - This appears to be a test file cleanup rather than a security fix. - No known vulnerability is associated with this change. Note: The diff shows only one change - the removal of an empty meta tag. There are no other changes to analyze for potential 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/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.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.basic.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);@@ -36,10 +36,10 @@ var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 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);
Based on the provided code diff, I don't see any security-related changes. The changes appear to be purely variable renaming (from `offscreenCanvas` to `canvas`) and updating the corresponding assertions to use the new variable name. There are no security vulnerabilities being fixed in this diff. Here's the structured response: Vulnerability Existed: no No security vulnerability found [testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html] [Lines 17-36] [Old Code: var offscreenCanvas = new OffscreenCanvas(100, 50); and related assertions using offscreenCanvas] [Fixed Code: var canvas = new OffscreenCanvas(100, 50); and related assertions using canvas] 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/dom/media/webrtc/jsapi/TransceiverImpl.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/media/webrtc/jsapi/TransceiverImpl.cpp@@ -29,6 +29,7 @@ #include "RTCDtlsTransport.h" #include "RTCRtpReceiver.h" #include "RTCDTMFSender.h"+#include "systemservices/MediaUtils.h" #include "libwebrtcglue/WebrtcCallWrapper.h" #include "libwebrtcglue/WebrtcGmpVideoCodec.h"@@ -734,8 +735,8 @@ static nsresult JsepCodecDescToAudioCodecConfig( const JsepCodecDescription& aCodec, Maybe<AudioCodecConfig>* aConfig) {- MOZ_ASSERT(aCodec.mType == SdpMediaSection::kAudio);- if (aCodec.mType != SdpMediaSection::kAudio) return NS_ERROR_INVALID_ARG;+ MOZ_ASSERT(aCodec.Type() == SdpMediaSection::kAudio);+ if (aCodec.Type() != SdpMediaSection::kAudio) return NS_ERROR_INVALID_ARG; const JsepAudioCodecDescription& desc = static_cast<const JsepAudioCodecDescription&>(aCodec);@@ -762,6 +763,42 @@ return NS_OK; }+Maybe<const std::vector<UniquePtr<JsepCodecDescription>>&>+TransceiverImpl::GetNegotiatedSendCodecs() const {+ if (!IsSending()) {+ return Nothing();+ }++ const auto* details = mJsepTransceiver->mSendTrack.GetNegotiatedDetails();+ if (!details) {+ return Nothing();+ }++ if (details->GetEncodingCount() == 0) {+ return Nothing();+ }++ return SomeRef(details->GetEncoding(0).GetCodecs());+}++Maybe<const std::vector<UniquePtr<JsepCodecDescription>>&>+TransceiverImpl::GetNegotiatedRecvCodecs() const {+ if (!IsReceiving()) {+ return Nothing();+ }++ const auto* details = mJsepTransceiver->mRecvTrack.GetNegotiatedDetails();+ if (!details) {+ return Nothing();+ }++ if (details->GetEncodingCount() == 0) {+ return Nothing();+ }++ return SomeRef(details->GetEncoding(0).GetCodecs());+}+ // TODO: Maybe move this someplace else? /*static*/ nsresult TransceiverImpl::NegotiatedDetailsToAudioCodecConfigs(@@ -795,6 +832,28 @@ } return NS_OK;+}++auto TransceiverImpl::GetActivePayloadTypes() const+ -> RefPtr<ActivePayloadTypesPromise> {+ if (!mConduit) {+ return ActivePayloadTypesPromise::CreateAndResolve(PayloadTypes(),+ __func__);+ }++ if (!mCallWrapper) {+ return ActivePayloadTypesPromise::CreateAndResolve(PayloadTypes(),+ __func__);+ }++ return InvokeAsync(mCallWrapper->mCallThread, __func__,+ [conduit = mConduit]() {+ PayloadTypes pts;+ pts.mSendPayloadType = conduit->ActiveSendPayloadType();+ pts.mRecvPayloadType = conduit->ActiveRecvPayloadType();+ return ActivePayloadTypesPromise::CreateAndResolve(+ std::move(pts), __func__);+ }); } nsresult TransceiverImpl::UpdateAudioConduit() {@@ -857,8 +916,8 @@ static nsresult JsepCodecDescToVideoCodecConfig( const JsepCodecDescription& aCodec, Maybe<VideoCodecConfig>* aConfig) {- MOZ_ASSERT(aCodec.mType == SdpMediaSection::kVideo);- if (aCodec.mType != SdpMediaSection::kVideo) {+ MOZ_ASSERT(aCodec.Type() == SdpMediaSection::kVideo);+ if (aCodec.Type() != SdpMediaSection::kVideo) { MOZ_ASSERT(false, "JsepCodecDescription has wrong type"); return NS_ERROR_INVALID_ARG; }@@ -1062,4 +1121,181 @@ return mJsepTransceiver->GetMediaType() == SdpMediaSection::MediaType::kVideo; }+/* static */+RefPtr<RTCStatsPromise> TransceiverImpl::ApplyCodecStats(+ nsTArray<RTCCodecStats> aCodecStats,+ nsTArray<+ std::tuple<TransceiverImpl*, RefPtr<RTCStatsPromise::AllPromiseType>>>+ aTransceiverStatsPromises) {+ MOZ_ASSERT(NS_IsMainThread());+ // The process here is roughly:+ // - Gather all inputs to the codec filtering process, including:+ // - Each transceiver's transportIds+ // - Each transceiver's active payload types (resolved)+ // - Each transceiver's resolved stats+ //+ // Waiting (async) for multiple promises of different types is not supported+ // by the MozPromise API (bug 1752318), so we are a bit finicky here. We+ // create media::Refcountables of the types we want to resolve, and let+ // these be shared across Then-functions through RefPtrs.+ //+ // - For each active payload type in a transceiver:+ // - Register the codec stats for this payload type and transport if we+ // haven't already done so+ // - If it was a send payload type, assign the codec stats id for this+ // payload type and transport to the transceiver's outbound-rtp and+ // remote-inbound-rtp stats as codecId+ // - If it was a recv payload type, assign the codec stats id for this+ // payload type and transport to the transceiver's inbound-rtp and+ // remote-outbound-rtp stats as codecId+ //+ // - Flatten all transceiver stats collections into one, and set the+ // registered codec stats on it++ // Wrap codec stats in a Refcountable<> to allow sharing across promise+ // handlers.+ auto codecStats = MakeRefPtr<media::Refcountable<nsTArray<RTCCodecStats>>>();+ *codecStats = std::move(aCodecStats);++ struct IdComparator {+ bool operator()(const RTCCodecStats& aA, const RTCCodecStats& aB) const {+ return aA.mId.Value() < aB.mId.Value();+ }+ };++ // Stores distinct codec stats by id; to avoid dupes within a transport.+ auto finalCodecStats =+ MakeRefPtr<media::Refcountable<std::set<RTCCodecStats, IdComparator>>>();++ // All the transceiver rtp stream stats in a single array. These stats will,+ // when resolved, contain codecIds.+ nsTArray<RefPtr<RTCStatsPromise>> promises(+ aTransceiverStatsPromises.Length());++ for (const auto& [transceiver, allPromise] : aTransceiverStatsPromises) {+ // Per transceiver, gather up what we need to assign codecId to this+ // transceiver's rtp stream stats. Register codec stats while we're at it.+ auto payloadTypes = MakeRefPtr<media::Refcountable<PayloadTypes>>();+ promises.AppendElement(+ transceiver->GetActivePayloadTypes()+ ->Then(+ GetMainThreadSerialEventTarget(), __func__,+ [payloadTypes,+ allPromise = allPromise](PayloadTypes aPayloadTypes) {+ // Forward active payload types to the next Then-handler.+ *payloadTypes = std::move(aPayloadTypes);+ return allPromise;+ },+ [] {+ MOZ_CRASH("Unexpected reject");+ return RTCStatsPromise::AllPromiseType::CreateAndReject(+ NS_ERROR_UNEXPECTED, __func__);+ })+ ->Then(+ GetMainThreadSerialEventTarget(), __func__,+ [codecStats, finalCodecStats, payloadTypes,+ transportId =+ NS_ConvertASCIItoUTF16(transceiver->GetTransportId())](+ nsTArray<UniquePtr<RTCStatsCollection>>+ aTransceiverStats) mutable {+ // We have all the data we need to register codec stats and+ // assign codecIds for this transceiver's rtp stream stats.++ auto report = MakeUnique<RTCStatsCollection>();+ FlattenStats(std::move(aTransceiverStats), report.get());++ // Find the codec stats we are looking for, based on the+ // transportId and the active payload types.+ Maybe<RTCCodecStats&> sendCodec;+ Maybe<RTCCodecStats&> recvCodec;+ for (auto& codec : *codecStats) {+ if (payloadTypes->mSendPayloadType.isSome() ==+ sendCodec.isSome() &&+ payloadTypes->mRecvPayloadType.isSome() ==+ recvCodec.isSome()) {+ // We have found all the codec stats we were looking for.+ break;+ }+ if (codec.mTransportId != transportId) {+ continue;+ }+ if (payloadTypes->mSendPayloadType &&+ *payloadTypes->mSendPayloadType ==+ static_cast<int>(codec.mPayloadType) &&+ (!codec.mCodecType.WasPassed() ||+ codec.mCodecType.Value() == RTCCodecType::Encode)) {+ MOZ_ASSERT(!sendCodec,+ "At most one send codec stat per transceiver");+ sendCodec = SomeRef(codec);+ }+ if (payloadTypes->mRecvPayloadType &&+ *payloadTypes->mRecvPayloadType ==+ static_cast<int>(codec.mPayloadType) &&+ (!codec.mCodecType.WasPassed() ||+ codec.mCodecType.Value() == RTCCodecType::Decode)) {+ MOZ_ASSERT(!recvCodec,+ "At most one recv codec stat per transceiver");+ recvCodec = SomeRef(codec);+ }+ }++ // Register and assign codecIds for the found codec stats.+ if (sendCodec) {+ finalCodecStats->insert(*sendCodec);+ for (auto& stat : report->mOutboundRtpStreamStats) {+ stat.mCodecId.Construct(sendCodec->mId.Value());+ }+ for (auto& stat : report->mRemoteInboundRtpStreamStats) {+ stat.mCodecId.Construct(sendCodec->mId.Value());+ }+ }+ if (recvCodec) {+ finalCodecStats->insert(*recvCodec);+ for (auto& stat : report->mInboundRtpStreamStats) {+ stat.mCodecId.Construct(recvCodec->mId.Value());+ }+ for (auto& stat : report->mRemoteOutboundRtpStreamStats) {+ stat.mCodecId.Construct(recvCodec->mId.Value());+ }+ }++ return RTCStatsPromise::CreateAndResolve(std::move(report),+ __func__);+ },+ [] {+ MOZ_CRASH("Unexpected reject");+ return RTCStatsPromise::CreateAndReject(NS_ERROR_UNEXPECTED,+ __func__);+ }));+ }++ return RTCStatsPromise::All(GetMainThreadSerialEventTarget(), promises)+ ->Then(+ GetMainThreadSerialEventTarget(), __func__,+ [finalCodecStats = std::move(finalCodecStats)](+ nsTArray<UniquePtr<RTCStatsCollection>> aStats) mutable {+ auto finalStats = MakeUnique<RTCStatsCollection>();+ FlattenStats(std::move(aStats), finalStats.get());+ MOZ_ASSERT(finalStats->mCodecStats.IsEmpty());+ if (!finalStats->mCodecStats.SetCapacity(finalCodecStats->size(),+ fallible)) {+ mozalloc_handle_oom(0);+ }+ while (!finalCodecStats->empty()) {+ auto node = finalCodecStats->extract(finalCodecStats->begin());+ if (!finalStats->mCodecStats.AppendElement(+ std::move(node.value()), fallible)) {+ mozalloc_handle_oom(0);+ }+ }+ return RTCStatsPromise::CreateAndResolve(std::move(finalStats),+ __func__);+ },+ [] {+ MOZ_CRASH("Unexpected reject");+ return RTCStatsPromise::CreateAndReject(NS_ERROR_UNEXPECTED,+ __func__);+ });+}+ } // namespace mozilla
I'll analyze the provided code diff for security fixes. The changes appear to be primarily functional additions and modifications rather than direct security fixes, but I'll examine them carefully. 1. First change - header inclusion: Vulnerability Existed: no No vulnerability found [File] dom/media/webrtc/jsapi/TransceiverImpl.cpp [Lines] 29-33 [Old Code] #include "RTCDtlsTransport.h" #include "RTCRtpReceiver.h" #include "RTCDTMFSender.h" [Fixed Code] #include "RTCDtlsTransport.h" #include "RTCRtpReceiver.h" #include "RTCDTMFSender.h" #include "systemservices/MediaUtils.h" 2. Second change - method access modification: Vulnerability Existed: not sure Potential Access Control Issue [File] dom/media/webrtc/jsapi/TransceiverImpl.cpp [Lines] 734-735 [Old Code] MOZ_ASSERT(aCodec.mType == SdpMediaSection::kAudio); if (aCodec.mType != SdpMediaSection::kAudio) return NS_ERROR_INVALID_ARG; [Fixed Code] MOZ_ASSERT(aCodec.Type() == SdpMediaSection::kAudio); if (aCodec.Type() != SdpMediaSection::kAudio) return NS_ERROR_INVALID_ARG; 3. Third change - similar method access modification: Vulnerability Existed: not sure Potential Access Control Issue [File] dom/media/webrtc/jsapi/TransceiverImpl.cpp [Lines] 916-917 [Old Code] MOZ_ASSERT(aCodec.mType == SdpMediaSection::kVideo); if (aCodec.mType != SdpMediaSection::kVideo) { [Fixed Code] MOZ_ASSERT(aCodec.Type() == SdpMediaSection::kVideo); if (aCodec.Type() != SdpMediaSection::kVideo) { The main changes involve: 1. Adding a new header inclusion 2. Changing direct member variable access (mType) to method calls (Type()) 3. Adding new functionality for codec statistics handling The changes from direct member access to method calls could potentially be related to encapsulation/security, but without more context about the JsepCodecDescription class, I can't be certain if this was specifically for security reasons or just general code quality improvement. The extensive new code for ApplyCodecStats appears to be new functionality rather than a security fix, though it does include proper error handling and validation. No clear security vulnerabilities were fixed in this diff, though there may be some defensive programming improvements in the access method changes.
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.cap.open.worker.js+++ /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.cap.open.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.strokeStyle = '#0f0';@@ -29,10 +29,10 @@ ctx.lineTo(1000, 200); ctx.lineTo(200, 200); ctx.stroke();-_assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");-_assertPixel(offscreenCanvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255");-_assertPixel(offscreenCanvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");-_assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");+_assertPixel(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255");+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); t.done(); });
After analyzing the provided code diff, here's the security assessment: 1. Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.open.worker.js [Lines] 13-29 [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); 2. Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.open.worker.js [Lines] 29-33 [Old Code] _assertPixel(offscreenCanvas, ...) calls [Fixed Code] _assertPixel(canvas, ...) calls The changes appear to be purely variable renaming (from `offscreenCanvas` to `canvas`) and don't indicate any security fixes. The functionality remains identical, just with a different variable name. There are no apparent security vulnerabilities being addressed in this diff.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/browser/components/places/content/browserPlacesViews.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/browser/components/places/content/browserPlacesViews.js@@ -1757,6 +1757,9 @@ this._allowPopupShowing = false; } }+ if (target._placesNode?.uri) {+ PlacesUIUtils.setupSpeculativeConnection(target._placesNode.uri, window);+ } }, _cleanupDragDetails: function PT__cleanupDragDetails() {@@ -1993,7 +1996,7 @@ this._viewElt._placesView = this; this._addEventListeners(this._rootElt, ["popupshowing", "popuphidden"], true); this._addEventListeners(window, ["unload"], false);-+ this._addEventListeners(this._rootElt, ["mousedown"], false); if (AppConstants.platform === "macosx") { // Must walk up to support views in sub-menus, like Bookmarks Toolbar menu. for (let elt = this._viewElt.parentNode; elt; elt = elt.parentNode) {@@ -2022,6 +2025,7 @@ true ); this._removeEventListeners(window, ["unload"], false);+ this._removeEventListeners(this._rootElt, ["mousedown"], false); PlacesViewBase.prototype.uninit.apply(this, arguments); },@@ -2036,6 +2040,9 @@ break; case "popuphidden": this._onPopupHidden(aEvent);+ break;+ case "mousedown":+ this._onMouseDown(aEvent); break; } },@@ -2059,6 +2066,15 @@ // when the folder closes because it is no longer applicable. popup.removeAttribute("autoopened"); popup.removeAttribute("dragstart");+ },++ // We don't have a facility for catch "mousedown" events on the native+ // Mac menus because Mac doesn't expose it+ _onMouseDown(aEvent) {+ let target = aEvent.target;+ if (target._placesNode?.uri) {+ PlacesUIUtils.setupSpeculativeConnection(target._placesNode.uri, window);+ } }, };
Here's the analysis of the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential Speculative Connection Timing Attack] [browser/components/places/content/browserPlacesViews.js] [Lines 1757-1759, 2040-2042, 2066-2071] [Old Code] (No code handling mousedown events or speculative connections) [Fixed Code] ``` if (target._placesNode?.uri) { PlacesUIUtils.setupSpeculativeConnection(target._placesNode.uri, window); } ``` Additional Details: The change adds speculative connection setup on mousedown events, which could potentially be related to timing attacks or prefetching security considerations. 2. Vulnerability Existed: not sure [Event Listener Security] [browser/components/places/content/browserPlacesViews.js] [Lines 1996, 2025] [Old Code] (No mousedown event listener handling) [Fixed Code] ``` this._addEventListeners(this._rootElt, ["mousedown"], false); ... this._removeEventListeners(this._rootElt, ["mousedown"], false); ``` Additional Details: The change adds and removes mousedown event listeners, which could be related to preventing event listener leaks or other security considerations around proper event handling. Note: While these changes appear to be security-related (particularly the speculative connection setup), without more context about the specific threat model or vulnerability being addressed, it's difficult to definitively identify specific vulnerabilities. The changes seem focused on improving connection handling and event management, which often have security implications.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.