Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-95702 Overview
CVE-2026-95702 is a use-after-free vulnerability [CWE-415] in the Virtual File System (VFS) layer of Google gVisor prior to release 20260831.0. The flaw affects all platforms on which gVisor runs. A local attacker holding standard container privileges can double-free the backing MemoryFile from an in-sandbox overlay filesystem. Successful exploitation yields code execution within the host sentry process, which brokers syscalls for sandboxed workloads. The compromised sentry remains confined by host-level Linux seccomp filters and namespace boundaries, limiting lateral movement to the underlying host kernel.
Critical Impact
A container-local attacker can escape the gVisor user-space kernel boundary and execute arbitrary code inside the sentry process, breaking the sandbox isolation model that container workloads rely on.
Affected Products
- Google gVisor releases prior to 20260831.0
- All gVisor platforms (ptrace, KVM, systrap)
- Container runtimes built on gVisor's runsc (for example, OCI-compatible deployments using gVisor as the runtime)
Discovery Timeline
- 2026-10-09 - CVE-2026-95702 published to the National Vulnerability Database
- 2026-10-15 - Last updated in NVD database
Technical Details for CVE-2026-95702
Vulnerability Analysis
The vulnerability resides in gVisor's overlay filesystem implementation inside the sentry, gVisor's user-space kernel. The sentry maintains reference-counted dentry and MemoryFile objects to back files in an in-sandbox overlay mount. A flaw in the refcount accounting during partial unmount operations allows the same MemoryFile backing object to be released twice. The resulting double free corrupts allocator metadata inside the sentry process, which an attacker can shape into a controlled write primitive and ultimately code execution within the sentry.
Root Cause
Two related issues combine to produce the double free. First, the overlay dentry incref path did not validate that the current reference count was positive before incrementing, allowing operations on an already-freed dentry to proceed silently. Second, the vfs mount cleanup logic incorrectly handled already-umounted child mounts and partially-umounted mount refcounting, causing the backing MemoryFile reference to be decremented more times than it was incremented. The combination permits the overlay layer to release the same backing object twice.
Attack Vector
Exploitation requires local access with standard container privileges inside a gVisor-sandboxed workload. No user interaction is required and attack complexity is low. The attacker constructs an overlay filesystem inside the sandbox, triggers the problematic umount and bind-mount sequence, then races a filesystem operation that touches the stale dentry. The resulting corruption inside the sentry is leveraged for code execution. Although the sentry itself remains confined by host seccomp and namespace policies, the attacker has escaped the gVisor sandbox boundary that container tenants trust.
// Patch: overlayfs: panic on increment of non-positive refcount
// pkg/sentry/fsimpl/overlay/overlay.go
if d.LogRefs() {
refs.LogIncRef(d, r)
}
+ if r <= 0 {
+ panic(fmt.Sprintf("Incrementing negative count %d on overlay.dentry", r))
+ }
}
// TryIncRef implements vfs.DentryImpl.TryIncRef.
// Source: https://github.com/google/gvisor/commit/25c75149bc0eeaa6a3a49b9bbe3473588b2af6df
// Patch: vfs: remove nsfs/cgroup exemptions from umount check for bind mounting
// pkg/sentry/vfs/mount.go
p := queue[len(queue)-1]
queue = queue[:len(queue)-1]
for c := range p.prevMount.children {
+ if c.umounted {
+ continue
+ }
if mp := c.getKey(); p.prevMount == mnt && !mp.mount.fs.Impl().IsDescendant(VirtualDentry{mnt, root}, mp) {
continue
}
// Source: https://github.com/google/gvisor/commit/90bc4fc36fe442257a06ba15df00371561c183ed
// Patch: vfs: fix partially-umounted mount refcounting
// pkg/sentry/vfs/dentry.go
vfs.lockMounts()
defer vfs.unlockMounts(ctx)
for mnt := range vfs.mountpoints[d] {
- // If umounted is true, the mount point has already been decrefed by umount
- // so we don't need to release the reference again here.
+ // If umounted is true, the mount parent has already been decrefed by umount
+ // so we don't need to release its reference again here, just the point.
if mnt.umounted {
vfs.mounts.seq.BeginWrite()
- vfs.disconnectLocked(mnt)
+ key := vfs.disconnectLocked(mnt)
+ vfs.delayDecRef(key.dentry)
vfs.delayDecRef(mnt)
vfs.mounts.seq.EndWrite()
} else {
// Source: https://github.com/google/gvisor/commit/e4efb89c787ef15b09e68d561f1303380e1d5a77
Detection Methods for CVE-2026-95702
Indicators of Compromise
- Unexpected sentry process crashes, panics, or restarts with stack traces referencing overlay.dentry, IncRef, or disconnectLocked
- Container workloads invoking unusual sequences of mount, umount, and bind-mount syscalls against overlay filesystems
- runsc log entries recording refcount panics or memory corruption traces inside the sandboxed guest kernel
Detection Strategies
- Inventory container hosts running gVisor and verify the runsc --version output against release 20260831.0 or later.
- Enable gVisor debug logging and alert on panics originating in pkg/sentry/fsimpl/overlay or pkg/sentry/vfs.
- Correlate sentry process termination events with the container's recent filesystem syscall activity to spot abuse patterns.
Monitoring Recommendations
- Forward runsc and container runtime logs to a centralized analytics backend for anomaly detection on sandbox exits.
- Monitor host-level seccomp audit events for syscalls the sentry would not normally issue, which can indicate post-exploitation activity inside a compromised sentry.
- Track container image provenance and runtime arguments so untrusted multi-tenant workloads can be audited for abusive overlay mount patterns.
How to Mitigate CVE-2026-95702
Immediate Actions Required
- Upgrade all gVisor installations to release 20260831.0 or later across every container host.
- Restart runsc-managed sandboxes after upgrading so new workloads run under the patched sentry binary.
- Audit multi-tenant clusters for workloads that recently exercised overlay mount, umount, or bind-mount sequences.
Patch Information
The fix is distributed across three upstream commits in the google/gvisor repository: 25c7514 adds a refcount guard in the overlay dentry incref path, 90bc4fc removes incorrect exemptions in the mount child-walk during umount checks, and e4efb89 corrects refcount handling for partially-umounted mounts. All three are included in release 20260831.0. See the gVisor commit 25c7514, gVisor commit 90bc4fc, and gVisor commit e4efb89.
Workarounds
- Restrict untrusted or low-trust tenants from running on gVisor hosts until the upgrade is deployed.
- Disable use of in-sandbox overlay filesystems where workload requirements permit, reducing exposure to the vulnerable code path.
- Enforce strict host-level seccomp and namespace policies on the sentry process so that a compromised sandbox has minimal onward reach to the host kernel.
# Verify installed gVisor version and upgrade to the patched release
runsc --version
# Example upgrade (adjust URL/arch for your environment)
ARCH=$(uname -m)
wget https://storage.googleapis.com/gvisor/releases/release/20260831.0/${ARCH}/runsc
wget https://storage.googleapis.com/gvisor/releases/release/20260831.0/${ARCH}/containerd-shim-runsc-v1
chmod a+rx runsc containerd-shim-runsc-v1
sudo mv runsc containerd-shim-runsc-v1 /usr/local/bin/
# Restart the container runtime so new sandboxes use the patched runsc
sudo systemctl restart containerd
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

