Medium firefox Sandbox Escape 🔧 Commit mapped

Overview

Medium
Severity
CVSS
No
Exploited ITW
Fixed
Fix Status
Impactmoderate
DescriptionInformation disclosure, sandbox escape in the Security: Process Sandboxing component
ComponentSecurity/NSS
Bug ClassSandbox Escape
Tracker2034713
Fix commit67c5a7323ee8 (firefox) +6/-8
CISA KEVNot listed
CreditedYaqoub Aldurayhim
Disclosed2026-05-19

Changed Functions

FunctionChangeNotes
for
security/sandbox/linux/broker/SandboxBroker.cpp
modified
if
security/sandbox/linux/broker/SandboxBroker.cpp
modified

Files Changed

  • security/sandbox/linux/broker/SandboxBroker.cpp
diff --git a/security/sandbox/linux/broker/SandboxBroker.cpp b/security/sandbox/linux/broker/SandboxBroker.cpp
index 7e06d4216bb..43828b3489c 100644
--- a/security/sandbox/linux/broker/SandboxBroker.cpp
+++ b/security/sandbox/linux/broker/SandboxBroker.cpp
@@ -138,7 +138,7 @@ SandboxBroker::Policy::~Policy() = default;
 SandboxBroker::Policy::Policy(const Policy& aOther)
     : mMap(aOther.mMap.Clone()) {}
 
-// Chromium
+// See also Chromium BrokerFilePermission::ValidatePath in
 // sandbox/linux/syscall_broker/broker_file_permission.cc
 // Async signal safe
 bool SandboxBroker::Policy::ValidatePath(const char* path) const {
@@ -157,13 +157,11 @@ bool SandboxBroker::Policy::ValidatePath(const char* path) const {
   if (len >= 3 && path[len - 3] == '/' && path[len - 2] == '.' &&
       path[len - 1] == '.')
     return false;
-  // No /../ anywhere
-  for (size_t i = 0; i < len; i++) {
-    if (path[i] == '/' && (len - i) > 3) {
-      if (path[i + 1] == '.' && path[i + 2] == '.' && path[i + 3] == '/') {
-        return false;
-      }
-    }
+  // No special path components anywhere.
+  // Assume libc's strstr is good enough that we don't need to optimize.
+  // strstr is officially async signal safe as of POSIX.1-2017
+  if (strstr(path, "//") || strstr(path, "/./") || strstr(path, "/../")) {
+    return false;
   }
   return true;
 }
Loading diff…