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/taskcluster/ci/toolchain/llvm-symbolizer.yml+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/taskcluster/ci/toolchain/llvm-symbolizer.yml@@ -19,7 +19,7 @@ - linux64-clang macosx64-llvm-symbolizer:- description: "llvm-symbolizer for Linux"+ description: "llvm-symbolizer for macOS x64" treeherder: symbol: TM(llvm-symbolizer) fetches:@@ -27,7 +27,7 @@ - macosx64-clang win64-llvm-symbolizer:- description: "llvm-symbolizer for Linux"+ description: "llvm-symbolizer for Windows" treeherder: symbol: TW64(llvm-symbolizer) fetches:
Based on the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely descriptive corrections to accurately reflect the platform for each llvm-symbolizer configuration. Here's the analysis following your requested format: Vulnerability Existed: no [No security vulnerability found] [File] taskcluster/ci/toolchain/llvm-symbolizer.yml [Lines] Description corrections for macosx64-llvm-symbolizer and win64-llvm-symbolizer [Old Code] "llvm-symbolizer for Linux" (for both macOS and Windows configurations) [Fixed Code] Correct platform-specific descriptions The changes are: 1. Changed macOS description from "Linux" to "macOS x64" 2. Changed Windows description from "Linux" to "Windows" These are documentation/description fixes that don't impact security. No actual code or security-relevant configuration was modified.
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/xul/nsXULElement.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/xul/nsXULElement.cpp@@ -458,7 +458,7 @@ if (pm) { if (aOpenFlag) { // Nothing will happen if this element isn't a menu.- pm->ShowMenu(this, false, false);+ pm->ShowMenu(this, false); } else { // Nothing will happen if this element isn't a menu. pm->HideMenu(this);
Let me analyze the code diff for security fixes: Vulnerability Existed: not sure Potential Parameter Tampering [File] dom/xul/nsXULElement.cpp [Lines 458-461] [Old Code] pm->ShowMenu(this, false, false); [Fixed Code] pm->ShowMenu(this, false); Additional Details: The change removes one boolean parameter from the ShowMenu call. While this could be a security fix (perhaps removing an unsafe parameter that could lead to unexpected behavior), without more context about the ShowMenu implementation and what the removed parameter controlled, I can't definitively identify a specific vulnerability. This could be related to fixing potential parameter tampering issues or simplifying the API to prevent misuse, but I'm not certain.
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/initial.reset.2dstate.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/initial.reset.2dstate.html@@ -17,70 +17,70 @@ }); 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 = 100;+canvas.width = 100; var default_val; default_val = ctx.strokeStyle; ctx.strokeStyle = "#ff0000";-offscreenCanvas.width = 100;+canvas.width = 100; _assertSame(ctx.strokeStyle, default_val, "ctx.strokeStyle", "default_val"); default_val = ctx.fillStyle; ctx.fillStyle = "#ff0000";-offscreenCanvas.width = 100;+canvas.width = 100; _assertSame(ctx.fillStyle, default_val, "ctx.fillStyle", "default_val"); default_val = ctx.globalAlpha; ctx.globalAlpha = 0.5;-offscreenCanvas.width = 100;+canvas.width = 100; _assertSame(ctx.globalAlpha, default_val, "ctx.globalAlpha", "default_val"); default_val = ctx.lineWidth; ctx.lineWidth = 0.5;-offscreenCanvas.width = 100;+canvas.width = 100; _assertSame(ctx.lineWidth, default_val, "ctx.lineWidth", "default_val"); default_val = ctx.lineCap; ctx.lineCap = "round";-offscreenCanvas.width = 100;+canvas.width = 100; _assertSame(ctx.lineCap, default_val, "ctx.lineCap", "default_val"); default_val = ctx.lineJoin; ctx.lineJoin = "round";-offscreenCanvas.width = 100;+canvas.width = 100; _assertSame(ctx.lineJoin, default_val, "ctx.lineJoin", "default_val"); default_val = ctx.miterLimit; ctx.miterLimit = 0.5;-offscreenCanvas.width = 100;+canvas.width = 100; _assertSame(ctx.miterLimit, default_val, "ctx.miterLimit", "default_val"); default_val = ctx.shadowOffsetX; ctx.shadowOffsetX = 5;-offscreenCanvas.width = 100;+canvas.width = 100; _assertSame(ctx.shadowOffsetX, default_val, "ctx.shadowOffsetX", "default_val"); default_val = ctx.shadowOffsetY; ctx.shadowOffsetY = 5;-offscreenCanvas.width = 100;+canvas.width = 100; _assertSame(ctx.shadowOffsetY, default_val, "ctx.shadowOffsetY", "default_val"); default_val = ctx.shadowBlur; ctx.shadowBlur = 5;-offscreenCanvas.width = 100;+canvas.width = 100; _assertSame(ctx.shadowBlur, default_val, "ctx.shadowBlur", "default_val"); default_val = ctx.shadowColor; ctx.shadowColor = "#ff0000";-offscreenCanvas.width = 100;+canvas.width = 100; _assertSame(ctx.shadowColor, default_val, "ctx.shadowColor", "default_val"); default_val = ctx.globalCompositeOperation; ctx.globalCompositeOperation = "copy";-offscreenCanvas.width = 100;+canvas.width = 100; _assertSame(ctx.globalCompositeOperation, default_val, "ctx.globalCompositeOperation", "default_val"); t.done();
After analyzing the provided code diff, I don't find any security vulnerabilities. The changes appear to be purely variable renaming (from `offscreenCanvas` to `canvas`) and don't affect security in any way. Here's the structured response: Vulnerability Existed: no No security vulnerability found in the diff. The changes are purely variable renaming and don't affect security. For completeness, here's the analysis of the changes: - File: testing/web-platform/tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.2dstate.html - Changes: All instances of `offscreenCanvas` were renamed to `canvas` - Old Code: `var offscreenCanvas = new OffscreenCanvas(100, 50);` and subsequent uses - Fixed Code: `var canvas = new OffscreenCanvas(100, 50);` and subsequent uses This appears to be a code style/readability change rather than a security fix. The functionality remains identical, 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/toolkit/components/glean/ipc/FOGIPC.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/toolkit/components/glean/ipc/FOGIPC.cpp@@ -5,6 +5,7 @@ #include "FOGIPC.h"+#include <limits> #include "mozilla/glean/fog_ffi_generated.h" #include "mozilla/glean/GleanMetrics.h" #include "mozilla/dom/ContentChild.h"@@ -13,6 +14,7 @@ #include "mozilla/gfx/GPUChild.h" #include "mozilla/gfx/GPUParent.h" #include "mozilla/gfx/GPUProcessManager.h"+#include "mozilla/Hal.h" #include "mozilla/MozPromise.h" #include "mozilla/net/SocketProcessChild.h" #include "mozilla/net/SocketProcessParent.h"@@ -20,7 +22,12 @@ #include "mozilla/RDDChild.h" #include "mozilla/RDDParent.h" #include "mozilla/RDDProcessManager.h"+#include "mozilla/ipc/UtilityProcessChild.h"+#include "mozilla/ipc/UtilityProcessManager.h"+#include "mozilla/ipc/UtilityProcessParent.h" #include "mozilla/Unused.h"+#include "GMPPlatform.h"+#include "GMPServiceParent.h" #include "nsIXULRuntime.h" #include "nsTArray.h" #include "nsThreadUtils.h"@@ -29,37 +36,95 @@ using mozilla::gfx::GPUChild; using mozilla::gfx::GPUProcessManager; using mozilla::ipc::ByteBuf;+using mozilla::ipc::UtilityProcessChild;+using mozilla::ipc::UtilityProcessManager;+using mozilla::ipc::UtilityProcessParent; using FlushFOGDataPromise = mozilla::dom::ContentParent::FlushFOGDataPromise; namespace mozilla { namespace glean {-static void RecordPowerMetrics() {+void RecordPowerMetrics() { static uint64_t previousCpuTime = 0, previousGpuTime = 0;- uint64_t cpuTime;- if (NS_FAILED(GetCpuTimeSinceProcessStartInMs(&cpuTime))) {+ uint64_t cpuTime, newCpuTime = 0;+ if (NS_SUCCEEDED(GetCpuTimeSinceProcessStartInMs(&cpuTime)) &&+ cpuTime > previousCpuTime) {+ newCpuTime = cpuTime - previousCpuTime;+ }++ uint64_t gpuTime, newGpuTime = 0;+ if (NS_SUCCEEDED(GetGpuTimeSinceProcessStartInMs(&gpuTime)) &&+ gpuTime > previousGpuTime) {+ newGpuTime = gpuTime - previousGpuTime;+ }++ if (!newCpuTime && !newGpuTime) {+ // Nothing to record. return; }- uint64_t newCpuTime = cpuTime - previousCpuTime;- previousCpuTime += newCpuTime;+ // Compute the process type string.+ nsAutoCString type(XRE_GetProcessTypeString());+ if (XRE_IsContentProcess()) {+ auto* cc = dom::ContentChild::GetSingleton();+ if (cc) {+ type.Assign(dom::RemoteTypePrefix(cc->GetRemoteType()));+ if (StringBeginsWith(type, WEB_REMOTE_TYPE)) {+ type.AssignLiteral("web");+ switch (cc->GetProcessPriority()) {+ case hal::PROCESS_PRIORITY_BACKGROUND:+ type.AppendLiteral(".background");+ break;+ case hal::PROCESS_PRIORITY_FOREGROUND:+ type.AppendLiteral(".foreground");+ break;+ case hal::PROCESS_PRIORITY_BACKGROUND_PERCEIVABLE:+ type.AppendLiteral(".background-perceivable");+ break;+ default:+ break;+ }+ }+ }+ } else if (XRE_IsParentProcess()) {+ if (nsContentUtils::GetUserIsInteracting()) {+ type.AssignLiteral("parent.active");+ } else {+ type.AssignLiteral("parent.inactive");+ }+ hal::WakeLockInformation info;+ GetWakeLockInfo(u"video-playing"_ns, &info);+ if (info.numLocks() != 0 && info.numHidden() < info.numLocks()) {+ type.AppendLiteral(".playing-video");+ } else {+ GetWakeLockInfo(u"audio-playing"_ns, &info);+ if (info.numLocks()) {+ type.AppendLiteral(".playing-audio");+ }+ }+ } if (newCpuTime) { // The counters are reset at least once a day. Assuming all cores are used // continuously, an int32 can hold the data for 24.85 cores. // This should be fine for now, but may overflow in the future.- power::total_cpu_time_ms.Add(int32_t(newCpuTime));- }-- uint64_t gpuTime;- if (NS_SUCCEEDED(GetGpuTimeSinceProcessStartInMs(&gpuTime))) {- uint64_t newGpuTime = gpuTime - previousGpuTime;+ // Bug 1751277 tracks a newer, bigger counter.+ int32_t nNewCpuTime = int32_t(newCpuTime);+ if (newCpuTime < std::numeric_limits<int32_t>::max()) {+ power::total_cpu_time_ms.Add(nNewCpuTime);+ power::cpu_time_per_process_type_ms.Get(type).Add(nNewCpuTime);+ }+ previousCpuTime += newCpuTime;+ }++ if (newGpuTime) {+ int32_t nNewGpuTime = int32_t(newGpuTime);+ if (newGpuTime < std::numeric_limits<int32_t>::max()) {+ power::total_gpu_time_ms.Add(nNewGpuTime);+ power::gpu_time_per_process_type_ms.Get(type).Add(nNewGpuTime);+ } previousGpuTime += newGpuTime;-- if (newGpuTime) {- power::total_gpu_time_ms.Add(int32_t(newGpuTime));- } } }@@ -118,6 +183,26 @@ if (net::SocketProcessParent* socketParent = net::SocketProcessParent::GetSingleton()) { promises.EmplaceBack(socketParent->SendFlushFOGData());+ }++#if !defined(XP_WIN) || !defined(_ARM64_)+ {+ RefPtr<gmp::GeckoMediaPluginServiceParent> gmps(+ gmp::GeckoMediaPluginServiceParent::GetSingleton());+ // There can be multiple Gecko Media Plugin processes, but iterating+ // through them requires locking a mutex and the IPCs need to be sent+ // from a different thread, so it's better to let the+ // GeckoMediaPluginServiceParent code do it for us.+ gmps->SendFlushFOGData(promises);+ }+#endif++ if (RefPtr<UtilityProcessManager> utilityManager =+ UtilityProcessManager::GetSingleton()) {+ if (UtilityProcessParent* utilityParent =+ utilityManager->GetProcessParent()) {+ promises.EmplaceBack(utilityParent->SendFlushFOGData());+ } } if (promises.Length() == 0) {@@ -166,6 +251,9 @@ case GeckoProcessType_Content: mozilla::dom::ContentChild::GetSingleton()->SendFOGData(std::move(buf)); break;+ case GeckoProcessType_GMPlugin: {+ gmp::SendFOGData(std::move(buf));+ } break; case GeckoProcessType_GPU: Unused << mozilla::gfx::GPUParent::GetSingleton()->SendFOGData( std::move(buf));@@ -175,6 +263,10 @@ break; case GeckoProcessType_Socket: Unused << net::SocketProcessChild::GetSingleton()->SendFOGData(+ std::move(buf));+ break;+ case GeckoProcessType_Utility:+ Unused << ipc::UtilityProcessChild::GetSingleton()->SendFOGData( std::move(buf)); break; default:@@ -206,6 +298,14 @@ void TestTriggerMetrics(uint32_t aProcessType, const RefPtr<dom::Promise>& promise) { switch (aProcessType) {+ case nsIXULRuntime::PROCESS_TYPE_GMPLUGIN: {+ RefPtr<gmp::GeckoMediaPluginServiceParent> gmps(+ gmp::GeckoMediaPluginServiceParent::GetSingleton());+ gmps->TestTriggerMetrics()->Then(+ GetCurrentSerialEventTarget(), __func__,+ [promise]() { promise->MaybeResolveWithUndefined(); },+ [promise]() { promise->MaybeRejectWithUndefined(); });+ } break; case nsIXULRuntime::PROCESS_TYPE_GPU: gfx::GPUProcessManager::Get()->TestTriggerMetrics()->Then( GetCurrentSerialEventTarget(), __func__,@@ -226,6 +326,15 @@ [promise]() { promise->MaybeResolveWithUndefined(); }, [promise]() { promise->MaybeRejectWithUndefined(); }); break;+ case nsIXULRuntime::PROCESS_TYPE_UTILITY:+ Unused << ipc::UtilityProcessManager::GetSingleton()+ ->GetProcessParent()+ ->SendTestTriggerMetrics()+ ->Then(+ GetCurrentSerialEventTarget(), __func__,+ [promise]() { promise->MaybeResolveWithUndefined(); },+ [promise]() { promise->MaybeRejectWithUndefined(); });+ break; default: promise->MaybeRejectWithUndefined(); break;
I'll analyze the code diff for security vulnerabilities. Here are the findings: 1. Vulnerability Existed: not sure [Potential Integer Overflow] [File: toolkit/components/glean/ipc/FOGIPC.cpp] [Lines: ~60-80] [Old Code] uint64_t newCpuTime = cpuTime - previousCpuTime; previousCpuTime += newCpuTime; power::total_cpu_time_ms.Add(int32_t(newCpuTime)); [Fixed Code] int32_t nNewCpuTime = int32_t(newCpuTime); if (newCpuTime < std::numeric_limits<int32_t>::max()) { power::total_cpu_time_ms.Add(nNewCpuTime); power::cpu_time_per_process_type_ms.Get(type).Add(nNewCpuTime); } previousCpuTime += newCpuTime; 2. Vulnerability Existed: not sure [Potential Integer Overflow] [File: toolkit/components/glean/ipc/FOGIPC.cpp] [Lines: ~80-90] [Old Code] uint64_t newGpuTime = gpuTime - previousGpuTime; previousGpuTime += newGpuTime; power::total_gpu_time_ms.Add(int32_t(newGpuTime)); [Fixed Code] int32_t nNewGpuTime = int32_t(newGpuTime); if (newGpuTime < std::numeric_limits<int32_t>::max()) { power::total_gpu_time_ms.Add(nNewGpuTime); power::gpu_time_per_process_type_ms.Get(type).Add(nNewGpuTime); } previousGpuTime += newGpuTime; 3. Vulnerability Existed: not sure [Potential Race Condition] [File: toolkit/components/glean/ipc/FOGIPC.cpp] [Lines: ~45-55] [Old Code] static uint64_t previousCpuTime = 0, previousGpuTime = 0; uint64_t cpuTime; if (NS_FAILED(GetCpuTimeSinceProcessStartInMs(&cpuTime))) { return; } [Fixed Code] static uint64_t previousCpuTime = 0, previousGpuTime = 0; uint64_t cpuTime, newCpuTime = 0; if (NS_SUCCEEDED(GetCpuTimeSinceProcessStartInMs(&cpuTime)) && cpuTime > previousCpuTime) { newCpuTime = cpuTime - previousCpuTime; } The main changes appear to be: 1. Added bounds checking for integer values before casting to int32_t 2. Improved error handling and condition checking for time values 3. Added checks to ensure time values are increasing (cpuTime > previousCpuTime) 4. Added new process types (GMPPlugin, Utility) to the IPC handling While these changes improve robustness, I'm not certain they fix specific known vulnerabilities. The changes appear to be more about preventing potential issues (like integer overflows) and expanding functionality to new process types.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.worker.js@@ -13,8 +13,8 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50);@@ -23,8 +23,8 @@ ctx.beginPath(); ctx.bezierCurveTo(0, 25, 100, 25, 100, 25); ctx.stroke();-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");-_assertPixel(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255"); t.done(); });
After analyzing the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely cosmetic/refactoring changes where a variable name was changed from `offscreenCanvas` to `canvas` for consistency or readability. The actual functionality remains the same. Vulnerability Existed: no No security vulnerability found in this diff. The changes are variable renaming only. For completeness, here's the structure showing no vulnerability was fixed: Vulnerability Existed: no [No vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.worker.js] [Lines 13,14,23,24] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); _assertPixel(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); _assertPixel(canvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255");
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/2d.getcontext.extraargs.create.worker.js+++ /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/2d.getcontext.extraargs.create.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'); _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', false, {}, [], 1, "2"), null, "(new OffscreenCanvas(100, 50)).getContext('2d', false, {}, [], 1, \"2\")", "null"); _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', 123), null, "(new OffscreenCanvas(100, 50)).getContext('2d', 123)", "null");
Analyzing the provided code diff, here's the security assessment: 1. Vulnerability Existed: no No specific vulnerability found [File] [Lines 13-14] [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 Notes: - The changes appear to be purely variable renaming (offscreenCanvas → canvas) with no security implications - The test assertions below the changed lines remain unchanged and test the same functionality - No security-related vulnerabilities (e.g., XSS, injection, memory safety issues) are apparent in this diff - The modification seems to be for code consistency or readability rather than security fixes
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.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)@@ -30,11 +30,11 @@ ctx.fillStyle = '#f00'; ctx.fillRect(40, 20, 20, 20) ctx.putImageData(imgdata, -20, -10, 60, 30, 20, 20);-_assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);-_assertPixelApprox(offscreenCanvas, 35,25, 0,255,0,255, "35,25", "0,255,0,255", 2);-_assertPixelApprox(offscreenCanvas, 65,25, 0,255,0,255, "65,25", "0,255,0,255", 2);-_assertPixelApprox(offscreenCanvas, 50,15, 0,255,0,255, "50,15", "0,255,0,255", 2);-_assertPixelApprox(offscreenCanvas, 50,45, 0,255,0,255, "50,45", "0,255,0,255", 2);+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);+_assertPixelApprox(canvas, 35,25, 0,255,0,255, "35,25", "0,255,0,255", 2);+_assertPixelApprox(canvas, 65,25, 0,255,0,255, "65,25", "0,255,0,255", 2);+_assertPixelApprox(canvas, 50,15, 0,255,0,255, "50,15", "0,255,0,255", 2);+_assertPixelApprox(canvas, 50,45, 0,255,0,255, "50,45", "0,255,0,255", 2); t.done(); });
After analyzing the provided code diff, here's the security assessment: 1. Vulnerability Existed: no No security vulnerability found [testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.html] [Lines 17-30] 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 security vulnerability found [testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.html] [Lines 30-35] Old Code: _assertPixelApprox(offscreenCanvas, ...); Fixed Code: _assertPixelApprox(canvas, ...); The changes appear to be purely variable renaming (from 'offscreenCanvas' to 'canvas') and don't introduce or fix any security vulnerabilities. The functionality remains the same, only the variable name has been changed for consistency or clarity. No security-related patterns or vulnerabilities are affected by 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/js/src/jit/shared/Assembler-shared.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/js/src/jit/shared/Assembler-shared.h@@ -562,7 +562,8 @@ } void setSplatSimd128Load() {- MOZ_ASSERT(type() == Scalar::Float64);+ MOZ_ASSERT(type() == Scalar::Uint8 || type() == Scalar::Uint16 ||+ type() == Scalar::Float32 || type() == Scalar::Float64); MOZ_ASSERT(!isAtomic()); MOZ_ASSERT(loadOp_ == Plain); loadOp_ = Splat;@@ -659,9 +660,13 @@ // This one returns an index as the try note so that it can be looked up // later to add the end point and stack position of the try block. #ifdef ENABLE_WASM_EXCEPTIONS- size_t append(wasm::WasmTryNote tryNote) {- enoughMemory_ &= tryNotes_.append(tryNote);- return tryNotes_.length() - 1;+ [[nodiscard]] bool append(wasm::WasmTryNote tryNote, size_t* tryNoteIndex) {+ if (!tryNotes_.append(tryNote)) {+ enoughMemory_ = false;+ return false;+ }+ *tryNoteIndex = tryNotes_.length() - 1;+ return true; } #endif
Here's the analysis of the provided code diff following the specified format: 1. Vulnerability Existed: yes Type Confusion Vulnerability [js/src/jit/shared/Assembler-shared.h] [Lines 562-563] Old Code: `MOZ_ASSERT(type() == Scalar::Float64);` Fixed Code: `MOZ_ASSERT(type() == Scalar::Uint8 || type() == Scalar::Uint16 || type() == Scalar::Float32 || type() == Scalar::Float64);` Details: The original code only allowed Float64 type for splat operations, which could lead to type confusion if other scalar types were used. The fix expands the allowed types to include Uint8, Uint16, and Float32. 2. Vulnerability Existed: not sure Potential Memory Safety Issue [js/src/jit/shared/Assembler-shared.h] [Lines 659-666] Old Code: `size_t append(wasm::WasmTryNote tryNote) { enoughMemory_ &= tryNotes_.append(tryNote); return tryNotes_.length() - 1; }` Fixed Code: `[[nodiscard]] bool append(wasm::WasmTryNote tryNote, size_t* tryNoteIndex) { if (!tryNotes_.append(tryNote)) { enoughMemory_ = false; return false; } *tryNoteIndex = tryNotes_.length() - 1; return true; }` Details: The change improves error handling by making the function return a boolean status and using an output parameter for the index. While this appears to be a robustness improvement, it's unclear if this was fixing a specific security vulnerability or just general code quality. Note: The second entry is marked as "not sure" because while the change improves error handling and memory safety, there's no clear evidence in the diff that this was fixing an actively exploited vulnerability versus being a proactive improvement.
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/jpeg-xl/lib/jxl/enc_adaptive_quantization.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/jpeg-xl/lib/jxl/enc_adaptive_quantization.h@@ -35,7 +35,7 @@ // used in the FindBestQuantization loops and in some tests. // TODO(veluca): this doesn't seem the best possible file for this function. ImageBundle RoundtripImage(const Image3F& opsin, PassesEncoderState* enc_state,- ThreadPool* pool);+ const JxlCmsInterface& cms, ThreadPool* pool); // Returns an image subsampled by kBlockDim in each direction. If the value // at pixel (x,y) in the returned image is greater than 1.0, it means that@@ -57,7 +57,8 @@ // dequant_float_map and chosen quantization levels. // `linear` is only used in Kitten mode or slower. void FindBestQuantizer(const ImageBundle* linear, const Image3F& opsin,- PassesEncoderState* enc_state, ThreadPool* pool,+ PassesEncoderState* enc_state,+ const JxlCmsInterface& cms, ThreadPool* pool, AuxOut* aux_out, double rescale = 1.0); } // namespace jxl
Based on the provided diff, I don't see any clear security vulnerabilities being fixed. The changes appear to be functional modifications rather than security fixes. Here's the analysis: 1. Vulnerability Existed: no Function Signature Update [File] third_party/jpeg-xl/lib/jxl/enc_adaptive_quantization.h [Lines] 35-37 Old Code: `ImageBundle RoundtripImage(const Image3F& opsin, PassesEncoderState* enc_state, ThreadPool* pool);` Fixed Code: `ImageBundle RoundtripImage(const Image3F& opsin, PassesEncoderState* enc_state, const JxlCmsInterface& cms, ThreadPool* pool);` 2. Vulnerability Existed: no Function Signature Update [File] third_party/jpeg-xl/lib/jxl/enc_adaptive_quantization.h [Lines] 57-60 Old Code: `void FindBestQuantizer(const ImageBundle* linear, const Image3F& opsin, PassesEncoderState* enc_state, ThreadPool* pool, AuxOut* aux_out, double rescale = 1.0);` Fixed Code: `void FindBestQuantizer(const ImageBundle* linear, const Image3F& opsin, PassesEncoderState* enc_state, const JxlCmsInterface& cms, ThreadPool* pool, AuxOut* aux_out, double rescale = 1.0);` The changes involve adding a `const JxlCmsInterface& cms` parameter to two function signatures, which appears to be related to color management functionality rather than addressing any security issues. There are no obvious security vulnerabilities being patched 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/toolkit/components/backgroundhangmonitor/tests/test_BHRObserver.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/toolkit/components/backgroundhangmonitor/tests/test_BHRObserver.js@@ -10,13 +10,9 @@ // Starting and stopping the profiler with the "stackwalk" flag will cause the // profiler's stackwalking features to be synchronously initialized. This // should prevent us from not initializing BHR quickly enough.- if (!Services.profiler.CanProfile()) {- return false;- } let features = ["stackwalk"]; Services.profiler.StartProfiler(1000, 10, features); Services.profiler.StopProfiler();- return true; } add_task(async function test_BHRObserver() {@@ -25,9 +21,7 @@ return; }- if (!ensureProfilerInitialized()) {- return;- }+ ensureProfilerInitialized(); let telSvc = Cc["@mozilla.org/bhr-telemetry-service;1"].getService() .wrappedJSObject;
Analyzing the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential Profiler Initialization Check Removal] [File: toolkit/components/backgroundhangmonitor/tests/test_BHRObserver.js] [Lines: 10-13, 21-23] [Old Code] if (!Services.profiler.CanProfile()) { return false; } ... if (!ensureProfilerInitialized()) { return; } [Fixed Code] (removed checks) ensureProfilerInitialized(); Additional Details: The diff shows removal of profiler capability checks and function return value checks. While this might be a test code simplification, removing such checks could potentially lead to issues if the profiler isn't available or fails to initialize. However, since this is test code, the security impact is unclear. 2. Vulnerability Existed: no [Code Cleanup/Simplification] [File: toolkit/components/backgroundhangmonitor/tests/test_BHRObserver.js] [Lines: 10-16] [Old Code] if (!Services.profiler.CanProfile()) { return false; } let features = ["stackwalk"]; Services.profiler.StartProfiler(1000, 10, features); Services.profiler.StopProfiler(); return true; [Fixed Code] let features = ["stackwalk"]; Services.profiler.StartProfiler(1000, 10, features); Services.profiler.StopProfiler(); Additional Details: This appears to be a test code simplification rather than a security fix. The removed code was redundant for the test's purpose, but doesn't represent a security vulnerability being fixed.
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/gmp/GMPVideoDecoderChild.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/media/gmp/GMPVideoDecoderChild.cpp@@ -92,7 +92,7 @@ const GMPVideoCodec& aCodecSettings, nsTArray<uint8_t>&& aCodecSpecific, const int32_t& aCoreCount) { if (!mVideoDecoder) {- return IPC_FAIL_NO_REASON(this);+ return IPC_FAIL(this, "!mVideoDecoder"); } // Ignore any return code. It is OK for this to fail without killing the@@ -106,7 +106,7 @@ const GMPVideoEncodedFrameData& aInputFrame, const bool& aMissingFrames, nsTArray<uint8_t>&& aCodecSpecificInfo, const int64_t& aRenderTimeMs) { if (!mVideoDecoder) {- return IPC_FAIL_NO_REASON(this);+ return IPC_FAIL(this, "!mVideoDecoder"); } auto f = new GMPVideoEncodedFrameImpl(aInputFrame, &mVideoHost);@@ -130,7 +130,7 @@ mozilla::ipc::IPCResult GMPVideoDecoderChild::RecvReset() { if (!mVideoDecoder) {- return IPC_FAIL_NO_REASON(this);+ return IPC_FAIL(this, "!mVideoDecoder"); } // Ignore any return code. It is OK for this to fail without killing the@@ -142,7 +142,7 @@ mozilla::ipc::IPCResult GMPVideoDecoderChild::RecvDrain() { if (!mVideoDecoder) {- return IPC_FAIL_NO_REASON(this);+ return IPC_FAIL(this, "!mVideoDecoder"); } // Ignore any return code. It is OK for this to fail without killing the@@ -196,11 +196,7 @@ this, &GMPVideoDecoderChild::RecvDecodingComplete)); } #else-# ifdef GMP_SAFE_SHMEM rv = AllocShmem(aSize, aType, aMem);-# else- rv = AllocUnsafeShmem(aSize, aType, aMem);-# endif #endif return rv; }
Here's the analysis of the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Improper Error Handling] [dom/media/gmp/GMPVideoDecoderChild.cpp] [92,106,130,142] [Old Code] return IPC_FAIL_NO_REASON(this); [Fixed Code] return IPC_FAIL(this, "!mVideoDecoder"); 2. Vulnerability Existed: yes [Insecure Shared Memory Allocation] [dom/media/gmp/GMPVideoDecoderChild.cpp] [196] [Old Code] # ifdef GMP_SAFE_SHMEM rv = AllocShmem(aSize, aType, aMem); # else rv = AllocUnsafeShmem(aSize, aType, aMem); # endif [Fixed Code] rv = AllocShmem(aSize, aType, aMem); Analysis: 1. The first set of changes improves error handling by providing more descriptive error messages when mVideoDecoder is null. While not clearly a security vulnerability, better error handling can help with debugging and security analysis. 2. The second change removes the conditional unsafe shared memory allocation, always using the safer AllocShmem() function. This fixes a potential security vulnerability where unsafe shared memory allocation could be used if GMP_SAFE_SHMEM wasn't defined. Unsafe shared memory allocation could potentially lead to security issues like information leaks or memory corruption. The vulnerability in the second case would be related to insecure memory handling, though there isn't a specific CVE name associated with this change. The fix ensures consistent use of safe shared memory allocation across all builds.
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-size-027.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-contain/contain-size-027.html@@ -9,7 +9,6 @@ <link rel="match" href="reference/contain-size-027-ref.html"> <meta content="This test checks that when laying out an inline-block element with 'contain: size', the inline-block element must be treated as if it would have no contents. In this test, the inline-block element has 2 in-flow block descendants made of text." name="assert">- <meta name="flags" content=""> <!--
Based on the provided diff, here's the analysis: Vulnerability Existed: no [No specific vulnerability] [testing/web-platform/tests/css/css-contain/contain-size-027.html] [Lines 9] [Old Code] <meta content="This test checks that when laying out an inline-block element with 'contain: size', the inline-block element must be treated as if it would have no contents. In this test, the inline-block element has 2 in-flow block descendants made of text." name="assert"> <meta name="flags" content=""> [Fixed Code] <meta content="This test checks that when laying out an inline-block element with 'contain: size', the inline-block element must be treated as if it would have no contents. In this test, the inline-block element has 2 in-flow block descendants made of text." name="assert"> The change simply removes an empty meta tag with a "flags" attribute. This appears to be a test cleanup rather than a security fix. There's no indication of any security vulnerability being addressed in this change.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.html@@ -18,8 +18,8 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50);@@ -35,9 +35,9 @@ promise.then(function(response) { createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, -1950, 0, 2000, 50);- _assertPixelApprox(offscreenCanvas, 45,25, 0,255,0,255, "45,25", "0,255,0,255", 2);- _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);- _assertPixelApprox(offscreenCanvas, 55,25, 0,255,0,255, "55,25", "0,255,0,255", 2);+ _assertPixelApprox(canvas, 45,25, 0,255,0,255, "45,25", "0,255,0,255", 2);+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);+ _assertPixelApprox(canvas, 55,25, 0,255,0,255, "55,25", "0,255,0,255", 2); }, t_fail); }).then(t_pass, t_fail);
Analyzing the provided code diff, here's the security assessment: 1. Vulnerability Existed: no Variable Renaming [File] [Lines 18-19, 35-37] Old Code: ```javascript var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ``` Fixed Code: ```javascript var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ``` Additional Details: This appears to be a simple variable renaming from `offscreenCanvas` to `canvas` for consistency or readability. No security implications are evident. 2. Vulnerability Existed: no Variable Reference Update [File] [Lines 35-37] Old Code: ```javascript _assertPixelApprox(offscreenCanvas, 45,25, 0,255,0,255, "45,25", "0,255,0,255", 2); ``` Fixed Code: ```javascript _assertPixelApprox(canvas, 45,25, 0,255,0,255, "45,25", "0,255,0,255", 2); ``` Additional Details: This change simply updates the variable references to match the renamed variable from the first change. No security impact. The changes appear to be purely cosmetic/refactoring in nature, updating variable names for consistency. No security vulnerabilities were identified in this diff. The modifications don't affect the functionality or 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/devtools/client/shared/test/browser_filter-editor-05.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/client/shared/test/browser_filter-editor-05.js@@ -162,4 +162,5 @@ "test.svg", "Label-dragging on string-type filters shouldn't affect their value" );+ widget.destroy(); });
Let me analyze the code diff for potential security fixes. Vulnerability Existed: no [Memory Leak Fix] [devtools/client/shared/test/browser_filter-editor-05.js] [Lines 162-163] [Old Code] "Label-dragging on string-type filters shouldn't affect their value" ); [Fixed Code] "Label-dragging on string-type filters shouldn't affect their value" ); widget.destroy(); Analysis: 1. The change adds a `widget.destroy()` call to properly clean up resources after the test completes. 2. While this isn't a security vulnerability per se, it's a good practice to prevent memory leaks. 3. There are no clear security vulnerabilities being fixed in this diff - it's primarily a resource management improvement. No other vulnerabilities were identified in this diff. The change appears to be focused on test cleanup 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/dom/system/PathUtils.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/system/PathUtils.cpp@@ -21,6 +21,7 @@ #include "mozilla/dom/Promise.h" #include "nsAppDirectoryServiceDefs.h" #include "nsCOMPtr.h"+#include "nsDirectoryServiceDefs.h" #include "nsDirectoryServiceUtils.h" #include "nsIFile.h" #include "nsIGlobalObject.h"@@ -37,7 +38,8 @@ static constexpr auto ERROR_INITIALIZE_PATH = "Could not initialize path"_ns; static constexpr auto ERROR_GET_PARENT = "Could not get parent path"_ns; static constexpr auto ERROR_JOIN = "Could not append to path"_ns;-static constexpr auto ERROR_CREATE_UNIQUE = "Could not create unique path"_ns;++static constexpr auto COLON = ": "_ns; static void ThrowError(ErrorResult& aErr, const nsresult aResult, const nsCString& aMessage) {@@ -46,7 +48,7 @@ nsAutoCStringN<256> formattedMsg; formattedMsg.Append(aMessage);- formattedMsg.Append(": "_ns);+ formattedMsg.Append(COLON); formattedMsg.Append(errName); switch (aResult) {@@ -143,7 +145,8 @@ } void PathUtils::Parent(const GlobalObject&, const nsAString& aPath,- nsString& aResult, ErrorResult& aErr) {+ const int32_t aDepth, nsString& aResult,+ ErrorResult& aErr) { if (aPath.IsEmpty()) { aErr.ThrowNotAllowedError(ERROR_EMPTY_PATH); return;@@ -155,10 +158,18 @@ return; }+ if (aDepth <= 0) {+ aErr.ThrowNotSupportedError("A depth of at least 1 is required");+ return;+ }+ nsCOMPtr<nsIFile> parent;- if (nsresult rv = path->GetParent(getter_AddRefs(parent)); NS_FAILED(rv)) {- ThrowError(aErr, rv, ERROR_GET_PARENT);- return;+ for (int32_t i = 0; path && i < aDepth; i++) {+ if (nsresult rv = path->GetParent(getter_AddRefs(parent)); NS_FAILED(rv)) {+ ThrowError(aErr, rv, ERROR_GET_PARENT);+ return;+ }+ path = parent; } if (parent) {@@ -211,28 +222,6 @@ if (nsresult rv = path->AppendRelativePath(aRelativePath); NS_FAILED(rv)) { ThrowError(aErr, rv, ERROR_JOIN);- return;- }-- MOZ_ALWAYS_SUCCEEDS(path->GetPath(aResult));-}--void PathUtils::CreateUniquePath(const GlobalObject&, const nsAString& aPath,- nsString& aResult, ErrorResult& aErr) {- if (aPath.IsEmpty()) {- aErr.ThrowNotAllowedError(ERROR_EMPTY_PATH);- return;- }-- nsCOMPtr<nsIFile> path = new nsLocalFile();- if (nsresult rv = InitFileWithPath(path, aPath); NS_FAILED(rv)) {- ThrowError(aErr, rv, ERROR_INITIALIZE_PATH);- return;- }-- if (nsresult rv = path->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600);- NS_FAILED(rv)) {- ThrowError(aErr, rv, ERROR_CREATE_UNIQUE); return; }@@ -354,31 +343,69 @@ } }-already_AddRefed<Promise> PathUtils::GetProfileDir(const GlobalObject& aGlobal,- ErrorResult& aErr) {+bool PathUtils::IsAbsolute(const GlobalObject&, const nsAString& aPath) {+ nsCOMPtr<nsIFile> path = new nsLocalFile();+ nsresult rv = InitFileWithPath(path, aPath);+ return NS_SUCCEEDED(rv);+}++void PathUtils::GetProfileDirSync(const GlobalObject&, nsString& aResult,+ ErrorResult& aErr) {+ MOZ_ASSERT(NS_IsMainThread());++ auto guard = sDirCache.Lock();+ DirectoryCache::Ensure(guard.ref())+ .GetDirectorySync(aResult, aErr, DirectoryCache::Directory::Profile);+}+void PathUtils::GetLocalProfileDirSync(const GlobalObject&, nsString& aResult,+ ErrorResult& aErr) {+ MOZ_ASSERT(NS_IsMainThread());++ auto guard = sDirCache.Lock();+ DirectoryCache::Ensure(guard.ref())+ .GetDirectorySync(aResult, aErr, DirectoryCache::Directory::LocalProfile);+}+void PathUtils::GetTempDirSync(const GlobalObject&, nsString& aResult,+ ErrorResult& aErr) {+ MOZ_ASSERT(NS_IsMainThread());++ auto guard = sDirCache.Lock();+ DirectoryCache::Ensure(guard.ref())+ .GetDirectorySync(aResult, aErr, DirectoryCache::Directory::Temp);+}++already_AddRefed<Promise> PathUtils::GetProfileDirAsync(+ const GlobalObject& aGlobal, ErrorResult& aErr) {+ // NB: This will eventually be off-main-thread only.+ auto guard = sDirCache.Lock(); return DirectoryCache::Ensure(guard.ref())- .GetDirectory(aGlobal, aErr, DirectoryCache::Directory::Profile);-}--already_AddRefed<Promise> PathUtils::GetLocalProfileDir(+ .GetDirectoryAsync(aGlobal, aErr, DirectoryCache::Directory::Profile);+}++already_AddRefed<Promise> PathUtils::GetLocalProfileDirAsync( const GlobalObject& aGlobal, ErrorResult& aErr) {+ // NB: This will eventually be off-main-thread only.+ auto guard = sDirCache.Lock(); return DirectoryCache::Ensure(guard.ref())- .GetDirectory(aGlobal, aErr, DirectoryCache::Directory::LocalProfile);-}--already_AddRefed<Promise> PathUtils::GetTempDir(const GlobalObject& aGlobal,- ErrorResult& aErr) {+ .GetDirectoryAsync(aGlobal, aErr,+ DirectoryCache::Directory::LocalProfile);+}++already_AddRefed<Promise> PathUtils::GetTempDirAsync(+ const GlobalObject& aGlobal, ErrorResult& aErr) {+ // NB: This will eventually be off-main-thread only.+ auto guard = sDirCache.Lock(); return DirectoryCache::Ensure(guard.ref())- .GetDirectory(aGlobal, aErr, DirectoryCache::Directory::Temp);+ .GetDirectoryAsync(aGlobal, aErr, DirectoryCache::Directory::Temp); } PathUtils::DirectoryCache::DirectoryCache() {- mProfileDir.SetIsVoid(true);- mLocalProfileDir.SetIsVoid(true);- mTempDir.SetIsVoid(true);+ for (auto& dir : mDirectories) {+ dir.SetIsVoid(true);+ } } PathUtils::DirectoryCache& PathUtils::DirectoryCache::Ensure(@@ -404,7 +431,28 @@ return aCache.ref(); }-already_AddRefed<Promise> PathUtils::DirectoryCache::GetDirectory(+void PathUtils::DirectoryCache::GetDirectorySync(+ nsString& aResult, ErrorResult& aErr, const Directory aRequestedDir) {+ MOZ_RELEASE_ASSERT(aRequestedDir < Directory::Count);++ if (nsresult rv = PopulateDirectoriesImpl(aRequestedDir); NS_FAILED(rv)) {+ nsAutoCStringN<32> errorName;+ GetErrorName(rv, errorName);++ nsAutoCStringN<256> msg;+ msg.Append("Could not retrieve directory "_ns);+ msg.Append(kDirectoryNames[aRequestedDir]);+ msg.Append(COLON);+ msg.Append(errorName);++ aErr.ThrowUnknownError(msg);+ return;+ }++ aResult = mDirectories[aRequestedDir];+}++already_AddRefed<Promise> PathUtils::DirectoryCache::GetDirectoryAsync( const GlobalObject& aGlobal, ErrorResult& aErr, const Directory aRequestedDir) { nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());@@ -431,60 +479,30 @@ void PathUtils::DirectoryCache::ResolveWithDirectory( Promise* aPromise, const Directory aRequestedDir) {- switch (aRequestedDir) {- case Directory::Profile:- MOZ_RELEASE_ASSERT(!mProfileDir.IsVoid());- aPromise->MaybeResolve(mProfileDir);- break;-- case Directory::LocalProfile:- MOZ_RELEASE_ASSERT(!mLocalProfileDir.IsVoid());- aPromise->MaybeResolve(mLocalProfileDir);- break;-- case Directory::Temp:- MOZ_RELEASE_ASSERT(!mTempDir.IsVoid());- aPromise->MaybeResolve(mTempDir);- break;-- default:- MOZ_ASSERT_UNREACHABLE();- }+ MOZ_RELEASE_ASSERT(aRequestedDir < Directory::Count);+ MOZ_RELEASE_ASSERT(!mDirectories[aRequestedDir].IsVoid());+ aPromise->MaybeResolve(mDirectories[aRequestedDir]); } already_AddRefed<PathUtils::DirectoryCache::PopulateDirectoriesPromise> PathUtils::DirectoryCache::PopulateDirectories( const PathUtils::DirectoryCache::Directory aRequestedDir) {+ MOZ_RELEASE_ASSERT(aRequestedDir < Directory::Count);+ // If we have already resolved the requested directory, we can return // immediately.- if ((aRequestedDir == Directory::Temp && !mTempDir.IsVoid()) ||- (aRequestedDir == Directory::Profile && !mProfileDir.IsVoid()) ||- (aRequestedDir == Directory::LocalProfile &&- !mLocalProfileDir.IsVoid())) {- // We cannot have a state where mProfileDir is not populated but- // mLocalProfileDir is.- if (mProfileDir.IsVoid()) {- MOZ_RELEASE_ASSERT(mLocalProfileDir.IsVoid());- }+ // Otherwise, if we have already fired off a request to populate the entry, so+ // we can return the corresponding promise immediately. caller will queue a+ // Thenable onto that promise to resolve/reject the request.+ if (!mDirectories[aRequestedDir].IsVoid()) { return nullptr; }-- // We have already fired off a request to populate the entry, so we can return- // the corresponding promise immediately. caller will queue a Thenable onto- // that promise to resolve/reject the request.- if (!mAllDirsPromise.IsEmpty()) {- return mAllDirsPromise.Ensure(__func__);- }- if (aRequestedDir != Directory::Temp && !mProfileDirsPromise.IsEmpty()) {- return mProfileDirsPromise.Ensure(__func__);- }-- RefPtr<PopulateDirectoriesPromise> promise;- if (aRequestedDir == Directory::Temp) {- promise = mAllDirsPromise.Ensure(__func__);- } else {- promise = mProfileDirsPromise.Ensure(__func__);- }+ if (!mPromises[aRequestedDir].IsEmpty()) {+ return mPromises[aRequestedDir].Ensure(__func__);+ }++ RefPtr<PopulateDirectoriesPromise> promise =+ mPromises[aRequestedDir].Ensure(__func__); if (NS_IsMainThread()) { nsresult rv = PopulateDirectoriesImpl(aRequestedDir);@@ -504,67 +522,32 @@ void PathUtils::DirectoryCache::ResolvePopulateDirectoriesPromise( nsresult aRv, const PathUtils::DirectoryCache::Directory aRequestedDir) {+ MOZ_RELEASE_ASSERT(aRequestedDir < Directory::Count);+ if (NS_SUCCEEDED(aRv)) {- if (aRequestedDir == Directory::Temp) {- mAllDirsPromise.Resolve(Ok{}, __func__);- } else {- mProfileDirsPromise.Resolve(Ok{}, __func__);- }+ mPromises[aRequestedDir].Resolve(Ok{}, __func__); } else {- if (aRequestedDir == Directory::Temp) {- mAllDirsPromise.Reject(aRv, __func__);- } else {- mProfileDirsPromise.Reject(aRv, __func__);- }+ mPromises[aRequestedDir].Reject(aRv, __func__); } } nsresult PathUtils::DirectoryCache::PopulateDirectoriesImpl( const PathUtils::DirectoryCache::Directory aRequestedDir) { MOZ_RELEASE_ASSERT(NS_IsMainThread());+ MOZ_RELEASE_ASSERT(aRequestedDir < Directory::Count);++ if (!mDirectories[aRequestedDir].IsVoid()) {+ // In between when this promise was dispatched to the main thread and now,+ // the directory cache has had this entry populated (via the on-main-thread+ // sync method).+ return NS_OK;+ } nsCOMPtr<nsIFile> path;- // We only populate the temporary directory entry when specifically requested- // because the nsDirectoryService will do main thread IO to create the- // directory if it hasn't been created yet.- //- // Additionally, we cannot have second request to populate any of these- // directories if the first request succeeded, so assert that the- // corresponding fields are void.- if (aRequestedDir == Directory::Temp) {- MOZ_RELEASE_ASSERT(mTempDir.IsVoid());-- MOZ_TRY(NS_GetSpecialDirectory(NS_APP_CONTENT_PROCESS_TEMP_DIR,- getter_AddRefs(path)));- MOZ_TRY(path->GetPath(mTempDir));- } else if (aRequestedDir == Directory::Profile) {- MOZ_RELEASE_ASSERT(mProfileDir.IsVoid());- MOZ_RELEASE_ASSERT(mLocalProfileDir.IsVoid());- } else {- MOZ_RELEASE_ASSERT(aRequestedDir == Directory::LocalProfile);- MOZ_RELEASE_ASSERT(mProfileDir.IsVoid());- MOZ_RELEASE_ASSERT(mLocalProfileDir.IsVoid());- }-- if (mProfileDir.IsVoid()) {- MOZ_RELEASE_ASSERT(mLocalProfileDir.IsVoid());-- nsString profileDir;- nsString localProfileDir;-- MOZ_TRY(NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,- getter_AddRefs(path)));- MOZ_TRY(path->GetPath(profileDir));-- MOZ_TRY(NS_GetSpecialDirectory(NS_APP_USER_PROFILE_LOCAL_50_DIR,- getter_AddRefs(path)));- MOZ_TRY(path->GetPath(localProfileDir));-- // We either set both of these or neither.- mProfileDir = std::move(profileDir);- mLocalProfileDir = std::move(localProfileDir);- }+ MOZ_TRY(NS_GetSpecialDirectory(kDirectoryNames[aRequestedDir],+ getter_AddRefs(path)));+ MOZ_TRY(path->GetPath(mDirectories[aRequestedDir])); return NS_OK; }
I'll analyze the code diff for security fixes following the specified format. Vulnerability Existed: not sure Potential Information Leak [File] dom/system/PathUtils.cpp [Lines 143-178] [Old Code] void PathUtils::Parent(const GlobalObject&, const nsAString& aPath, nsString& aResult, ErrorResult& aErr) { if (aPath.IsEmpty()) { aErr.ThrowNotAllowedError(ERROR_EMPTY_PATH); return; } nsCOMPtr<nsIFile> path = new nsLocalFile(); if (nsresult rv = InitFileWithPath(path, aPath); NS_FAILED(rv)) { ThrowError(aErr, rv, ERROR_GET_PARENT); return; } nsCOMPtr<nsIFile> parent; if (nsresult rv = path->GetParent(getter_AddRefs(parent)); NS_FAILED(rv)) { ThrowError(aErr, rv, ERROR_GET_PARENT); return; } [Fixed Code] void PathUtils::Parent(const GlobalObject&, const nsAString& aPath, const int32_t aDepth, nsString& aResult, ErrorResult& aErr) { if (aPath.IsEmpty()) { aErr.ThrowNotAllowedError(ERROR_EMPTY_PATH); return; } nsCOMPtr<nsIFile> path = new nsLocalFile(); if (nsresult rv = InitFileWithPath(path, aPath); NS_FAILED(rv)) { ThrowError(aErr, rv, ERROR_GET_PARENT); return; } if (aDepth <= 0) { aErr.ThrowNotSupportedError("A depth of at least 1 is required"); return; } nsCOMPtr<nsIFile> parent; for (int32_t i = 0; path && i < aDepth; i++) { if (nsresult rv = path->GetParent(getter_AddRefs(parent)); NS_FAILED(rv)) { ThrowError(aErr, rv, ERROR_GET_PARENT); return; } path = parent; } Vulnerability Existed: yes Removed Dangerous Functionality [File] dom/system/PathUtils.cpp [Lines 211-228] [Old Code] void PathUtils::CreateUniquePath(const GlobalObject&, const nsAString& aPath, nsString& aResult, ErrorResult& aErr) { if (aPath.IsEmpty()) { aErr.ThrowNotAllowedError(ERROR_EMPTY_PATH); return; } nsCOMPtr<nsIFile> path = new nsLocalFile(); if (nsresult rv = InitFileWithPath(path, aPath); NS_FAILED(rv)) { ThrowError(aErr, rv, ERROR_INITIALIZE_PATH); return; } if (nsresult rv = path->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600); NS_FAILED(rv)) { ThrowError(aErr, rv, ERROR_CREATE_UNIQUE); return; } MOZ_ALWAYS_SUCCEEDS(path->GetPath(aResult)); } [Fixed Code] [This function was completely removed] Vulnerability Existed: not sure Improved Error Handling [File] dom/system/PathUtils.cpp [Lines 37-48] [Old Code] static constexpr auto ERROR_CREATE_UNIQUE = "Could not create unique path"_ns; static void ThrowError(ErrorResult& aErr, const nsresult aResult, const nsCString& aMessage) { nsAutoCStringN<32> errName; GetErrorName(aResult, errName); nsAutoCStringN<256> formattedMsg; formattedMsg.Append(aMessage); formattedMsg.Append(": "_ns); [Fixed Code] static constexpr auto COLON = ": "_ns; static void ThrowError(ErrorResult& aErr, const nsresult aResult, const nsCString& aMessage) { nsAutoCStringN<32> errName; GetErrorName(aResult, errName); nsAutoCStringN<256> formattedMsg; formattedMsg.Append(aMessage); formattedMsg.Append(COLON); The changes include: 1. Added depth parameter to Parent() function with validation, which could prevent potential directory traversal issues 2. Removed CreateUniquePath() function which could have been a security risk if misused 3. Improved error handling by using a constant for the colon separator 4. Significant refactoring of directory handling code to be more secure and maintainable The most significant security-related change is the removal of the CreateUniquePath() function, which could have been used to create arbitrary files in the filesystem. The other changes appear to be more about improving code quality and maintainability rather than fixing specific vulnerabilities.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html@@ -17,14 +17,14 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#0f0'; try { ctx.fillStyle = '#fg00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does ctx.fillRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); t.done(); });
Based on the provided diff, I'll analyze it for security vulnerabilities: 1. Vulnerability Existed: no No specific vulnerability [File] [Lines 17-25] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ctx.fillStyle = '#0f0'; try { ctx.fillStyle = '#fg00'; } catch (e) { } ctx.fillRect(0, 0, 100, 50); _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ctx.fillStyle = '#0f0'; try { ctx.fillStyle = '#fg00'; } catch (e) { } ctx.fillRect(0, 0, 100, 50); _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); The changes appear to be purely cosmetic, renaming a variable from `offscreenCanvas` to `canvas` and updating the corresponding references. There's no indication of any security vulnerability being fixed in this change. The code's functionality remains exactly the same, just with a different variable name. The test case continues to verify the same behavior regarding invalid hex color parsing in canvas fill styles.
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/crossbeam-epoch/src/internal.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/crossbeam-epoch/src/internal.rs@@ -101,7 +101,7 @@ /// Seals the bag with the given epoch. fn seal(self, epoch: Epoch) -> SealedBag {- SealedBag { epoch, bag: self }+ SealedBag { epoch, _bag: self } } }@@ -216,7 +216,7 @@ #[derive(Default, Debug)] struct SealedBag { epoch: Epoch,- bag: Bag,+ _bag: Bag, } /// It is safe to share `SealedBag` because `is_expired` only inspects the epoch.@@ -311,7 +311,7 @@ // TODO(stjepang): `Local`s are stored in a linked list because linked lists are fairly // easy to implement in a lock-free manner. However, traversal can be slow due to cache // misses and data dependencies. We should experiment with other data structures as well.- for local in self.locals.iter(&guard) {+ for local in self.locals.iter(guard) { match local { Err(IterError::Stalled) => { // A concurrent thread stalled this iteration. That thread might also try to
Here's the analysis of the provided code diff following the specified format: 1. Vulnerability Existed: not sure [Field Visibility/Unused Field] [third_party/rust/crossbeam-epoch/src/internal.rs] [Lines 101, 216] [Old Code: `bag: self` / `bag: Bag`] [Fixed Code: `_bag: self` / `_bag: Bag`] Additional Details: The change prefixes the field name with underscore, indicating it's intentionally unused. While not a direct security vulnerability, this could prevent potential misuse of an unused field. 2. Vulnerability Existed: not sure [Iterator Safety] [third_party/rust/crossbeam-epoch/src/internal.rs] [Line 311] [Old Code: `for local in self.locals.iter(&guard)`] [Fixed Code: `for local in self.locals.iter(guard)`] Additional Details: The removal of the reference operator might indicate a change in how the guard is passed to the iterator, potentially affecting thread safety, but without more context it's unclear if this was fixing a security issue. Note: The changes appear to be primarily code quality improvements rather than direct security fixes. The underscore prefix for unused fields is a Rust convention to suppress warnings, and the iterator change might be related to API usage rather than security. No clear security vulnerabilities were identified in this diff.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/selectors/dir-selector-ltr-001.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/selectors/dir-selector-ltr-001.html@@ -5,7 +5,6 @@ <link rel="author" title="Takeshi Kurosawa" href="mailto:[email protected]"> <link rel="help" href="http://www.w3.org/TR/selectors4/#dir-pseudo"> <link rel="match" href="../reference/ref-filled-green-100px-square.xht">- <meta name="flags" content=""> <meta name="assert" content="The :dir(ltr) pseudo-class matches an element that has a directionality of (ltr). Since the div element has dir=ltr, the selector matches."> <style> div {
Based on the provided code diff, I'll analyze it for potential security vulnerabilities: Vulnerability Existed: no [No specific vulnerability found] [testing/web-platform/tests/css/selectors/dir-selector-ltr-001.html] [Lines 5-6] [Old Code] <meta name="flags" content=""> [Fixed Code] [Removed line] Additional Details: 1. The change simply removes an empty meta tag for "flags" which appears to be test-related metadata 2. There's no security impact from this change as it was just removing unused test configuration 3. The modification doesn't relate to any known vulnerability patterns 4. The change appears to be a test cleanup rather than a security fix No security vulnerabilities were identified in this diff. The change is purely cosmetic/cleanup 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/toolkit/components/glean/tests/browser/browser_fog_gpu.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/toolkit/components/glean/tests/browser/browser_fog_gpu.js@@ -2,9 +2,6 @@ * http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict";--// Glean's here on `window`, but eslint doesn't know that. bug 1715542.-/* global Glean:false */ add_task(async () => { if (
I'll analyze the provided code diff for security fixes. Vulnerability Existed: no [No specific vulnerability] [toolkit/components/glean/tests/browser/browser_fog_gpu.js] [Lines 2-9] [Old Code] * http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Glean's here on `window`, but eslint doesn't know that. bug 1715542. /* global Glean:false */ add_task(async () => { if ( [Fixed Code] * http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add_task(async () => { if ( Additional Details: The change simply removes a comment and an ESLint directive about the `Glean` global variable. This appears to be a code cleanup or maintenance change rather than a security fix. There's no indication of any security vulnerability being addressed in this diff. The removed comment was just explaining an ESLint exception, and its removal doesn't relate to any security concern.
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/dom/elements-metadata.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/dom/elements-metadata.js@@ -35,6 +35,7 @@ name: "string", httpEquiv: {type: "string", domAttrName: "http-equiv"}, content: "string",+ media: "string", // Obsolete scheme: "string",
Analysis of the code diff: 1. Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/html/dom/elements-metadata.js [Lines] 35-35 [Old Code] content: "string", [Fixed Code] content: "string", media: "string", Additional Details: - This appears to be a simple addition of a new metadata property ('media') for HTML elements - The change adds support for a new attribute without modifying existing security-relevant functionality - No security vulnerability is being fixed here, just extending the metadata definition - The change is consistent with HTML specification updates Note: The diff shows an enhancement rather than a security fix. The addition of 'media' as a string type for element metadata doesn't indicate any security vulnerability 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.