CVE-2026-98588
NoneCVSS
—
EPSS
0.2%
Published
Oct 18, 2026
CISA due date
—
Cloudanix analysis
A bug in the Linux kernel's networking code lets specially crafted programs trigger crashes or memory corruption when certain network maps are created and later cleaned up.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Privilege Gain
- Component
- OS kernel
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
sock_map_alloc accepts max_entries up to UINT_MAX without enforcing INT_MAX bound; sock_map_free then iterates with a signed int, causing wrap to INT_MIN, sign-extension, and an out-of-bounds xchg write far below the sks[] allocation during map destruction.
Why it matters to the business
Systems using BPF sockmaps can experience kernel crashes or memory corruption when such maps are created and later freed, leading to denial of service or potential privilege escalation on large-memory hosts.
How an attack unfolds
An attacker invokes the BPF map_create syscall to allocate a SOCKMAP with max_entries set to 0xffffffff; subsequent close or deferred free path reaches sock_map_free, where the signed iterator overflows and performs an uncontrolled write that either faults or corrupts unrelated kernel memory.
How to fix it
Apply the upstream fix that rejects max_entries > INT_MAX inside sock_map_alloc; rebuild and deploy kernels containing the corrected bpf, sockmap logic; avoid creating sockmaps with entries near UINT_MAX until patched.
How to confirm the fix worked
Attempt BPF map creation with max_entries=0xffffffff on a test system and confirm the operation is now rejected with -EINVAL; verify absence of the sign-extension path in sock_map_free disassembly; monitor for the specific KASAN oops signature on unpatched kernels.
Typical attack path
- Invoke bpf() syscall with BPF_MAP_CREATE for SOCKMAP type and max_entries=0xffffffff
- Trigger map destruction via close() or process exit
- sock_map_free iterates with signed int that wraps, producing negative offset into sks[]
- xchg() write lands at attacker-controlled or unmapped address causing oops or corruption
How to detect it
Search kernel logs for 'BUG: unable to handle page fault' near kasan_check_range and sock_map_free; inspect BPF audit records or syscall traces for map_create operations requesting max_entries values exceeding INT_MAX; correlate vmcore analysis showing stab->map.max_entries == 0xffffffff.
- kasan_check_range+0x107/0x190
- sock_map_free+0x93/0x190
- max_entries == 0xffffffff
- sks + (s64)INT_MIN * 8
What your security team should do
- Prioritize kernel updates containing the sock_map_alloc bounds check within the next maintenance window
- Audit any production workloads that create large BPF sockmaps and reduce entry counts below INT_MAX
- Enable CONFIG_KASAN_VMALLOC on test kernels to surface the bug during validation
- Add runtime checks or seccomp filters that block oversized map creation until patches are deployed
The record
In the Linux kernel, the following vulnerability has been resolved: bpf, sockmap: Reject max_entries > INT_MAX in sock_map_alloc sock_map_alloc() only rejects max_entries == 0 and otherwise allows any u32 value. sock_map_free() then walks the sks[] array with a signed int iterator: int i; for (i = 0; i < stab->map.max_entries; i++) struct sock **psk = &stab->sks[i]; When a SOCKMAP is created with max_entries = 0xffffffff (UINT_MAX), the allocation of 32 GiB can succeed on large-memory hosts. During free the counter reaches 0x80000000, wraps to INT_MIN, is sign-extended by movslq and turned into a ~16 GiB negative offset from stab->sks, pointing far below the allocation. The faulting access is an xchg() write in sock_map_free(). Without KASAN, the same out-of-bounds write can fault on an unmapped vmalloc page or corrupt an unrelated allocation if that vmalloc address is populated. On a KASAN kernel with CONFIG_KASAN_VMALLOC=y, the shadow check for that address hits an unmapped shadow page and oopses first: BUG: unable to handle page fault for address: fffff521b59c5a00 RIP: 0010:kasan_check_range+0x107/0x190 Call Trace: sock_map_free+0x93/0x190 map_create+0x68d/0xb30 __sys_bpf+0x21e/0x2e70 Vmcore confirmed stab->map.max_entries == 0xffffffff, stab->sks == 0xffffc911ace2d000, and the faulting address sks + (s64)INT_MIN * 8 exactly at 0xffffc90dace2d000. The same buggy path is reached on the normal close()/bpf_map_free_deferred() path whenever such a map is destroyed. sock_map_alloc() used to bound its allocation size through bpf_map_charge_init(), but the bound was dropped when rlimit-based memory accounting was removed. Reject max_entries > INT_MAX at creation time so the signed iterator in sock_map_free() never sees a value that would overflow. Triggered by syzkaller and reproduced on both a 6.6-based KASAN kernel and the upstream v7.3-rc2 kernel.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|