---
id: "CVE-2026-98801"
kind: "vulnerability"
aliases: ["CVE-2026-98801"]
title: "Linux kernel: SO_RESERVE_MEM misuse on UDP sockets can corrupt memory accounting"
severity: "unknown"
cvss: null
epss: null
exploited: false
status: "open"
category: "infrastructure"
products: []
ecosystems: []
tags: ["infrastructure", "kernel", "linux", "self-hosted"]
not_affected_if: ["patched-kernel"]
published_at: "2026-10-18T16:17:34+00:00"
first_seen_at: "2026-10-23T21:57:16+00:00"
updated_at: "2026-10-25T05:15:05+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-98801", "first_seen_at": "2026-10-23T21:57:16+00:00"}]
---

# Linux kernel: SO_RESERVE_MEM misuse on UDP sockets can corrupt memory accounting

The Linux kernel let the SO_RESERVE_MEM socket option run on UDP sockets, where its locking is wrong, and accepted huge values that overflow a 32-bit counter. A local or networked process that sets the option can corrupt kernel socket memory accounting.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `uname -r` and compare against the kernel release that carries the fix (unknown from these sources)
- Check whether your distribution's kernel changelog lists CVE-2026-98801 (unknown from these sources)

## Fix

- Update the Linux kernel to a release that includes the upstream commits restricting SO_RESERVE_MEM to TCP and capping it at SZ_1G (exact version unknown from these sources)
- Reboot after the kernel update so the fixed kernel is running

## Timeline

- 2026-10-23T21:57:16+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-98801

## From the sources

In the Linux kernel, the following vulnerability has been resolved:

net: restrict SO_RESERVE_MEM to TCP sockets and cap max value

Commit 2bb2f5fb21b0 ("net: add new socket option SO_RESERVE_MEM") and
commit d00c8ee31729 ("net: fix possible NULL deref in sock_reserve_memory")
only checked sk_has_account(sk), which is true for both TCP and UDP
sockets.

However, SO_RESERVE_MEM and sk_unused_reserved_mem() are currently only
supported by TCP:
- On UDP sockets, sk->sk_forward_alloc is protected by
  sk->sk_receive_queue.lock, whereas sock_reserve_memory() and
  sock_release_reserved_memory() only acquire lock_sock(sk). Concurrent
  UDP packet reception/release and setsockopt(SO_RESERVE_MEM) corrupt
  sk_forward_alloc and memcg accounting.
- udp_rmem_release() reclaims excess sk_forward_alloc without
  accounting for sk_unused_reserved_mem(sk).

Restrict sock_reserve_memory() to TCP sockets (sk_is_tcp(sk)) for now.
Supporting SO_RESERVE_MEM for UDP (acquiring sk_receive_queue.lock and
honoring sk_unused_reserved_mem() in udp_rmem_release()) can be done in
a future net-next series if needed.

In addition, reject val > SZ_1G with -EINVAL in
sk_setsockopt(SO_RESERVE_MEM). Without an upper bound, values near
INT_MAX cause sk_mem_pages(delta) and (pages << PAGE_SHIFT) to overflow
32-bit signed int, corrupting sk->sk_forward_alloc and
sk->sk_reserved_mem. Using a page-aligned cap (SZ_1G) ensures that the
page-rounded sk->sk_reserved_mem reported by getsockopt(SO_RESERVE_MEM)
can always be passed back to setsockopt(SO_RESERVE_MEM).

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
