CIFSwitch is a confused-deputy local privilege escalation: unprivileged code calls
request_key("cifs.spnego", <forged description>, ...) and the kernel runs
the root helper cifs.upcall on attacker-controlled fields. This demo does not
ship the root exploit; it shows the keyring-upcall syscalls reachable without agentsh,
then denied for wrapped processes while an ordinary IPv4 socket keeps working.
default_action: allow keeps normal syscalls working; only the keyring-upcall
syscalls return EPERM. CIFSwitch reaches the vulnerable root helper through
request_key, so blocking that syscall — regardless of key type or
description — closes the agentsh-supervised entry point.
The dangerous action in CIFSwitch is not running keyctl or mounting an SMB
share. A malicious agent can issue request_key directly from Python, Go, Rust,
C, or a prebuilt binary, so the real prevention point is the syscall itself. agentsh
compiles syscalls.block to a seccomp-BPF filter installed on the wrapped
process, so the call is denied in the kernel before the cifs.spnego upcall
machinery is ever reached.
This is intentionally a runtime boundary. The protected run does not need to identify exploit source code or trust the agent to avoid risky commands; it blocks the kernel interface that the confused-deputy path requires and leaves an auditable policy decision behind. The raw-syscall probe proves the block fires below libc.
Docker’s default seccomp is disabled so the raw kernel surface is visible.
alice can call request_key and add_key — the syscalls the
exploit forges its cifs.spnego request through — including through a
direct syscall(SYS_request_key, ...) that bypasses libc.
agentsh denies request_key and add_key with EPERM
while the control socket(AF_INET, ...) stays open. The raw-syscall check
proves the block fires at the kernel boundary, not in libc.
mitigation_sets entry for
CVE-2026-46243. The daemon-wide block above is the mitigation: it denies the keyring
upcall for every supervised process. This bounds the agent, not the kernel — the host
still needs the upstream fix (commit 3da1fdf4efbc, which adds a
.vet_description check) or host hardening for processes that run outside agentsh.