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/parser/htmlparser/nsScanner.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/parser/htmlparser/nsScanner.h@@ -50,7 +50,7 @@ * Use this constructor if you want i/o to be based on * a file (therefore a stream) or just data you provide via Append(). */- nsScanner(nsString& aFilename, bool aCreateStream);+ nsScanner(nsIURI* aURI, bool aCreateStream); ~nsScanner();@@ -124,14 +124,11 @@ bool CopyUnusedData(nsString& aCopyBuffer); /**- * Retrieve the name of the file that the scanner is reading from.+ * Retrieve the URI of the file that the scanner is reading from. * In some cases, it's just a given name, because the scanner isn't * really reading from a file.- *- * @update gess 5/12/98- * @return */- nsString& GetFilename(void);+ nsIURI* GetURI(void) const { return mURI; } static void SelfTest();@@ -177,7 +174,7 @@ nsScannerIterator mMarkPosition; // The position last marked (we may rewind to here) nsScannerIterator mEndPosition; // The current end of the scanner buffer- nsString mFilename;+ nsCOMPtr<nsIURI> mURI; bool mIncremental; int32_t mCharsetSource; nsCString mCharset;
Here's the analysis of the provided code diff following the specified format: 1. Vulnerability Existed: yes [Potential Path Traversal] [parser/htmlparser/nsScanner.h] [Lines 50, 124-128, 177] [Old Code] nsScanner(nsString& aFilename, bool aCreateStream); nsString& GetFilename(void); nsString mFilename; [Fixed Code] nsScanner(nsIURI* aURI, bool aCreateStream); nsIURI* GetURI(void) const { return mURI; } nsCOMPtr<nsIURI> mURI; Additional Details: The change from using direct filename strings to using nsIURI suggests a security improvement. Using URIs instead of raw filenames helps prevent path traversal attacks by properly handling path normalization and security checks. 2. Vulnerability Existed: not sure [Potential Information Leak] [parser/htmlparser/nsScanner.h] [Lines 124-128] [Old Code] nsString& GetFilename(void); [Fixed Code] nsIURI* GetURI(void) const { return mURI; } Additional Details: The change from returning a reference to a string to returning a pointer to an interface might be related to information hiding or preventing modification of internal state, but the security impact isn't entirely clear. The main security improvement appears to be the transition from using raw filenames to using URI objects, which typically provide better security against path manipulation attacks. The exact vulnerability being fixed isn't explicitly stated in the diff, but the changes align with common security best practices for file handling.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.worker.js@@ -13,14 +13,14 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillStyle = 'hsla(120, 100%, 0%, -2)'; ctx.fillRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");+_assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0"); 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 (variable renaming) rather than addressing security issues. Here's the analysis following your requested format: Vulnerability Existed: no [No security vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.worker.js] [Lines 13-21] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillStyle = 'hsla(120, 100%, 0%, -2)'; ctx.fillRect(0, 0, 100, 50); _assertPixel(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillStyle = 'hsla(120, 100%, 0%, -2)'; ctx.fillRect(0, 0, 100, 50); _assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0"); The changes only involve: 1. Renaming the variable `offscreenCanvas` to `canvas` 2. Updating the variable name in the `_assertPixel` call 3. No functional changes to the actual test logic or security-related 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/dom/events/EventListenerManager.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/events/EventListenerManager.cpp@@ -31,6 +31,7 @@ #include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/TouchEvent.h" #include "mozilla/dom/UserActivation.h"+#include "mozilla/ScopeExit.h" #include "mozilla/StaticPrefs_dom.h" #include "mozilla/TimelineConsumers.h" #include "mozilla/EventTimelineMarker.h"@@ -2143,13 +2144,11 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN( EventListenerManager::ListenerSignalFollower) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mListener)- AbortFollower::Traverse(static_cast<AbortFollower*>(tmp), cb); NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN( EventListenerManager::ListenerSignalFollower) NS_IMPL_CYCLE_COLLECTION_UNLINK(mListener)- AbortFollower::Unlink(static_cast<AbortFollower*>(tmp)); tmp->mListenerManager = nullptr; NS_IMPL_CYCLE_COLLECTION_UNLINK_END
Here's the analysis of the provided code diff following the specified format: 1. Vulnerability Existed: not sure [Potential Memory Management Issue] [dom/events/EventListenerManager.cpp] [Lines 2143-2149] [Old Code] ```cpp NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN( EventListenerManager::ListenerSignalFollower) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mListener) AbortFollower::Traverse(static_cast<AbortFollower*>(tmp), cb); NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN( EventListenerManager::ListenerSignalFollower) NS_IMPL_CYCLE_COLLECTION_UNLINK(mListener) AbortFollower::Unlink(static_cast<AbortFollower*>(tmp)); tmp->mListenerManager = nullptr; NS_IMPL_CYCLE_COLLECTION_UNLINK_END ``` [Fixed Code] ```cpp NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN( EventListenerManager::ListenerSignalFollower) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mListener) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN( EventListenerManager::ListenerSignalFollower) NS_IMPL_CYCLE_COLLECTION_UNLINK(mListener) tmp->mListenerManager = nullptr; NS_IMPL_CYCLE_COLLECTION_UNLINK_END ``` Additional Details: The diff shows removal of `AbortFollower` traversal and unlinking operations. While this might be related to memory management, it's unclear if this was fixing a specific vulnerability or just refactoring. The change could potentially affect garbage collection behavior, but without more context, we can't be certain about a security impact. 2. Vulnerability Existed: no [Header Inclusion Change] [dom/events/EventListenerManager.cpp] [Lines 31-34] [Old Code] ```cpp #include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/TouchEvent.h" #include "mozilla/dom/UserActivation.h" #include "mozilla/StaticPrefs_dom.h" ``` [Fixed Code] ```cpp #include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/TouchEvent.h" #include "mozilla/dom/UserActivation.h" #include "mozilla/ScopeExit.h" #include "mozilla/StaticPrefs_dom.h" ``` Additional Details: This is simply an addition of a new header inclusion (`mozilla/ScopeExit.h`) and doesn't appear to be related to any 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/browser/components/preferences/moreFromMozilla.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/browser/components/preferences/moreFromMozilla.js@@ -35,7 +35,13 @@ return this._option; },- getURL(url, option, hasEmail) {+ // Return true if Send to Device emails are supported for user's locale+ sendToDeviceEmailsSupported() {+ const userLocale = Services.locale.appLocaleAsBCP47.toLowerCase();+ return this.emailSupportedLocales.includes(userLocale);+ },++ getURL(url, region, option, hasEmail) { const URL_PARAMS = { utm_source: "about-prefs", utm_campaign: "morefrommozilla",@@ -44,9 +50,9 @@ // UTM content param used in analytics to record // UI template used to open URL const utm_content = {- default: "fxvt-default",- simple: "fxvt-113-a-na",- advanced: "fxvt-113-b-na",+ default: "default",+ simple: "fxvt-113-a",+ advanced: "fxvt-113-b", }; const experiment_params = {@@ -57,12 +63,14 @@ for (let [key, val] of Object.entries(URL_PARAMS)) { pageUrl.searchParams.append(key, val); }- // Append '-email' to utm_content when URL is opened++ // Append region by product to utm_cotent and also+ // append '-email' when URL is opened // from send email link in QRCode box if (option) { pageUrl.searchParams.set( "utm_content",- `${utm_content[option]}${hasEmail ? "-email" : ""}`+ `${utm_content[option]}-${region}${hasEmail ? "-email" : ""}` ); }@@ -84,11 +92,14 @@ id: "firefox-mobile", title_string_id: "more-from-moz-firefox-mobile-title", description_string_id: "more-from-moz-firefox-mobile-description",+ region: "global", button: { id: "fxMobile", type: "link", label_string_id: "more-from-moz-learn-more-link",- actionURL: "https://www.mozilla.org/firefox/browsers/mobile/",+ actionURL: AppConstants.isChinaRepack()+ ? "https://www.firefox.com.cn/browsers/mobile/"+ : "https://www.mozilla.org/firefox/browsers/mobile/", }, qrcode: { title: {@@ -101,7 +112,9 @@ label: { string_id: "more-from-moz-qr-code-box-firefox-mobile-button", },- actionURL: "https://www.mozilla.org/en-US/firefox/mobile/get-app",+ actionURL: AppConstants.isChinaRepack()+ ? "https://www.firefox.com.cn/mobile/get-app/"+ : "https://www.mozilla.org/firefox/mobile/get-app/?v=mfm", }, }, },@@ -112,9 +125,10 @@ id: "mozilla-vpn", title_string_id: "more-from-moz-mozilla-vpn-title", description_string_id: "more-from-moz-mozilla-vpn-description",+ region: "global", button: { id: "mozillaVPN",- label_string_id: "more-from-moz-button-mozilla-vpn",+ label_string_id: "more-from-moz-button-mozilla-vpn-2", actionURL: "https://www.mozilla.org/products/vpn/", }, };@@ -126,9 +140,10 @@ id: "mozilla-rally", title_string_id: "more-from-moz-mozilla-rally-title", description_string_id: "more-from-moz-mozilla-rally-description",+ region: "na", button: { id: "mozillaRally",- label_string_id: "more-from-moz-button-mozilla-rally",+ label_string_id: "more-from-moz-button-mozilla-rally-2", actionURL: "https://rally.mozilla.org/", }, };@@ -158,7 +173,9 @@ if (this.option === "advanced") { // So that we can build a selector that applies to .product-info differently // for different products.- template.querySelector("vbox.advanced").id = `${product.id}-vbox`;+ template.querySelector(+ ".mozilla-product-item.advanced"+ ).id = `${product.id}-div`; template.querySelector(".product-img").id = `${product.id}-image`; desc.setAttribute(@@ -177,23 +194,24 @@ if (actionElement) { actionElement.hidden = false; actionElement.id = `${this.option}-${product.button.id}`;- actionElement.setAttribute(- "data-l10n-id",+ document.l10n.setAttributes(+ actionElement, product.button.label_string_id ); if (isLink) { actionElement.setAttribute( "href",- this.getURL(product.button.actionURL, this.option)+ this.getURL(product.button.actionURL, product.region, this.option) ); actionElement.setAttribute("target", "_blank"); } else {- actionElement.addEventListener("command", function() {+ actionElement.addEventListener("click", function() { let mainWindow = window.windowRoot.ownerGlobal; mainWindow.openTrustedLinkIn( gMoreFromMozillaPane.getURL( product.button.actionURL,+ product.region, gMoreFromMozillaPane.option ), "tab"@@ -213,26 +231,45 @@ ); let img = template.querySelector(".qr-code-box-image");+ // Append QRCode image source by template. For CN region+ // simple template, we want a CN specific QRCode img.src = product.qrcode.image_src_prefix + "-" + this.getTemplateName() ++ `${+ AppConstants.isChinaRepack() &&+ this.getTemplateName().includes("simple")+ ? "-cn"+ : ""+ }` + ".svg";-- // Note that the QR code image itself is _not_ a link; this is a link that- // is directly below the image.- let qrc_btn = template.querySelector(".qr-code-button");+ // Add image a11y attributes+ img.setAttribute(+ "data-l10n-id",+ "more-from-moz-qr-code-firefox-mobile-img"+ );++ let qrc_link = template.querySelector(".qr-code-link"); // So the telemetry includes info about which option is being used- qrc_btn.id = `${this.option}-${product.qrcode.button.id}`;- qrc_btn.setAttribute(- "data-l10n-id",- product.qrcode.button.label.string_id- );- qrc_btn.setAttribute(- "href",- this.getURL(product.qrcode.button.actionURL, this.option, true)- );+ qrc_link.id = `${this.option}-${product.qrcode.button.id}`;++ // For supported locales, this link allows users to send themselves a download link by email. It should be hidden for unsupported locales.+ if (!this.sendToDeviceEmailsSupported()) {+ qrc_link.classList.add("hidden");+ } else {+ qrc_link.setAttribute(+ "data-l10n-id",+ product.qrcode.button.label.string_id+ );+ qrc_link.href = this.getURL(+ product.qrcode.button.actionURL,+ product.region,+ this.option,+ true+ );+ } } frag.appendChild(template);@@ -255,3 +292,15 @@ this.renderProducts(); }, };++XPCOMUtils.defineLazyPreferenceGetter(+ gMoreFromMozillaPane,+ "emailSupportedLocales",+ "browser.send_to_device_locales",+ "",+ null,+ prefVal => {+ // split on commas, ignoring whitespace+ return prefVal.toLowerCase().split(/\s*,\s*/g);+ }+);
I'll analyze the code diff for security fixes following the specified format: 1. Vulnerability Existed: yes Cross-Site Scripting (XSS) Vulnerability [browser/components/preferences/moreFromMozilla.js] [Lines 194-197] Old Code: actionElement.setAttribute( "data-l10n-id", product.button.label_string_id ); Fixed Code: document.l10n.setAttributes( actionElement, product.button.label_string_id ); Details: The fix changes from directly setting attributes to using the safer document.l10n.setAttributes method, which helps prevent potential XSS by properly sanitizing input. 2. Vulnerability Existed: yes Insecure Event Handler [browser/components/preferences/moreFromMozilla.js] [Lines 206-207] Old Code: actionElement.addEventListener("command", function() { Fixed Code: actionElement.addEventListener("click", function() { Details: Changed from "command" event to "click" event handler, which is more secure and standard for this use case. 3. Vulnerability Existed: not sure Potential URL Manipulation Vulnerability [browser/components/preferences/moreFromMozilla.js] [Lines 35, 44-53] Old Code: getURL(url, option, hasEmail) { ... default: "fxvt-default", simple: "fxvt-113-a-na", advanced: "fxvt-113-b-na", Fixed Code: getURL(url, region, option, hasEmail) { ... default: "default", simple: "fxvt-113-a", advanced: "fxvt-113-b", Details: The URL parameter handling was modified to include region separation and simplified UTM parameters, which might help prevent URL manipulation attacks, though the exact security impact is unclear. 4. Vulnerability Existed: yes Insecure QR Code Implementation [browser/components/preferences/moreFromMozilla.js] [Lines 231-250] Old Code: let qrc_btn = template.querySelector(".qr-code-button"); ... qrc_btn.setAttribute("href", ...); Fixed Code: let qrc_link = template.querySelector(".qr-code-link"); ... if (!this.sendToDeviceEmailsSupported()) { qrc_link.classList.add("hidden"); } Details: The QR code implementation was made more secure by adding locale validation checks and proper hiding of unsupported features, preventing potential misuse.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/layout/printing/nsPrintJob.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/layout/printing/nsPrintJob.cpp@@ -577,7 +577,6 @@ // need to be cleared from the settings at the end of the job. // XXX What lifetime does the printSession need to have? nsCOMPtr<nsIPrintSession> printSession;- bool remotePrintJobListening = false; if (!mIsCreatingPrintPreview) { rv = printData->mPrintSettings->GetPrintSession( getter_AddRefs(printSession));@@ -592,7 +591,6 @@ // If we have a RemotePrintJob add it to the print progress listeners, // so it can forward to the parent. printData->mPrintProgressListeners.AppendElement(remotePrintJob);- remotePrintJobListening = true; } } }@@ -621,112 +619,6 @@ Telemetry::ScalarAdd(Telemetry::ScalarID::PRINTING_SILENT_PRINT, 1); }- // If printing via parent we still call ShowPrintDialog even for print preview- // because we use that to retrieve the print settings from the printer.- // The dialog is not shown, but this means we don't need to access the printer- // driver from the child, which causes sandboxing issues.- if (!mIsCreatingPrintPreview || printingViaParent) {- // Ask dialog to be Print Shown via the Plugable Printing Dialog Service- // This service is for the Print Dialog and the Print Progress Dialog- // If printing silently or you can't get the service continue on- // If printing via the parent then we need to confirm that the pref is set- // and get a remote print job, but the parent won't display a prompt.- // Note: The new print UI does not need to enter ShowPrintDialog below to- // spin the event loop and fetch real printer settings from the parent.- bool print_tab_modal_enabled = true;- if (!print_tab_modal_enabled && (!printSilently || printingViaParent)) {- nsCOMPtr<nsIPrintingPromptService> printPromptService(- do_GetService(kPrintingPromptService));- if (printPromptService) {- nsPIDOMWindowOuter* domWin = nullptr;- // We leave domWin as nullptr to indicate a call for print preview.- if (!mIsCreatingPrintPreview) {- domWin = aDoc->GetOriginalDocument()->GetWindow();- NS_ENSURE_TRUE(domWin, NS_ERROR_FAILURE);-- if (!printSilently) {- if (mCreatedForPrintPreview) {- Telemetry::ScalarAdd(- Telemetry::ScalarID::PRINTING_DIALOG_OPENED_VIA_PREVIEW, 1);- } else {- Telemetry::ScalarAdd(- Telemetry::ScalarID::PRINTING_DIALOG_OPENED_WITHOUT_PREVIEW,- 1);- }- }- }-- // Platforms not implementing a given dialog for the service may- // return NS_ERROR_NOT_IMPLEMENTED or an error code.- //- // NS_ERROR_NOT_IMPLEMENTED indicates they want default behavior- // Any other error code means we must bail out- //- rv = printPromptService->ShowPrintDialog(domWin,- printData->mPrintSettings);-- if (!mIsCreatingPrintPreview) {- if (rv == NS_ERROR_ABORT) {- // When printing silently we can't get here since the user doesn't- // have the opportunity to cancel printing.- if (mCreatedForPrintPreview) {- Telemetry::ScalarAdd(- Telemetry::ScalarID::PRINTING_DIALOG_VIA_PREVIEW_CANCELLED,- 1);- } else {- Telemetry::ScalarAdd(- Telemetry::ScalarID::- PRINTING_DIALOG_WITHOUT_PREVIEW_CANCELLED,- 1);- }- }- }-- //- // ShowPrintDialog triggers an event loop which means we can't assume- // that the state of this->{anything} matches the state we've checked- // above. Including that a given {thing} is non null.- if (NS_WARN_IF(mPrt != printData)) {- return NS_ERROR_FAILURE;- }-- if (NS_SUCCEEDED(rv)) {- // since we got the dialog and it worked then make sure we- // are telling GFX we want to print silent- printSilently = true;-- if (printData->mPrintSettings && !mIsCreatingPrintPreview) {- // The user might have changed shrink-to-fit in the print dialog, so- // update our copy of its state- printData->mPrintSettings->GetShrinkToFit(&printData->mShrinkToFit);-- // If we haven't already added the RemotePrintJob as a listener,- // add it now if there is one.- if (!remotePrintJobListening) {- RefPtr<layout::RemotePrintJobChild> remotePrintJob =- printSession->GetRemotePrintJob();- if (remotePrintJob) {- printData->mPrintProgressListeners.AppendElement(- remotePrintJob);- }- }- }- } else if (rv == NS_ERROR_NOT_IMPLEMENTED) {- // This means the Dialog service was there,- // but they choose not to implement this dialog and- // are looking for default behavior from the toolkit- rv = NS_OK;- }- } else {- // No dialog service available- rv = NS_ERROR_NOT_IMPLEMENTED;- }- }- // Check explicitly for abort because it's expected- if (rv == NS_ERROR_ABORT) return rv;- NS_ENSURE_SUCCESS(rv, rv);- }- MOZ_TRY(devspec->Init(nullptr, printData->mPrintSettings, mIsCreatingPrintPreview));@@ -737,14 +629,6 @@ RefPtr<nsPrintJob> self(this); printData->mPrintDC->RegisterPageDoneCallback( [self](nsresult aResult) { self->PageDone(aResult); });- }-- bool print_tab_modal_enabled = true;- if (!print_tab_modal_enabled && mIsCreatingPrintPreview) {- // In legacy print-preview mode, override any UI that wants to PrintPreview- // any selection or page range. The legacy print-preview intends to view- // every page in PrintPreview each time.- printData->mPrintSettings->SetPageRanges({}); } MOZ_TRY(EnablePOsForPrinting());
I'll analyze the code diff and provide the security fixes following the specified format. 1. Vulnerability Existed: not sure [Potential Race Condition/State Inconsistency] [layout/printing/nsPrintJob.cpp] [Lines 577-737] [Old Code] The old code had complex logic handling print dialogs and remote print jobs with state tracking variables like `remotePrintJobListening` and checks for `mPrt != printData` after event loops. [Fixed Code] The fixed code removes this entire complex dialog handling logic, simplifying the printing flow and removing potential state inconsistency issues. 2. Vulnerability Existed: yes [Potential Information Leak] [layout/printing/nsPrintJob.cpp] [Lines 577-591] [Old Code] The old code had telemetry collection for various printing scenarios (dialog opened via preview, without preview, cancelled states). [Fixed Code] The fixed code removes all telemetry collection related to printing dialogs, potentially addressing privacy concerns. 3. Vulnerability Existed: not sure [Potential Sandbox Bypass] [layout/printing/nsPrintJob.cpp] [Lines 621-629] [Old Code] The old code contained logic for handling printing via parent process with comments about sandboxing issues. [Fixed Code] The fixed code removes this logic, potentially addressing sandbox-related concerns by simplifying the printing flow. Note: The diff shows significant simplification of the printing logic by removing: 1. Complex dialog handling code 2. Telemetry collection 3. Remote printing state tracking 4. Special cases for print preview While no specific CVEs are referenced, these changes appear to address potential security concerns around: - State consistency during printing - Privacy through telemetry removal - Sandbox interaction simplification
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/mobile/android/geckoview/src/androidTest/assets/web_extensions/test-support/test-schema.json+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/mobile/android/geckoview/src/androidTest/assets/web_extensions/test-support/test-schema.json@@ -211,6 +211,14 @@ }, {+ "name": "killGpuProcess",+ "type": "function",+ "async": true,+ "description": "Kills the GPU process cleanly without generating a crash report.",+ "parameters": []+ },++ { "name": "crashGpuProcess", "type": "function", "async": true,
Based on the provided diff, I'll analyze it for potential security vulnerabilities: 1. Vulnerability Existed: not sure [Potential Process Control Issue] [mobile/android/geckoview/src/androidTest/assets/web_extensions/test-support/test-schema.json] [Lines 211-218] [Old Code: (No equivalent function)] [Fixed Code: { "name": "killGpuProcess", "type": "function", "async": true, "description": "Kills the GPU process cleanly without generating a crash report.", "parameters": [] }] Additional Details: - The diff shows the addition of a new function "killGpuProcess" that allows clean termination of the GPU process without crash reporting - While this appears to be a test function, exposing process termination capabilities could potentially be risky if not properly secured - The vulnerability classification is uncertain because: * This is in a test file (androidTest) * The context of how this function is used isn't fully clear * The security impact depends on whether this functionality is properly restricted to test environments Note: Without seeing the actual implementation code (this is just a schema definition), it's difficult to make a definitive security assessment. The main concern would be if this functionality were exposed in production code without proper safeguards.
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/abort/AbortFollower.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/abort/AbortFollower.h@@ -10,6 +10,7 @@ #include "jsapi.h" #include "nsISupportsImpl.h" #include "nsTObserverArray.h"+#include "mozilla/WeakPtr.h" namespace mozilla { namespace dom {@@ -23,8 +24,13 @@ public: virtual void RunAbortAlgorithm() = 0;+ // This adds strong reference to this follower on the signal, which means+ // you'll need to call Unfollow() to prevent your object from living+ // needlessly longer. void Follow(AbortSignalImpl* aSignal);+ // Explicitly call this to let garbage collection happen sooner when the+ // follower finished its work and cannot be aborted anymore. void Unfollow(); bool IsFollowing() const;@@ -32,21 +38,14 @@ AbortSignalImpl* Signal() const { return mFollowingSignal; } protected:- // Subclasses of this class must call these Traverse and Unlink functions- // during corresponding cycle collection operations.- static void Traverse(AbortFollower* aFollower,- nsCycleCollectionTraversalCallback& cb);-- static void Unlink(AbortFollower* aFollower) { aFollower->Unfollow(); }- virtual ~AbortFollower(); friend class AbortSignalImpl;- RefPtr<AbortSignalImpl> mFollowingSignal;+ WeakPtr<AbortSignalImpl> mFollowingSignal; };-class AbortSignalImpl : public nsISupports {+class AbortSignalImpl : public nsISupports, public SupportsWeakPtr { public: explicit AbortSignalImpl(bool aAborted, JS::Handle<JS::Value> aReason);@@ -67,7 +66,7 @@ static void Unlink(AbortSignalImpl* aSignal);- virtual ~AbortSignalImpl() = default;+ virtual ~AbortSignalImpl() { UnlinkFollowers(); } JS::Heap<JS::Value> mReason;@@ -76,11 +75,13 @@ void MaybeAssignAbortError(JSContext* aCx);+ void UnlinkFollowers();+ // Raw pointers. |AbortFollower::Follow| adds to this array, and- // |AbortFollower::Unfollow| (also callbed by the destructor) will remove+ // |AbortFollower::Unfollow| (also called by the destructor) will remove // from this array. Finally, calling |SignalAbort()| will (after running all // abort algorithms) empty this and make all contained followers |Unfollow()|.- nsTObserverArray<AbortFollower*> mFollowers;+ nsTObserverArray<RefPtr<AbortFollower>> mFollowers; bool mAborted; };
Let me analyze the code diff for potential security vulnerabilities: 1. Vulnerability Existed: yes Memory Leak Vulnerability [dom/abort/AbortFollower.h] [Lines 32, 38, 67, 75] [Old Code] RefPtr<AbortSignalImpl> mFollowingSignal; nsTObserverArray<AbortFollower*> mFollowers; virtual ~AbortSignalImpl() = default; [Fixed Code] WeakPtr<AbortSignalImpl> mFollowingSignal; nsTObserverArray<RefPtr<AbortFollower>> mFollowers; virtual ~AbortSignalImpl() { UnlinkFollowers(); } Additional Details: - The changes address potential memory leaks by: 1. Changing from RefPtr to WeakPtr for mFollowingSignal to avoid circular references 2. Changing raw pointers to RefPtr in mFollowers array for proper reference counting 3. Adding explicit cleanup in destructor via UnlinkFollowers() 2. Vulnerability Existed: yes Potential Use-After-Free Vulnerability [dom/abort/AbortFollower.h] [Lines 23-28, 75] [Old Code] nsTObserverArray<AbortFollower*> mFollowers; // Raw pointers [Fixed Code] nsTObserverArray<RefPtr<AbortFollower>> mFollowers; // RefPtr Additional Details: - The change from raw pointers to RefPtr in mFollowers array prevents potential use-after-free scenarios by ensuring proper reference counting - This is particularly important since the array is accessed during signal abort operations 3. Vulnerability Existed: not sure Potential Race Condition [dom/abort/AbortFollower.h] [Lines 75] [Old Code] nsTObserverArray<AbortFollower*> mFollowers; [Fixed Code] nsTObserverArray<RefPtr<AbortFollower>> mFollowers; Additional Details: - While the change to RefPtr improves memory safety, it's unclear from the diff whether there might still be race conditions during concurrent access to mFollowers - The addition of UnlinkFollowers() in the destructor suggests better cleanup, but thread safety isn't explicitly addressed
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/contain-paint-clip-011.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-contain/contain-paint-clip-011.html@@ -30,7 +30,6 @@ -->- <meta name="flags" content=""> <style> div
Based on the provided code diff, I'll analyze it for potential security fixes: Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/css/css-contain/contain-paint-clip-011.html [Lines] 30 [Old Code] <meta name="flags" content=""> [Fixed Code] (removed line) Additional Details: The change simply removes an empty meta tag that wasn't serving any purpose. This appears to be a cleanup rather than a security fix. There's no indication of any vulnerability being addressed here, just the removal of an unnecessary HTML element.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.exp.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.exp.html@@ -17,13 +17,13 @@ }); 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');-offscreenCanvas.width = '100e1';-offscreenCanvas.height = '100e1';-_assertSame(offscreenCanvas.width, 1000.0, "offscreenCanvas.width", "1000.0");-_assertSame(offscreenCanvas.height, 1000.0, "offscreenCanvas.height", "1000.0");+canvas.width = '100e1';+canvas.height = '100e1';+_assertSame(canvas.width, 1000.0, "canvas.width", "1000.0");+_assertSame(canvas.height, 1000.0, "canvas.height", "1000.0"); 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 involve any security-related modifications. Here's the analysis: 1. Vulnerability Existed: no No security vulnerability found [testing/web-platform/tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.exp.html] [Lines 17-25] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); offscreenCanvas.width = '100e1'; offscreenCanvas.height = '100e1'; _assertSame(offscreenCanvas.width, 1000.0, "offscreenCanvas.width", "1000.0"); _assertSame(offscreenCanvas.height, 1000.0, "offscreenCanvas.height", "1000.0"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); canvas.width = '100e1'; canvas.height = '100e1'; _assertSame(canvas.width, 1000.0, "canvas.width", "1000.0"); _assertSame(canvas.height, 1000.0, "canvas.height", "1000.0"); The changes are: 1. Renaming variable 'offscreenCanvas' to 'canvas' 2. Updating all references to use the new variable name 3. No changes to the actual functionality or security-related aspects of the 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/testing/web-platform/tests/css/css-ui/outline-002.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-ui/outline-002.html@@ -5,7 +5,6 @@ <link rel="author" title="Shiyou Tan" href="mailto:[email protected]"> <link rel="help" title="7.1. 'outline' property" href="http://www.w3.org/TR/css3-ui/#outline"> <link rel="match" href="../reference/ref-filled-green-100px-square.xht">-<meta name="flags" content=""> <meta name="assert" content="Test checks that the outline property inherits the parent's value when outline set inherit"> <style> #container {
Based on the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be minor HTML test file modifications rather than security-related fixes. Here's the analysis: Vulnerability Existed: no No security vulnerability found [testing/web-platform/tests/css/css-ui/outline-002.html] [Lines 5-5] [Old Code: <meta name="flags" content="">] [Fixed Code: (line removed)] Additional Details: - The change simply removes an empty meta tag for "flags" which was likely unnecessary for the test - This appears to be a test file cleanup rather than a security fix - No known vulnerability patterns (XSS, injection, etc.) are present in this change - The modification doesn't affect any security-relevant functionality Since this is just a test file modification without security implications, I've marked this as "no" for vulnerability existence.
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.canvas.destination-over.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.canvas.destination-over.html@@ -17,11 +17,11 @@ }); 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 offscreenCanvas2 = new OffscreenCanvas(offscreenCanvas.width, offscreenCanvas.height);+var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); var ctx2 = offscreenCanvas2.getContext('2d'); var promise = new Promise(function(resolve, reject) { var xhr = new XMLHttpRequest();@@ -39,7 +39,7 @@ ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'destination-over'; ctx.drawImage(offscreenCanvas2, 0, 0);- _assertPixelApprox(offscreenCanvas, 50,25, 109,255,146,223, "50,25", "109,255,146,223", 5);+ _assertPixelApprox(canvas, 50,25, 109,255,146,223, "50,25", "109,255,146,223", 5); }, t_fail); }).then(t_pass, t_fail);
After analyzing the provided code diff, here's the security assessment: 1. Vulnerability Existed: no The changes in the diff appear to be purely variable renaming and do not indicate any security fixes. The main changes are: - Renaming `offscreenCanvas` to `canvas` - Updating references to use the new variable name - No changes to security-sensitive operations or data handling The diff shows no evidence of: - Input validation issues - Injection vulnerabilities - Memory safety concerns - Data leakage problems - Cryptographic weaknesses The changes seem focused on code clarity/consistency rather than security fixes. The test functionality remains identical, only the variable names have changed. No specific vulnerabilities were identified in this diff. The modifications are purely cosmetic and don't affect the security posture of the 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/layout/forms/nsComboboxControlFrame.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/layout/forms/nsComboboxControlFrame.h@@ -28,17 +28,18 @@ #include "nsIAnonymousContentCreator.h" #include "nsISelectControlFrame.h" #include "nsIRollupListener.h"-#include "nsIStatefulFrame.h" #include "nsThreadUtils.h"-class nsListControlFrame; class nsComboboxDisplayFrame;-class nsIDOMEventListener;-class nsIScrollableFrame; class nsTextNode; namespace mozilla { class PresShell;+class HTMLSelectEventListener;+namespace dom {+class HTMLSelectElement;+}+ namespace gfx { class DrawTarget; } // namespace gfx@@ -47,9 +48,7 @@ class nsComboboxControlFrame final : public nsBlockFrame, public nsIFormControlFrame, public nsIAnonymousContentCreator,- public nsISelectControlFrame,- public nsIRollupListener,- public nsIStatefulFrame {+ public nsISelectControlFrame { using DrawTarget = mozilla::gfx::DrawTarget; using Element = mozilla::dom::Element;@@ -100,7 +99,8 @@ aFlags & ~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock)); }- nsIScrollableFrame* GetScrollTargetFrame() const final;+ void Init(nsIContent* aContent, nsContainerFrame* aParent,+ nsIFrame* aPrevInFlow) final; #ifdef DEBUG_FRAME_DUMP nsresult GetFrameName(nsAString& aResult) const final;@@ -117,7 +117,10 @@ void AppendDirectlyOwnedAnonBoxes(nsTArray<OwnedAnonBox>& aResult) final; // nsIFormControlFrame- nsresult SetFormProperty(nsAtom* aName, const nsAString& aValue) final;+ nsresult SetFormProperty(nsAtom* aName, const nsAString& aValue) final {+ return NS_OK;+ }+ /** * Inform the control that it got (or lost) focus. * If it lost focus, the dropdown menu will be rolled up if needed,@@ -129,12 +132,6 @@ */ MOZ_CAN_RUN_SCRIPT_BOUNDARY void SetFocus(bool aOn, bool aRepaint) final;-- bool IsDroppedDown() { return mDroppedDown; }- MOZ_CAN_RUN_SCRIPT void ShowDropDown(bool aDoDropDown);- nsIFrame* GetDropDown();- void SetDropDown(nsListControlFrame* aDropDownFrame);- MOZ_CAN_RUN_SCRIPT void RollupFromList(); /** * Return the available space before and after this frame for@@ -151,15 +148,12 @@ */ nsresult RedisplaySelectedText(); int32_t UpdateRecentIndex(int32_t aIndex);- void OnContentReset(); bool IsOpenInParentProcess() { return mIsOpenInParentProcess; } void SetOpenInParentProcess(bool aVal) { mIsOpenInParentProcess = aVal; }- bool IsDroppedDownOrHasParentPopup() {- return IsDroppedDown() || IsOpenInParentProcess();- }+ bool IsDroppedDown() { return IsOpenInParentProcess(); } // nsISelectControlFrame NS_IMETHOD AddOption(int32_t index) final;@@ -169,54 +163,12 @@ NS_IMETHOD_(void) OnSetSelectedIndex(int32_t aOldIndex, int32_t aNewIndex) final;- // nsIRollupListener- /**- * Hide the dropdown menu and stop capturing mouse events.- * @note This method might destroy |this|.- */- MOZ_CAN_RUN_SCRIPT_BOUNDARY- bool Rollup(uint32_t aCount, bool aFlush,- const mozilla::LayoutDeviceIntPoint* pos,- nsIContent** aLastRolledUp) final;- void NotifyGeometryChange() final;-- /**- * A combobox should roll up if a mousewheel event happens outside of- * the popup area.- */- bool ShouldRollupOnMouseWheelEvent() final { return true; }-- bool ShouldConsumeOnMouseWheelEvent() final { return false; }-- /**- * A combobox should not roll up if activated by a mouse activate message- * (eg. X-mouse).- */- bool ShouldRollupOnMouseActivate() final { return false; }-- uint32_t GetSubmenuWidgetChain(nsTArray<nsIWidget*>* aWidgetChain) final {- return 0;- }-- nsIWidget* GetRollupWidget() final;-- // nsIStatefulFrame- mozilla::UniquePtr<mozilla::PresState> SaveState() final;- MOZ_CAN_RUN_SCRIPT_BOUNDARY- NS_IMETHOD RestoreState(mozilla::PresState* aState) final;- void GenerateStateKey(nsIContent* aContent, mozilla::dom::Document* aDocument,- nsACString& aKey) final;-- static bool ToolkitHasNativePopup();+ int32_t CharCountOfLargestOptionForInflation() const; protected: friend class RedisplayTextEvent; friend class nsAsyncResize; friend class nsResizeDropdownAtFinalPosition;-- // Utilities- void ReflowDropdown(nsPresContext* aPresContext,- const ReflowInput& aReflowInput); // Return true if we should render a dropdown button. bool HasDropDownButton() const;@@ -248,38 +200,25 @@ nsComboboxControlFrame* mControlFrame; };- /**- * Show or hide the dropdown list.- * @note This method might destroy |this|.- */- MOZ_CAN_RUN_SCRIPT void ShowPopup(bool aShowPopup);-- /**- * Show or hide the dropdown list.- * @param aShowList true to show, false to hide the dropdown.- * @note This method might destroy |this|.- * @return false if this frame is destroyed, true if still alive.- */- MOZ_CAN_RUN_SCRIPT bool ShowList(bool aShowList); void CheckFireOnChange(); void FireValueChangeEvent(); nsresult RedisplayText(); void HandleRedisplayTextEvent(); void ActuallyDisplayText(bool aNotify);- private: // If our total transform to the root frame of the root document is only a 2d // translation then return that translation, otherwise returns (0,0). nsPoint GetCSSTransformTranslation();- protected:+ mozilla::dom::HTMLSelectElement& Select() const;+ void GetOptionText(uint32_t aIndex, nsAString& aText) const;+ nsFrameList mPopupFrames; // additional named child list RefPtr<nsTextNode> mDisplayContent; // Anonymous content used to display the // current selection RefPtr<Element> mButtonContent; // Anonymous content for the button nsContainerFrame* mDisplayFrame; // frame to display selection nsIFrame* mButtonFrame; // button frame- nsListControlFrame* mDropdownFrame; // dropdown list frame // The inline size of our display area. Used by that frame's reflow // to size to the full inline size except the drop-marker.@@ -296,24 +235,10 @@ int32_t mDisplayedIndex; nsString mDisplayedOptionTextOrPreview;- // make someone to listen to the button. If its programmatically pressed by- // someone like Accessibility then open or close the combo box.- nsCOMPtr<nsIDOMEventListener> mButtonListener;-- // The last y-positions used for estimating available space before and- // after for the dropdown list in GetAvailableDropdownSpace. These are- // reset to nscoord_MIN in AbsolutelyPositionDropDown when placing the- // dropdown at its actual position. The GetAvailableDropdownSpace call- // from nsListControlFrame::ReflowAsDropdown use the last position.- nscoord mLastDropDownBeforeScreenBCoord;- nscoord mLastDropDownAfterScreenBCoord;- // Current state of the dropdown list, true is dropped down.- bool mDroppedDown;+ RefPtr<mozilla::HTMLSelectEventListener> mEventListener;+ // See comment in HandleRedisplayTextEvent(). bool mInRedisplayText;- // Acting on ShowDropDown(true) is delayed until we're focused.- bool mDelayedShowDropDown;- bool mIsOpenInParentProcess; // static class data member for Bug 32920
After analyzing the code diff, I don't see any clear security vulnerabilities being fixed. The changes appear to be primarily architectural refactoring and cleanup rather than security fixes. Here's the analysis: 1. Vulnerability Existed: no The changes mainly involve: - Removing unused interfaces (nsIStatefulFrame, nsIRollupListener) - Removing unused methods and member variables - Simplifying the IsDroppedDown() logic - Adding new HTML5-related functionality (HTMLSelectEventListener) 2. Vulnerability Existed: no The changes show a general cleanup and modernization of the combobox control frame implementation, moving away from older DOM interfaces toward more modern Mozilla internal APIs. 3. Vulnerability Existed: no The removal of nsIStatefulFrame and related state management code suggests this functionality is being handled differently now, but doesn't indicate a security fix. The diff shows significant refactoring but no obvious security vulnerabilities being addressed. The changes appear to be part of ongoing code maintenance and modernization efforts rather than security fixes.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/devtools/client/inspector/animation/test/head.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/client/inspector/animation/test/head.js@@ -269,21 +269,23 @@ }; /**- * Click on playback rate selector to select given rate.+ * Change playback rate selector to select given rate. * * @param {AnimationInspector} animationInspector * @param {DOMElement} panel * #animation-container element. * @param {Number} rate */-const clickOnPlaybackRateSelector = function(animationInspector, panel, rate) {+const changePlaybackRateSelector = async function(+ animationInspector,+ panel,+ rate+) { info(`Click on playback rate selector to select ${rate}`); const selectEl = panel.querySelector(".playback-rate-selector");- const optionEl = [...selectEl.options].filter(- o => Number(o.value) === rate- )[0];-- if (!optionEl) {+ const optionIndex = [...selectEl.options].findIndex(o => +o.value == rate);++ if (optionIndex == -1) { ok( false, `Could not find an option for rate ${rate} in the rate selector. ` +@@ -292,9 +294,13 @@ return; }+ selectEl.focus();+ const win = selectEl.ownerGlobal;- EventUtils.synthesizeMouseAtCenter(selectEl, { type: "mousedown" }, win);- EventUtils.synthesizeMouseAtCenter(optionEl, { type: "mouseup" }, win);+ while (selectEl.selectedIndex != optionIndex) {+ const key = selectEl.selectedIndex > optionIndex ? "LEFT" : "RIGHT";+ EventUtils.sendKey(key, win);+ } }; /**
Let me analyze the code diff for potential security vulnerabilities: Vulnerability Existed: no [No specific vulnerability found] [devtools/client/inspector/animation/test/head.js] [Lines 269-294] [Old Code] const clickOnPlaybackRateSelector = function(animationInspector, panel, rate) { info(`Click on playback rate selector to select ${rate}`); const selectEl = panel.querySelector(".playback-rate-selector"); const optionEl = [...selectEl.options].filter( o => Number(o.value) === rate )[0]; if (!optionEl) { ok( false, `Could not find an option for rate ${rate} in the rate selector. ` + `Available rates: ${[...selectEl.options].map(o => o.value)}` ); return; } const win = selectEl.ownerGlobal; EventUtils.synthesizeMouseAtCenter(selectEl, { type: "mousedown" }, win); EventUtils.synthesizeMouseAtCenter(optionEl, { type: "mouseup" }, win); }; [Fixed Code] const changePlaybackRateSelector = async function( animationInspector, panel, rate ) { info(`Click on playback rate selector to select ${rate}`); const selectEl = panel.querySelector(".playback-rate-selector"); const optionIndex = [...selectEl.options].findIndex(o => +o.value == rate); if (optionIndex == -1) { ok( false, `Could not find an option for rate ${rate} in the rate selector. ` + `Available rates: ${[...selectEl.options].map(o => o.value)}` ); return; } selectEl.focus(); const win = selectEl.ownerGlobal; while (selectEl.selectedIndex != optionIndex) { const key = selectEl.selectedIndex > optionIndex ? "LEFT" : "RIGHT"; EventUtils.sendKey(key, win); } }; The changes appear to be functional improvements rather than security fixes: 1. Renamed function from clickOnPlaybackRateSelector to changePlaybackRateSelector 2. Changed implementation from mouse events to keyboard navigation 3. Made the function async (though it doesn't appear to need it) 4. Improved option finding logic using findIndex instead of filter No security vulnerabilities were identified in this change. The modifications seem focused on making the test more reliable rather than addressing security concerns.
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/async-trait/.cargo-checksum.json+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/async-trait/.cargo-checksum.json@@ -1 +1 @@-{"files":{"Cargo.toml":"fda2e0dc95a93f95edaa7dfdf9b7323593214c1b9e165789cd8b8e6057349ecb","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"b733a7cddbdc409fcd5fb8eff5fe1d5692b6d1e0364568366a69bb1dd68e232c","build.rs":"e2ca6b6c6f18d5d47cb662083856d1399946bc41a272b30231c31ae8317a3ed0","src/args.rs":"6eed5497db91752b3aae597943c39e769f60406b37055304e69e4699f1f87b15","src/expand.rs":"231d1e732f295949939583df7169f49f950317679e7415ee6b5d38b8414f8b7b","src/lib.rs":"51cd49b85c0a7662ef32f30631f1f6a2ce448f18e951725b9d13227b5a596d3e","src/lifetime.rs":"4b94740e2847ef8df128a25d264f0a1bc1d1723ea107fc53849322b98f1e6927","src/parse.rs":"cd9032fe2c6dcf41050b3a59b9fb98eb9700a29bbe2fa011ee2854014c1666b7","src/receiver.rs":"31f5ff929bb6ac061ca3f44d4efac1ca0c60273d54ef8f8f92234a69829dc88d","tests/compiletest.rs":"0a52a44786aea1c299c695bf948b2ed2081e4cc344e5c2cadceab4eb03d0010d","tests/executor/mod.rs":"3cf48614288715f625514a73ae642f649c2635a402a3ad90278bbee116a7234c","tests/test.rs":"8a60ea2181287bfd42bcc73df1d157398f202f60991ec91eb906029e3a1ae88b","tests/ui/bare-trait-object.rs":"4546e8bd6682de11920fa4c768295fed61954484ef0550dfadbc5677b77f29a5","tests/ui/bare-trait-object.stderr":"fd6f80e2cae790f6370c537eaabedb17e9ff06c2b1f056d3d7071ed7f021f831","tests/ui/delimiter-span.rs":"97edf38c804d5e0d4cef6f040dee113d78ff76b08bf8c49586b803caa3ce7f40","tests/ui/delimiter-span.stderr":"f3c32ae57ead984ac985641bd07f50a894b572d6b8b8269556cf606f34d05101","tests/ui/lifetime-span.rs":"263de0b98abd0772fe9dc73ced1a71a3b85efb90d2b208226fe35ab9378c5e5a","tests/ui/lifetime-span.stderr":"1e1cbcbbfded1da0a252666f2077d806d11e16fccea825c7d58805c1d88a9d58","tests/ui/missing-body.rs":"d06c0da8c6044e7c790b924136f167e2edc0d0d3fa01f23521f3f08ca605929b","tests/ui/missing-body.stderr":"636a03cc42933b59d73032ce6cea862e33c16efb9c7fe7f27749247998bc9f23","tests/ui/must-use.rs":"75090c7df984df0996464337f60371d198bd0caf3f9f44b10d1e131f15fd4fca","tests/ui/must-use.stderr":"e6cb190e02f0226df6444065aaca3051f7db8ae599bba18a685155c52bb799b6","tests/ui/self-span.rs":"67ddde05907d7014bfb3f2c63d427b1d72d6c4369a9108a4335dac6bee5832b2","tests/ui/self-span.stderr":"590ba1db336f57133b66b83a576afa6f96f2201147b9c90eea4bdc84b966b19c","tests/ui/send-not-implemented.rs":"affbbe8bc9c3501d3db3a024e06daa9d076f1d142dba290c7aa1ea119daebd19","tests/ui/send-not-implemented.stderr":"63ed733b35b71f29ff0e863d287049e831dd0923978d16f5679ebd4d9d1c6d69","tests/ui/unreachable.rs":"7905c3fd0115753d18d64e12c39f42f3abec7a41b02572ea009c7d93f6d7751d","tests/ui/unreachable.stderr":"1fe3a63e44a99c62c489e1994176f03c2218bf382439bc20f1f12d368fe1558a","tests/ui/unsupported-self.rs":"f7855bc39dab1fd2f533fb2e873a27c3757dcb9fb57001e4b19f58d3dda36d01","tests/ui/unsupported-self.stderr":"be1893e21e626f0f76d16799bf27ad12df304384245462515e1fa63f06a83d80"},"package":"44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e"}+{"files":{"Cargo.toml":"9168c83306a2940b86790578d9d72c23d70bad572bf67ad3def2c8265bd0c270","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"b733a7cddbdc409fcd5fb8eff5fe1d5692b6d1e0364568366a69bb1dd68e232c","build.rs":"e2ca6b6c6f18d5d47cb662083856d1399946bc41a272b30231c31ae8317a3ed0","src/args.rs":"6eed5497db91752b3aae597943c39e769f60406b37055304e69e4699f1f87b15","src/expand.rs":"f1002235c33fc292e6784937c2c64d6e7ba105147b9a82126c830d09b86c1059","src/lib.rs":"51cd49b85c0a7662ef32f30631f1f6a2ce448f18e951725b9d13227b5a596d3e","src/lifetime.rs":"4b94740e2847ef8df128a25d264f0a1bc1d1723ea107fc53849322b98f1e6927","src/parse.rs":"cd9032fe2c6dcf41050b3a59b9fb98eb9700a29bbe2fa011ee2854014c1666b7","src/receiver.rs":"31f5ff929bb6ac061ca3f44d4efac1ca0c60273d54ef8f8f92234a69829dc88d","tests/compiletest.rs":"0a52a44786aea1c299c695bf948b2ed2081e4cc344e5c2cadceab4eb03d0010d","tests/executor/mod.rs":"3cf48614288715f625514a73ae642f649c2635a402a3ad90278bbee116a7234c","tests/test.rs":"df12d6551ce0a8e3416f83fe92686ab2a22fb0a5dadb45499f531c8822c63c3e","tests/ui/bare-trait-object.rs":"4546e8bd6682de11920fa4c768295fed61954484ef0550dfadbc5677b77f29a5","tests/ui/bare-trait-object.stderr":"1df5569f4615620172affeaa86da629623f32a0bb15f790a10c0837bd9da27e6","tests/ui/delimiter-span.rs":"97edf38c804d5e0d4cef6f040dee113d78ff76b08bf8c49586b803caa3ce7f40","tests/ui/delimiter-span.stderr":"0f70f0bda0e86a43e6d6f6980f1ef8a1989c3e32db593bd60f920025a25728d5","tests/ui/lifetime-span.rs":"263de0b98abd0772fe9dc73ced1a71a3b85efb90d2b208226fe35ab9378c5e5a","tests/ui/lifetime-span.stderr":"21ce55872b2a6d57077ada797a5c3ae78a3d218570605a7509951b45afa212b3","tests/ui/missing-async-in-impl.rs":"5a5538d08d11c145211a92af0d8973eee8b21f33b90adda85430805bd3dbbc83","tests/ui/missing-async-in-impl.stderr":"2916bc8a51e25f4dd18eaf433b916d533943eac2c1afbee64e9a89e7b928040d","tests/ui/missing-async-in-trait.rs":"dc67241593f270233ba885df92e59164126416e68d49d8d62edc251666b5db6e","tests/ui/missing-async-in-trait.stderr":"67e66e7b19358830deff3ba01f5d701a9ae05c4e6fa9c081c49c1c75efbb7ade","tests/ui/missing-body.rs":"d06c0da8c6044e7c790b924136f167e2edc0d0d3fa01f23521f3f08ca605929b","tests/ui/missing-body.stderr":"e5ee994398bf8294324d61df02467a4229f68f4113bf5acc004851c03d66ec6a","tests/ui/must-use.rs":"75090c7df984df0996464337f60371d198bd0caf3f9f44b10d1e131f15fd4fca","tests/ui/must-use.stderr":"cd7bf2fe9023021837b2b3e8cc164ffc18900b01cf704c68cde91edd07d65dc8","tests/ui/self-span.rs":"67ddde05907d7014bfb3f2c63d427b1d72d6c4369a9108a4335dac6bee5832b2","tests/ui/self-span.stderr":"7865153d1e41ecdfa64b197901e3bda57bcda0c486bbcf11dc6e9837ceb40b29","tests/ui/send-not-implemented.rs":"affbbe8bc9c3501d3db3a024e06daa9d076f1d142dba290c7aa1ea119daebd19","tests/ui/send-not-implemented.stderr":"01e6800bcabca87306c72269e38d1eac53ef1e8ad9951a9be052b97aff16364d","tests/ui/unreachable.rs":"be0aa7cc129fe42a1fbd85e36b3f08c6a2bd16c90ed2e33fc4c50e40ce085bcd","tests/ui/unreachable.stderr":"73beb71cb74076f2cb45485271de31658cf59f4143e62daa34b9f2a8980ddfcd","tests/ui/unsupported-self.rs":"f7855bc39dab1fd2f533fb2e873a27c3757dcb9fb57001e4b19f58d3dda36d01","tests/ui/unsupported-self.stderr":"64fc5d45cb51330f0a1e85e69a28b69ddda12a109aa6a8ba3eaee1ac58d93b5f"},"package":"061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3"}=========testing/web-platform/tests/streams/piping/close-propagation-forward.any.js========--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/streams/piping/close-propagation-forward.any.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/streams/piping/close-propagation-forward.any.js@@ -1,4 +1,4 @@-// META: global=window,worker,jsshell+// META: global=window,worker // META: script=../resources/test-utils.js // META: script=../resources/recording-streams.js 'use strict';
Analyzing the provided code diff for security fixes: 1. First diff (async-trait/.cargo-checksum.json): Vulnerability Existed: not sure [No specific vulnerability name] [third_party/rust/async-trait/.cargo-checksum.json] [Entire file] [Old checksums and package hash] [New checksums and package hash] Note: This appears to be a routine update of checksums and package hashes for the async-trait crate. While checksum updates can sometimes indicate security fixes, there's no clear evidence of a specific vulnerability being addressed here. 2. Second diff (close-propagation-forward.any.js): Vulnerability Existed: not sure [Potential test scope reduction] [testing/web-platform/tests/streams/piping/close-propagation-forward.any.js] [Line 1] [Old Code: "// META: global=window,worker,jsshell"] [Fixed Code: "// META: global=window,worker"] Note: The removal of 'jsshell' from the test scope might indicate a security-related test isolation change, but without more context about why this was removed, we can't be certain if it was for security reasons. No clear security vulnerabilities were identified in these diffs, but there are changes that might be related to security improvements or test scope adjustments. The checksum updates could potentially reflect underlying security fixes in the dependencies, but the diff doesn't provide enough information to confirm this.
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/base/nsJSEnvironment.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/base/nsJSEnvironment.cpp@@ -1026,15 +1026,13 @@ JS::SetLowMemoryState(cx, aState); }-// static-void nsJSContext::GarbageCollectNow(JS::GCReason aReason,- IsIncremental aIncremental,- IsShrinking aShrinking,- int64_t aSliceMillis) {+static void GarbageCollectImpl(JS::GCReason aReason,+ nsJSContext::IsShrinking aShrinking,+ const js::SliceBudget& aBudget) { AUTO_PROFILER_LABEL_DYNAMIC_CSTR_NONSENSITIVE( "nsJSContext::GarbageCollectNow", GCCC, JS::ExplainGCReason(aReason));- MOZ_ASSERT_IF(aSliceMillis, aIncremental == IncrementalGC);+ bool wantIncremental = !aBudget.isUnlimited(); // We use danger::GetJSContext() since AutoJSAPI will assert if the current // thread's context is null (such as during shutdown).@@ -1044,18 +1042,18 @@ return; }- if (sScheduler.InIncrementalGC() && aIncremental == IncrementalGC) {+ if (sScheduler.InIncrementalGC() && wantIncremental) { // We're in the middle of incremental GC. Do another slice. JS::PrepareForIncrementalGC(cx);- JS::IncrementalGCSlice(cx, aReason, aSliceMillis);- return;- }-- JS::GCOptions options =- aShrinking == ShrinkingGC ? JS::GCOptions::Shrink : JS::GCOptions::Normal;-- if (aIncremental == NonIncrementalGC ||- aReason == JS::GCReason::FULL_GC_TIMER) {+ JS::IncrementalGCSlice(cx, aReason, aBudget);+ return;+ }++ JS::GCOptions options = aShrinking == nsJSContext::ShrinkingGC+ ? JS::GCOptions::Shrink+ : JS::GCOptions::Normal;++ if (!wantIncremental || aReason == JS::GCReason::FULL_GC_TIMER) { sScheduler.SetNeedsFullGC(); }@@ -1063,14 +1061,29 @@ JS::PrepareForFullGC(cx); }- if (aIncremental == IncrementalGC) {+ if (wantIncremental) { // Incremental GC slices will be triggered by the GC Runner. If one doesn't // already exist, create it in the GC_SLICE_END callback for the first // slice being executed here.- JS::StartIncrementalGC(cx, options, aReason, aSliceMillis);+ JS::StartIncrementalGC(cx, options, aReason, aBudget); } else { JS::NonIncrementalGC(cx, options, aReason); }+}++// static+void nsJSContext::GarbageCollectNow(JS::GCReason aReason,+ IsShrinking aShrinking) {+ GarbageCollectImpl(aReason, aShrinking, js::SliceBudget::unlimited());+}++// static+void nsJSContext::RunIncrementalGCSlice(JS::GCReason aReason,+ IsShrinking aShrinking,+ TimeDuration aBudget) {+ js::SliceBudget budget = sScheduler.CreateGCSliceBudget(+ aReason, static_cast<int64_t>(aBudget.ToMilliseconds()));+ GarbageCollectImpl(aReason, aShrinking, budget); } static void FinishAnyIncrementalGC() {@@ -1182,7 +1195,9 @@ if (!mIdleDeadline.IsNull()) { if (mIdleDeadline < mEndSliceTime) { // This slice overflowed the idle period.- idleDuration = mIdleDeadline - mBeginSliceTime;+ if (mIdleDeadline > mBeginSliceTime) {+ idleDuration = mIdleDeadline - mBeginSliceTime;+ } } else { idleDuration = duration; }@@ -1642,12 +1657,10 @@ return; } nsJSContext::GarbageCollectNow(JS::GCReason::MEM_PRESSURE,- nsJSContext::NonIncrementalGC, nsJSContext::ShrinkingGC); nsJSContext::CycleCollectNow(CCReason::MEM_PRESSURE); if (sScheduler.NeedsGCAfterCC()) { nsJSContext::GarbageCollectNow(JS::GCReason::MEM_PRESSURE,- nsJSContext::NonIncrementalGC, nsJSContext::ShrinkingGC); } }
Here's the analysis of the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential Integer Overflow/Underflow] [dom/base/nsJSEnvironment.cpp] [Lines 1182-1195] [Old Code] if (!mIdleDeadline.IsNull()) { if (mIdleDeadline < mEndSliceTime) { // This slice overflowed the idle period. idleDuration = mIdleDeadline - mBeginSliceTime; } else { idleDuration = duration; } } [Fixed Code] if (!mIdleDeadline.IsNull()) { if (mIdleDeadline < mEndSliceTime) { // This slice overflowed the idle period. if (mIdleDeadline > mBeginSliceTime) { idleDuration = mIdleDeadline - mBeginSliceTime; } } else { idleDuration = duration; } } 2. Vulnerability Existed: not sure [Potential Memory Management Issue] [dom/base/nsJSEnvironment.cpp] [Lines 1642-1657] [Old Code] nsJSContext::GarbageCollectNow(JS::GCReason::MEM_PRESSURE, nsJSContext::NonIncrementalGC, nsJSContext::ShrinkingGC); [Fixed Code] nsJSContext::GarbageCollectNow(JS::GCReason::MEM_PRESSURE, nsJSContext::ShrinkingGC); The changes appear to be primarily refactoring the garbage collection code and adding safety checks. The first change adds a check to prevent potential negative duration calculations, which could be related to timing attacks or integer underflow issues. The second change simplifies the garbage collection call by removing an explicit NonIncrementalGC parameter, suggesting the function now handles this internally more securely. However, without more context about the specific security implications of these changes, I can't definitively identify specific vulnerabilities. The changes seem to improve code safety and robustness, but it's not clear if they're fixing known vulnerabilities or just general code improvements.
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/third_party_build/gn-configs/README.md+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/media/webrtc/third_party_build/gn-configs/README.md@@ -1,9 +1,10 @@ # Generate new gn json files and moz.build files for building libwebrtc in our tree-1. If generating on macOS for Apple Silicon (cross-compiling), make sure to have at least-[Xcode 12.2](https://download.developer.apple.com/Developer_Tools/Xcode_12.2/Xcode_12.2.xip).+1. If generating on macOS for Apple Silicon (cross-compiling), make sure to have+ at least [Xcode 12.2](https://download.developer.apple.com/Developer_Tools/Xcode_12.2/Xcode_12.2.xip).- In addition the aarch64 Rust target will need to be installed via: `rustup target add aarch64-apple-darwin`+ The aarch64 Rust target will need to be installed via:+ `rustup target add aarch64-apple-darwin` 2. If generating on Windows 10, Visual Studio 2019 is required. Please follow the install instructions from [here](https://firefox-source-docs.mozilla.org/setup/windows_build.html)@@ -14,86 +15,85 @@ - MSVC v142 - VS2019 C++ ARM64 build tools "Debugging Tools for Windows" is also required.- - Under `Settings -> Apps` search for "Windows Software Development Kit" with the version- number 10.0.19041.685.+ - Under `Settings -> Apps` search for "Windows Software Development Kit" with+ the version number 10.0.19041.685. - select Modify (and allow the installer to modify) - select Change and then click Next - select "Debugging Tools for Windows" and then click Change.- And the aarch64 Rust target will need to be installed via: `rustup target add aarch64-pc-windows-msvc`+ The aarch64 Rust target will need to be installed via:+ `rustup target add aarch64-pc-windows-msvc`-3. See information in `third_party/libwebrtc/README.mozilla` for the proper revision of libwebrtc+3. See information in `third_party/libwebrtc/README.mozilla` for the proper+ revision of libwebrtc libwebrtc updated from commit https://github.com/mozilla/libwebrtc/archive/149d693483e9055f574d9d65b01fe75a186b654b.tar.gz on 2020-11-30T15:48:48.472088. third_party updated from commit https://chromium.googlesource.com/chromium/src/third_party/+archive/5dc5a4a45df9592baa8e8c5f896006d9193d8e45.tar.gz on 2020-11-30T17:00:15.612630.- In our current case, the revision is `149d693483e9055f574d9d65b01fe75a186b654b` which- corresponds to:+ In our current case, the revision is `149d693483e9055f574d9d65b01fe75a186b654b`+ which corresponds to: mozilla-modifications-rel86-4. Clone Mozilla's version of libwebrtc from [libwebrtc](https://github.com/mozilla/libwebrtc)+ This commit was made on `Thu Nov 19 14:14:00 2020`.- git clone https://github.com/mozilla/libwebrtc moz-libwebrtc- export MOZ_LIBWEBRTC=`pwd`/moz-libwebrtc- (cd moz-libwebrtc ; git checkout mozilla-modifications-rel86)+4. Download a version of the `gn` executable that corresponds to+ `Thu Nov 19 14:14:00 2020`. In our case, that is version `1889 (8fe02009)`.+ + - [Win](https://chrome-infra-packages.appspot.com/p/gn/gn/windows-amd64/+/e_UmTHedzuu4zJ2gdpW8jrFFNnzIhThljx3jn3RMlVsC)+ - [Linux](https://chrome-infra-packages.appspot.com/p/gn/gn/linux-amd64/+/bvBFKgehaepiKy_YhFnbiOpF38CK26N2OyE1R1jXof0C)+ - [macOS](https://chrome-infra-packages.appspot.com/p/gn/gn/mac-amd64/+/nXvMRpyJhLhisAcnRmU5s9UZqovzMAhKAvWjax-swioC)- Note that branch was made on `Thu Nov 19 14:14:00 2020`+ Find the downloaded `.zip` file, unzip and export the location of the+ executable:++ unzip gn-mac-amd64.zip && export GN=`pwd`/gn+ unzip gn-windows-amd64.zip && export GN=`pwd`/gn.exe+ unzip gn-linux-amd64.zip && export GN=`pwd`/gn++ On platforms that don't have pre-built `gn` executables, `ninja` and `gn` can+ be easily built:++ git clone https://github.com/ninja-build/ninja.git+ git clone https://gn.googlesource.com/gn+ (cd gn && git checkout 8fe02009)+ (cd ninja && ./configure.py --bootstrap)+ (export NINJA=`pwd`/ninja/ninja ; cd gn && python build/gen.py && $NINJA -C out)+ export GN=`pwd`/gn/out/gn++ On OpenBSD, a slightly newer version of `gn` is needed in order to build:++ (cd gn && git checkout 31f2bba8) 5. Clone `depot_tools` from [depot_tools](https://chromium.googlesource.com/chromium/tools/depot_tools.git) git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git export DEPOT_TOOLS=`pwd`/depot_tools- If generating files on Windows, the following steps must be completed- from a traditional Windows Cmd prompt (cmd.exe) launched from the start- menu or search bar. This allows `gclient` to properly bootstrap the- required python setup.-- cd {depot_tools directory}- set PATH=%CD%;%PATH%- set DEPOT_TOOLS_WIN_TOOLCHAIN=0- set vs2019_install="c:\Program Files (x86)\Microsoft Visual Studio\2019\Community"- gclient- exit-- Now, we need to checkout a revision of `depot_tools` that corresponds to the date of- our libwebrtc branch. The closest `depot_tools` commit to `Thu Nov 19 14:14:00 2020` is- `e7d1862b155ac3ccbef72c4d70629b5c88ffcb32`. There is additional information on how to- more automatically determine this [here](https://chromium.googlesource.com/chromium/src/+/master/docs/building_old_revisions.md).+ Now, we need to checkout a revision of `depot_tools` that corresponds to the+ date of our libwebrtc branch. The closest `depot_tools` commit to+ `Thu Nov 19 14:14:00 2020` is `e7d1862b155ac3ccbef72c4d70629b5c88ffcb32`.+ There is additional information on how to more automatically determine this+ [here](https://chromium.googlesource.com/chromium/src/+/master/docs/building_old_revisions.md). (cd depot_tools ; git checkout e7d1862b155ac3ccbef72c4d70629b5c88ffcb32 )-6. It is necessary to let `depot_tools` pull information into the `libwebrtc` tree as well. This can take a while.+6. It is time to generate the build files. The script should be run from the+ top directory of our firefox tree.- (cd moz-libwebrtc ; \- export PATH=$DEPOT_TOOLS:$PATH ; \- export DEPOT_TOOLS_UPDATE=0 ; \- export DEPOT_TOOLS_WIN_TOOLCHAIN=0 ; \- gclient config https://github.com/mozilla/libwebrtc && \- gclient sync -D --force --reset --with_branch_heads \- )- - Note that if one uses `gclient` sync with a different output directory `$MOZ_LIBWEBRTC_GIT`- must be set to the original clone directory, and `$MOZ_LIBWEBRTC` needs to be set to the- directory created by `gclient sync`.+ bash ./dom/media/webrtc/third_party_build/gn-configs/generate-gn-build-files.sh-7. Now it is time to generate the build files. The script should be run from the top-directory of our firefox tree.+ Debugging the generate script itself may prove useful, and one can do this by+ setting the DEBUG_GEN environment variable to a non-empty value. This will + print everything that the script executes.- ./dom/media/webrtc/third_party_build/gn-configs/generate-gn-build-files.sh-- Debugging the generate script itself may prove useful, and one can do this by setting the DEBUG_GEN environment- variable to a non-empty value. This will print everything that the script executes.--8. Checkin all the generated/modified files and try your build!+7. Checkin all the generated/modified files and try your build! # Adding new configurations to the build-- Each new platform/architecture will require 2 new mozconfig files,- one for the debug build and one for the non-debug build. The- filenames follow the same pattern as the generated json files,- `a-b-c-d.mozconfig` where:+- Each new platform/architecture will require 2 new mozconfig files, one for the+ debug build and one for the non-debug build. The filenames follow the same+ pattern as the generated json files, `a-b-c-d.mozconfig` where: - a = generating cpu (example: x64) - b = debug (True / False) - c = target cpu (example: x64 / arm64)@@ -103,9 +103,9 @@ - The new configs must be added to the appropriate platform section in `generate-gn-build-files.sh`.-**Note:** when adding new mozconfig files, especially for linux/android-configs, it is important to include the `ac_add_options---enable-bootstrap`. This ensures switching archtectures for-"cross-compiled" generation works properly. For example, when generating-`x86` or `arm64` linux json files, it would be necessary to install additional-libraries in order for the configure step to complete.+**Note:** when adding new mozconfig files, especially for linux/android configs,+it is important to include the `ac_add_options --enable-bootstrap`. This+ensures switching archtectures for "cross-compiled" generation works properly.+For example, when generating `x86` or `arm64` linux json files, it would be+necessary to install additional libraries in order for the configure step to+complete.
After analyzing the provided code diff, I don't find any security vulnerabilities being fixed. The changes appear to be documentation updates and formatting improvements rather than security fixes. Here's the analysis: 1. Vulnerability Existed: no The changes are primarily formatting improvements and documentation updates, with no security-related fixes identified. 2. Vulnerability Existed: no The diff shows changes to the README.md file that include: - Formatting improvements (line wrapping, spacing) - Updated instructions for building libwebrtc - Reorganization of steps - Updated download links for gn executables - Removal of some Windows-specific instructions - General cleanup and clarification of text 3. Vulnerability Existed: no The changes don't address any specific security vulnerabilities but rather improve the documentation for building libwebrtc in the Firefox tree. The modifications appear to be part of routine maintenance and documentation improvement rather than security fixes. No specific vulnerabilities (like XSS, SQLi, RCE, etc.) are being addressed in this diff. The changes are focused on build system documentation and instructions.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/layout/reftests/css-grid/grid-fragmentation-030-ref.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/layout/reftests/css-grid/grid-fragmentation-030-ref.html@@ -21,7 +21,7 @@ -ms-column-fill: auto; -webkit-column-fill: auto; column-fill: auto;- border: 2px dashed;+ border: 2px solid salmon; margin-bottom: 5px; }
After analyzing the provided code diff, here's the security assessment: Vulnerability Existed: no No security vulnerability found [File] layout/reftests/css-grid/grid-fragmentation-030-ref.html [Lines] 21 [Old Code] border: 2px dashed; [Fixed Code] border: 2px solid salmon; Additional Details: - This appears to be a purely visual/style change in a test reference file - The change modifies the border style from dashed to solid and adds a color (salmon) - No security implications are evident as this is a CSS styling change in a test file - The file appears to be part of Firefox's layout testing infrastructure for CSS Grid functionality
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-cascade/initial-color-background-001.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-cascade/initial-color-background-001.html@@ -7,7 +7,6 @@ <link rel="help" href="http://www.w3.org/TR/css-cascade-3/#initial"> <link rel="help" href="http://www.w3.org/TR/css-cascade-4/#initial"> <link rel="match" href="initial-color-background-001-ref.html">- <meta name="flags" content=""> <meta name="assert" content="initial is not the same as inherit. color:initial results in non-red. background-color:initial results in transparent."> <style> body {
Based on the provided diff, I'll analyze it for security vulnerabilities: 1. Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/css/css-cascade/initial-color-background-001.html [Lines 7] Old Code: `<meta name="flags" content="">` Fixed Code: (line removed) Additional Details: - The change simply removes an empty meta tag for "flags" which appears to be test-related metadata - This doesn't appear to be a security-related fix but rather a cleanup of test metadata - No known vulnerability patterns (XSS, injection, etc.) are present in this change - The modification doesn't affect any security-sensitive functionality Since this is just removing an empty meta tag from a test file, there doesn't appear to be any security implication to this change. The modification seems to be part of routine test 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/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights.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.measure.emHeights.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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); let fonts = (self.fonts ? self.fonts : document.fonts);
Based on the provided diff, I'll analyze it for potential security vulnerabilities: 1. Vulnerability Existed: no No security vulnerability found [File] [Lines 17-18] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); Additional Analysis: - The changes appear to be purely variable renaming (from `offscreenCanvas` to `canvas`) - No security-related changes are evident in this diff - The functionality remains identical, just with a different variable name - No security vulnerabilities are being addressed in this change - The change is likely for code consistency or readability purposes No security vulnerabilities were fixed in this diff. The modification is purely cosmetic/refactoring in nature.
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/canvas/WebGLContext.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/canvas/WebGLContext.cpp@@ -222,7 +222,7 @@ void ClientWebGLContext::MarkCanvasDirty() { if (!mCanvasElement && !mOffscreenCanvas) return;- mCapturedFrameInvalidated = true;+ mFrameCaptureState = FrameCaptureState::DIRTY; if (mIsCanvasDirty) return; mIsCanvasDirty = true;@@ -595,6 +595,9 @@ } if (kIsMacOS) { types[layers::SurfaceDescriptor::TSurfaceDescriptorMacIOSurface] = true;+ }+ if (kIsAndroid) {+ types[layers::SurfaceDescriptor::TSurfaceTextureDescriptor] = true; } return types; };
I'll analyze the provided code diff for security fixes following the specified format. 1. First change: Vulnerability Existed: not sure [Frame state tracking improvement] [dom/canvas/WebGLContext.cpp] [Lines 222] [Old Code] mCapturedFrameInvalidated = true; [Fixed Code] mFrameCaptureState = FrameCaptureState::DIRTY; Additional Details: This appears to be a code improvement rather than a security fix. The change replaces a simple boolean flag with a more explicit state tracking mechanism, but I'm not certain if this addresses any specific vulnerability. 2. Second change: Vulnerability Existed: not sure [Android surface descriptor addition] [dom/canvas/WebGLContext.cpp] [Lines 595] [Old Code] (no Android-specific descriptor) [Fixed Code] types[layers::SurfaceDescriptor::TSurfaceTextureDescriptor] = true; Additional Details: This adds support for Android surface textures in the descriptor types. While this could potentially relate to surface handling security, there's no clear evidence this fixes a specific vulnerability. It might be a feature addition or compatibility improvement. Note: Neither change clearly indicates a specific vulnerability being fixed. The changes appear to be code improvements and platform support additions rather than direct security patches. Without more context or vulnerability reports, I can't definitively identify any security vulnerabilities being addressed.
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.