Firefox · Security/NSS
CVE-2026-8958
Sandbox Escape in Security/NSS
Overview
Medium
Severity
—
CVSS
No
Exploited ITW
Fixed
Fix Status
Changed Functions
| Function | Change | Notes |
|---|---|---|
forsecurity/sandbox/linux/broker/SandboxBroker.cpp |
modified | |
ifsecurity/sandbox/linux/broker/SandboxBroker.cpp |
modified |
Files Changed
security/sandbox/linux/broker/SandboxBroker.cpp
Patch
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…
References
On This Page