Firefox · Security/NSS
CVE-2026-12311
Sandbox Escape in Security/NSS
Overview
Medium
Severity
—
CVSS
No
Exploited ITW
Fixed
Fix Status
Changed Functions
| Function | Change | Notes |
|---|---|---|
ifsecurity/sandbox/linux/broker/SandboxBroker.cpp |
modified | |
switchsecurity/sandbox/linux/broker/SandboxBrokerCommon.h |
modified |
Files Changed
security/sandbox/linux/broker/SandboxBroker.cppsecurity/sandbox/linux/broker/SandboxBrokerCommon.h
Patch
diff --git a/security/sandbox/linux/broker/SandboxBroker.cpp b/security/sandbox/linux/broker/SandboxBroker.cpp
index 886a815b507..d9843e3c9ea 100644
--- a/security/sandbox/linux/broker/SandboxBroker.cpp
+++ b/security/sandbox/linux/broker/SandboxBroker.cpp
@@ -820,13 +820,21 @@ void SandboxBroker::ThreadMain(void) {
// Same for the second path.
pathLen2 = strnlen(pathBuf2, kMaxPathLen);
if (pathLen2 > 0) {
+ if (OperationPaths(req.mOp) < 2) {
+ SANDBOX_LOG("extra path for op %s from pid %d",
+ OperationDescription(req.mOp), mChildPid);
+ shutdown(mFileDesc, SHUT_RD);
+ break;
+ }
// Force 0 termination.
pathBuf2[pathLen2] = '\0';
pathLen2 = ConvertRelativePath(pathBuf2, sizeof(pathBuf2), pathLen2);
int perms2 = mPolicy->Lookup(nsDependentCString(pathBuf2, pathLen2));
- // Take the intersection of the permissions for both paths.
- perms &= perms2;
+ // Take the intersection of the permissions for both paths
+ // (the bits which cause denials need to be handled specially).
+ constexpr int kNegPerms = FORCE_DENY | CRASH_INSTEAD;
+ perms = (perms & perms2) | ((perms | perms2) & kNegPerms);
}
} else {
// Failed to receive intelligible paths.
diff --git a/security/sandbox/linux/broker/SandboxBrokerCommon.h b/security/sandbox/linux/broker/SandboxBrokerCommon.h
index 1bdae7a3c38..f9ab26a2578 100644
--- a/security/sandbox/linux/broker/SandboxBrokerCommon.h
+++ b/security/sandbox/linux/broker/SandboxBrokerCommon.h
@@ -54,6 +54,16 @@ class SandboxBrokerCommon {
static_cast<unsigned>(SANDBOX_OP_MAX_VALUE);
}
+ static int OperationPaths(Operation aOp) {
+ switch (aOp) {
+ case SANDBOX_FILE_LINK:
+ case SANDBOX_FILE_RENAME:
+ return 2;
+ default:
+ return 1;
+ }
+ }
+
static unsigned OperationToInt(Operation);
static const char* OperationDescription(Operation);
Loading diff…
References
On This Page