Incorrect authorization in Sandbox (CVE-2026-79218)
The Linux syscall broker in Chromium's sandbox improperly validates file paths, allowing a path ending in '/.' to bypass checks and return a directory file descriptor. An attacker with code execution in an unchrooted process like Audio or Network could use this to enumerate the host filesystem and potentially connect to sensitive host sockets, leading to a full sandbox escape.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 5 months
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports without the security team.
Overview: The Linux syscall broker improperly validates file paths, allowing requests ending in '/.' to bypass checks and return directory file descriptors. When exploited from unchrooted processes like Audio or Network, this grants the ability to enumerate the host filesystem using the allowed getdents64 syscall. By discovering and connecting to sensitive host sockets, an attacker could potentially achieve a full sandbox escape.
Affected files:
sandbox/linux/syscall_broker/broker_host.ccsandbox/linux/syscall_broker/broker_file_permission.ccservices/network/network_sandbox_hook_linux.ccservices/audio/audio_sandbox_hook_linux.cccontent/common/gpu_pre_sandbox_hook_linux.ccsandbox/policy/linux/bpf_network_policy_linux.ccsandbox/policy/linux/bpf_audio_policy_linux.ccsandbox/policy/linux/bpf_gpu_policy_linux.ccsandbox/policy/linux/bpf_speech_recognition_policy_linux.cccontent/utility/speech/speech_recognition_sandbox_hook_linux.cc
Estimated timestamp from git blame: 2025-07-22
Summary
A potential vulnerability exists in the Linux syscall_broker that allows a compromised sandboxed process to obtain directory file descriptors for the host filesystem. This is caused by a logic flaw where paths ending in self-references (e.g., /.) bypass trailing-slash path validation and successfully match against recursive directory permissions.
Because several utility processes (such as Audio and Network) are intentionally not restricted by a namespace sandbox (chroot) and have the getdents64 syscall explicitly permitted in their seccomp-bpf policies, an attacker can use the broker-provided directory descriptor to recursively enumerate the host filesystem. In the case of the Audio process, this can be escalated to a full sandbox escape by discovering and connecting to host Unix sockets.
Technical Details
-
Path Validation Bypass: In
sandbox/linux/syscall_broker/broker_file_permission.cc,ValidatePath()explicitly rejects paths with a trailing slash (/) and parent references (..). However, it fails to reject self-references (.). Thus, a requested path like/tmp/.is considered valid. -
Flawed Recursive Matching: For recursive permissions (which require a trailing slash in their definition, e.g.,
/tmp/),BrokerFilePermission::MatchPath()evaluates access usingbase::StartsWith(requested_filename, path_). A request for/tmp/.perfectly matches the/tmp/prefix (base::StartsWith("/tmp/.", "/tmp/")evaluates to true). -
Missing Directory Check in Broker: In
sandbox/linux/syscall_broker/broker_host.cc,OpenFileForIPC()passes the validated path tosys_open(file_to_open, flags). IfO_RDONLYis passed, the Linux kernel successfully opens the directory and returns a valid file descriptor. The broker then returns this descriptor to the sandboxed process viaSCM_RIGHTSwithout checking if it corresponds to a directory (e.g., viafstat). -
Process Configuration Context:
- Audio and Network Processes: These processes are spawned without engaging the namespace sandbox (chroot). This means they execute within the host's filesystem namespace.
- Seccomp Policy: Their seccomp-bpf policies explicitly allow
__NR_getdents64. - Socket Permissions: The Audio process policy explicitly allows
socket()(forAF_UNIX) andconnect().
Potential Attack Steps
Note: Our tooling agent cannot run code, so the following represents the theoretical steps an attacker would take to trigger the vulnerability based on static analysis.
- Initial Compromise: The attacker achieves remote code execution within the sandboxed Audio process.
- Craft Broker Request: The attacker sends a
COMMAND_OPENIPC message to the syscall broker, requesting the path/tmp/.with theO_RDONLYflag. - Obtain Directory FD: The broker validates the path, incorrectly determines it is a file inside the permitted
/tmp/directory, opens it, and returns the directory file descriptor to the Audio process. - Enumerate Filesystem: The attacker invokes
syscall(__NR_getdents64, dirfd, buf, size), which is permitted by the seccomp filter. This reads the host's/tmp/directory contents. - Recursive Discovery: The attacker parses the entries, finds subdirectories, and repeats the process (e.g., requesting
/tmp/ssh-XXXXXX/.) to map out the filesystem. - Sandbox Escape: Upon discovering a sensitive Unix domain socket (such as an SSH agent socket or X11 socket), the attacker calls
socket(AF_UNIX, SOCK_STREAM, 0)andconnect()s directly to it. Because there is no chroot, the connection succeeds, granting the attacker access to a highly privileged host service and effectively escaping the sandbox.
(Note: If exploited from the Network process, the attacker could similarly enumerate DIR_USER_DATA to steal unguessable extension IDs, profiles, and localized storage data.)
Suggested Fix
- Enforce File Type in Broker: In
sandbox/linux/syscall_broker/broker_host.cc, immediately after thesys_opencall inOpenFileForIPC, perform anfstat()on the resulting file descriptor. IfS_ISDIR(st_mode)is true, the broker should close the descriptor and return-EISDIRto the caller. - Harden Path Validation: Update
BrokerFilePermission::ValidatePathto reject self-references (paths containing/.or ending in/.).
Evaluated with Chrome root at commit: f200f57a19490707ff8bc7aa5de3cbc443a3afad
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the path validation function fails to reject self-references ('.'), and the broker does not check if the opened file descriptor refers to a directory.
Impact
An attacker could potentially achieve a full sandbox escape by enumerating the host filesystem and connecting to sensitive host sockets, though this requires prior code execution in a sandboxed process.
What the attacker needed
Code execution in a sandboxed process; process not chrooted (e.g., Audio or Network); seccomp allows getdents64 and socket/connect
The fix
The broker should perform an fstat() on the opened file descriptor and reject directories, and path validation should reject self-references.
How it was found
- The attacker achieves remote code execution within the sandboxed Audio process.
- The attacker sends a COMMAND_OPEN IPC message to the syscall broker, requesting the path /tmp/. with the O_RDONLY flag.
- The broker validates the path, incorrectly determines it is a file inside the permitted /tmp/ directory, opens it, and returns the directory file descriptor to the Audio process.
- The attacker invokes syscall(__NR_getdents64, dirfd, buf, size), which is permitted by the seccomp filter, to read the host's /tmp/ directory contents.
- The attacker parses the entries, finds subdirectories, and repeats the process to map out the filesystem.
- Upon discovering a sensitive Unix domain socket, the attacker calls socket(AF_UNIX, SOCK_STREAM, 0) and connects directly to it, escaping the sandbox.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A sandbox is a security mechanism that restricts what a program can do, like a jail. In this case, a part of the sandbox that handles file requests (the syscall broker) had a flaw: it let a program ask for a directory by adding '/.' to the end of a path, which tricked the broker into giving back a handle to the whole directory instead of a single file. This could let an attacker who already compromised a sandboxed process explore the host system and possibly break out of the sandbox entirely.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.