metadata
name: linux-kernel-exploitation
domain: kernel
triggers:
languages:
- c
- asm
- rust
frameworks:
- linux
- bpf
- kvm
- io_uring
asset_types:
- kernel
- driver
- module
- syscall
- ebpf
tools:
- syzkaller
- kasan
- kfence
- crash
- gdb
- drgn
- bpftool
severity_focus:
- P1
- P2
Linux Kernel Exploitation
When to load
drivers/, fs/, net/, kernel/, mm/, any *.ko module source, eBPF
programs (*.bpf.c), or container-escape research.
Bug classes (with payout tiers)
- UAF / double-free in
slaballocator β heap-spray withsetxattr/msgsnd, escalate viacredoverlap. Pays $50K+. - Type confusion in BPF verifier β old classic, still finds in JIT re-write paths.
- OOB write β netlink, USB, Bluetooth, NFC drivers; structured-fuzz with syzkaller.
- Race conditions β userfaultfd, FUSE,
splice,pipe. Win the race with userfaultfd page-faults to extend the window. - Reference-counting bugs β
refcount_tunderflow,get_task_structforgotten on error path. - eBPF abuse β verifier bypass, helper return-value confusion, map spray for arbitrary read/write.
- Namespace escapes β user-namespace + capability mismatch,
CAP_SYS_ADMINexposed inside container, shared kernel objects. - Privileged file write β overlayfs
redirect_dir, copy_up race,/proc/<pid>/setgroupshistory.
Recon
make menuconfigβ list enabled drivers (CONFIG_*=y).- Diff against vendor kernel:
git log --oneline v6.1..stableβ unmerged security fixes are gold. - Run
syzkallerwithenable_syscallsfiltered to the new code surface.
Building the exploit
- Triage primitive β what does the bug give you? OOB-R, OOB-W, UAF, double-free, refcount underflow.
- Heap shape β pick a victim object that overlaps the freed slab
class. Common:
cred,tty_struct,seq_operations,pipe_buffer,msg_msg. - Spray β
setxattr(fine-grained),msgsnd/msgrcv(large), io_uring (fast). - Pivot β gain arbitrary read first, leak
kallsyms/modprobe_path, then writecred->uid = 0. - KASLR / SMEP / SMAP / KPTI bypass β leak via prefetch side-channel (Spectre-PHT), or use a stack pivot inside the kernel's own code.
Sanitisers
Build with CONFIG_KASAN=y CONFIG_KFENCE=y CONFIG_UBSAN=y CONFIG_KCSAN=y. Reproduce every crash in qemu+gdb with
-append "kasan.fault=panic".
Reporting (kernel.org coordinated disclosure)
Email security@kernel.org with PGP-encrypted report; expect 7-day
embargo; CVE assigned by MITRE via Linux CNA. PoC must include kernel
config + qemu invocation.