Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-98801 Overview
CVE-2026-98801 is a Linux kernel networking vulnerability in the sock_reserve_memory() implementation of the SO_RESERVE_MEM socket option. The flaw originates from commits 2bb2f5fb21b0 and d00c8ee31729, which gated the option on sk_has_account(sk). That check returns true for both TCP and UDP sockets, but only TCP correctly supports reserved memory accounting. Setting SO_RESERVE_MEM on UDP sockets corrupts sk_forward_alloc and memory cgroup (memcg) accounting. The option also accepted values near INT_MAX, triggering a 32-bit signed integer overflow in sk_mem_pages(delta) and (pages << PAGE_SHIFT).
Critical Impact
Local unprivileged users can corrupt kernel socket memory accounting through concurrent UDP packet reception and setsockopt(SO_RESERVE_MEM), or by passing oversized values that overflow signed integer arithmetic.
Affected Products
- Linux kernel versions containing commit 2bb2f5fb21b0 ("net: add new socket option SO_RESERVE_MEM")
- Linux kernel versions containing commit d00c8ee31729 ("net: fix possible NULL deref in sock_reserve_memory")
- Stable kernel branches prior to the fix commits 37e02c4, 492e04f, 5069ce8, and a467b05
Discovery Timeline
- 2026-10-18 - CVE-2026-98801 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-98801
Vulnerability Analysis
The Linux kernel exposes SO_RESERVE_MEM to let userspace reserve socket memory in advance. The handler sock_reserve_memory() gates eligibility on sk_has_account(sk), which evaluates true for both TCP and UDP sockets. Only TCP implements the required locking and reclaim logic. UDP protects sk->sk_forward_alloc with sk->sk_receive_queue.lock, while sock_reserve_memory() and sock_release_reserved_memory() acquire only lock_sock(sk). Concurrent UDP packet reception, release, and setsockopt(SO_RESERVE_MEM) therefore race, corrupting sk_forward_alloc and memcg accounting. Additionally, udp_rmem_release() reclaims excess sk_forward_alloc without honoring sk_unused_reserved_mem(sk), further desynchronizing accounting.
A second defect is the absence of an upper bound on val. Passing values near INT_MAX causes sk_mem_pages(delta) and (pages << PAGE_SHIFT) to overflow a 32-bit signed integer, corrupting sk->sk_forward_alloc and sk->sk_reserved_mem.
Root Cause
The root cause is an insufficient type check combined with missing input validation. sk_has_account(sk) was used as a proxy for SO_RESERVE_MEM support, but UDP sockets also satisfy that predicate without implementing the required accounting discipline. The handler also failed to bound the user-supplied val, allowing arithmetic overflow during page-count conversion.
Attack Vector
A local unprivileged process can open a UDP socket and invoke setsockopt(SO_RESERVE_MEM) while another thread receives traffic on the same socket. The resulting race corrupts kernel accounting state. Alternatively, a process can call setsockopt(SO_RESERVE_MEM, &val, ...) with val near INT_MAX to trigger the signed integer overflow. Both paths require only standard socket privileges.
The upstream fix restricts sock_reserve_memory() to TCP sockets via sk_is_tcp(sk) and rejects val > SZ_1G with -EINVAL. A page-aligned SZ_1G cap ensures the value returned by getsockopt(SO_RESERVE_MEM) can be round-tripped back into setsockopt.
Detection Methods for CVE-2026-98801
Indicators of Compromise
- Unexpected kernel warnings or WARN_ON splats referencing sk_forward_alloc, sock_reserve_memory, or memcg socket accounting counters.
- Processes invoking setsockopt with SO_RESERVE_MEM on SOCK_DGRAM sockets, which is not a legitimate configuration pattern.
- Abnormal memcg socket memory usage reported by memory.stat (sock counter) that does not reconcile with active sockets.
Detection Strategies
- Enable kernel audit rules for setsockopt syscalls and filter for optname == SO_RESERVE_MEM with socket type SOCK_DGRAM.
- Deploy eBPF probes on sock_reserve_memory() and sock_release_reserved_memory() to log the calling PID, socket protocol, and val argument.
- Alert on setsockopt(SO_RESERVE_MEM) calls where the value exceeds SZ_1G (1,073,741,824 bytes).
Monitoring Recommendations
- Collect dmesg output centrally and search for memcg accounting warnings or socket memory anomalies.
- Track per-container memcg sock counters over time; sudden drift without workload change warrants investigation.
- Monitor non-root processes that open UDP sockets and immediately issue setsockopt(SO_RESERVE_MEM).
How to Mitigate CVE-2026-98801
Immediate Actions Required
- Apply the upstream stable kernel updates containing commits 37e02c4, 492e04f, 5069ce8, or a467b05, depending on the stable branch in use.
- Inventory custom kernel modules and services that call setsockopt(SO_RESERVE_MEM) and confirm they target only TCP sockets.
- Prioritize patching multi-tenant hosts, container platforms, and systems exposing UDP workloads to untrusted local users.
Patch Information
The fix restricts sock_reserve_memory() to TCP sockets using sk_is_tcp(sk) and rejects values greater than SZ_1G with -EINVAL. Review the upstream patches at Kernel Git Commit 37e02c4, Kernel Git Commit 492e04f, Kernel Git Commit 5069ce8, and Kernel Git Commit a467b05.
Workarounds
- Where patching is not immediately possible, use seccomp or LSM policies to block setsockopt calls with optname == SO_RESERVE_MEM from untrusted processes.
- Restrict UDP socket creation for workloads that do not require it using namespace and capability restrictions.
- Apply memory cgroup limits so that corrupted socket accounting cannot destabilize the host-wide allocator.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

