CVE-2026-31429
MEDIUMnet: skb: fix cross-cache free of KFENCE-allocated skb head
Title source: cnaExploitation Summary
EIP tracks 5 public exploits for CVE-2026-31429. PoCs published by Unclecheng-li, adminlove520, MillerDetach.
AI-analyzed exploit summary This repository contains a functional PoC for CVE-2026-31429, a Linux kernel slab cross-cache confusion vulnerability. The exploit triggers a slab corruption by freeing a KFENCE-allocated SKB head to the wrong slab cache, demonstrated via a BPF syscall-based trigger.
Description
In the Linux kernel, the following vulnerability has been resolved: net: skb: fix cross-cache free of KFENCE-allocated skb head SKB_SMALL_HEAD_CACHE_SIZE is intentionally set to a non-power-of-2 value (e.g. 704 on x86_64) to avoid collisions with generic kmalloc bucket sizes. This ensures that skb_kfree_head() can reliably use skb_end_offset to distinguish skb heads allocated from skb_small_head_cache vs. generic kmalloc caches. However, when KFENCE is enabled, kfence_ksize() returns the exact requested allocation size instead of the slab bucket size. If a caller (e.g. bpf_test_init) allocates skb head data via kzalloc() and the requested size happens to equal SKB_SMALL_HEAD_CACHE_SIZE, then slab_build_skb() -> ksize() returns that exact value. After subtracting skb_shared_info overhead, skb_end_offset ends up matching SKB_SMALL_HEAD_HEADROOM, causing skb_kfree_head() to incorrectly free the object to skb_small_head_cache instead of back to the original kmalloc cache, resulting in a slab cross-cache free: kmem_cache_free(skbuff_small_head): Wrong slab cache. Expected skbuff_small_head but got kmalloc-1k Fix this by always calling kfree(head) in skb_kfree_head(). This keeps the free path generic and avoids allocator-specific misclassification for KFENCE objects.
Exploits (5)
This repository contains a functional PoC for CVE-2026-31429, a Linux kernel slab cross-cache confusion vulnerability. The exploit triggers a slab corruption by freeing a KFENCE-allocated SKB head to the wrong slab cache, demonstrated via a BPF syscall-based trigger.
This repository provides a detailed technical analysis of CVE-2026-31429, a slab cross-cache confusion bug in the Linux kernel's networking stack. It includes a root cause analysis, patch details, and reproduction evidence, but the PoC is explicitly labeled as non-working.
This repository contains a functional PoC for CVE-2026-31429, a Linux kernel slab cross-cache confusion vulnerability. The exploit triggers a KFENCE-allocated SKB head being freed to the wrong slab cache, resulting in a kernel warning (warn_free_bad_obj).
This repository contains a functional PoC for CVE-2026-31429, a Linux kernel slab cross-cache confusion vulnerability. The exploit triggers a KFENCE-allocated SKB head being freed to the wrong slab cache, demonstrated via a BPF program that causes a kernel warning.
This repository contains a functional proof-of-concept for CVE-2026-31429, a Linux kernel slab cross-cache confusion bug in the networking stack. The PoC exploits a flaw in `skb_kfree_head()` when KFENCE is enabled, leading to incorrect free operations and potential kernel corruption.
References (5)
Scores
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H