CVE-2026-31429
net: skb: fix cross-cache free of KFENCE-allocated skb head
Reported by linux · Published April 20, 2026
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.
EPSS 0.26% · 17.7th percentile
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | bf9f1baa279f0758dc2297080360c5a616843927, bf9f1baa279f0758dc2297080360c5a616843927, bf9f1baa279f0758dc2297080360c5a616843927 |
| Linux | Linux | 6.3, 0, 6.6.136 |
| amazon:2023 | kernel6.18-headers | 0 |
| amazon:2023 | kernel6.12-modules-extra | 0 |
| amazon:2023 | perf6.18 | 0 |
| amazon:2023 | kernel6.12-modules-extra-common | 0 |
| amazon:2023 | kernel6.18-tools | 0 |
| linux | linux_kernel | 6.3, 6.3, 6.3 |
| amazon:2023 | kernel6.12-headers | 0 |
| amazon:2023 | kernel-livepatch-6.12.83-113.160 | 0 |
| amazon:2023 | kernel6.18 | 0 |
| amazon:2023 | kernel6.18-modules-extra | 0 |
| amazon:2023 | kernel6.12-tools | 0 |
| amazon:2023 | kernel6.18-modules-extra-common | 0 |
| amazon:2023 | python3-perf6.18 | 0 |
| amazon:2023 | kernel-livepatch-6.18.25-55.108 | 0 |
| amazon:2023 | bpftool6.12 | 0 |
| amazon:2023 | perf6.12 | 0 |
| amazon:2023 | kernel6.12-devel | 0 |
| amazon:2023 | kernel6.18-devel | 0 |
…and 6 more
Timeline
- Apr 19, 2026 CVE Published
- Apr 20, 2026 PoC Published
- Apr 21, 2026 Security Advisory (15 in total, the first dated here)
- May 18, 2026 EPSS Score (30 in total, the first dated here)
- Jul 12, 2026 Coalition ESS Score
- Aug 11, 2026 Distribution Patch (13 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2026-31429
vulnetix vdb fixes CVE-2026-31429
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-31429/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart