CVE-2026-98299: tcp: do not let tcp_rmem be set below 4096

Published Oct 6, 2026
·
Updated

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

tcp: do not let tcprmem be set below 4096

We can hit a division by zero crash in tcprcvbufgrow() and tcprcvspaceadjust():

divide error: 0000 [#1] PREEMPT SMP RIP: 0010:tcprcvbufgrow+0x187/0x450 net/ipv4/tcpinput.c:939 ... grow = divu64(((u64)rcvwin << 1) (newval - oldval), oldval);

The division uses oldval = tp->rcvqspace.space as divisor. When tp->rcvqspace.space is zero, this leads to a divide-by-zero exception.

tp->rcvqspace.space is initialized in tcpinitbufferspace(): tp->rcvqspace.space = min3(tp->rcvssthresh, tp->rcvwnd, (u32)TCPINITCWND tp->advmss);

If tcprmem[1] is configured to very small values (such as 1), sk->skrcvbuf is initialized to 1. Then tcpfullspace(sk), which computes (sk->skrcvbuf scalingratio) >> 8, truncates to 0. This sets tp->windowclamp = 0, tp->rcvssthresh = 0, and tp->rcvqspace.space = 0. Later, when data arrives and DRS is invoked, tcprcvbufgrow() divides by oldval == 0.

Back in 2015, commit b1cb59cf2efe ("net: sysctlnetcore: check SNDBUF and RCVBUF for min length") ensured that net.core.rmemdefault and net.core.rmemmax cannot be set below SOCKMINRCVBUF. Similarly, SORCVBUF setsockopt enforces maxt(int, val 2, SOCKMINRCVBUF).

However, net.ipv4.tcprmem still had .extra1 = SYSCTLONE, allowing arbitrarily small values.

Because SOCKMINRCVBUF depends on sizeof(struct skbuff) and cacheline alignment, its value varies across architectures and configuration options. Using a fixed constant of 4096 ensures a predictable, architecture- independent lower bound that is safely above SOCKMINRCVBUF everywhere and matches the documented 4K default.

Fix this by setting tcprmem.extra1 to 4096 and updating the documentation.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Set tcp_rmem.extra1 to 4096 so net.ipv4.tcp_rmem cannot be configured below the safe minimum.

    Linux kernel TCP net.ipv4.tcp_rmem.extra1 = 4096

Event History

Oct 6, 2026
CVE Published
via MITRE·08:45 AM
Data Sourced
via MITRE·08:45 AM
Description
Data Sourced
via NVD·09:18 AM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203