CVE-2022-50865
Description
In the Linux kernel, the following vulnerability has been resolved:
tcp: fix a signed-integer-overflow bug in tcp_add_backlog()
The type of sk_rcvbuf and sk_sndbuf in struct sock is int, and in tcp_add_backlog(), the variable limit is caculated by adding sk_rcvbuf, sk_sndbuf and 64 * 1024, it may exceed the max value of int and overflow. This patch reduces the limit budget by halving the sndbuf to solve this issue since ACK packets are much smaller than the payload.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Signed integer overflow in Linux kernel's tcp_add_backlog() may cause incorrect memory accounting, mitigated by halving sndbuf contribution.
In the Linux kernel, the tcp_add_backlog() function calculates a memory limit by summing sk_rcvbuf, sk_sndbuf, and 64 KiB. Since these fields are signed ints, the sum can overflow when the buffer sizes are large, resulting in a negative or erroneously small limit. This overflow can disrupt proper TCP backlog handling [1][2].
The vulnerability is in the network stack's backlog processing, triggered by normal network traffic. An attacker does not need any special access; they only need to send TCP packets that cause the receiving socket's buffers to be large enough to trigger the overflow. The overflow leads to incorrect limit calculations, potentially allowing the backlog queue to grow excessively or be incorrectly capped.
Impact: A successful exploitation could cause memory corruption, system instability, or a denial of service by exhausting kernel memory or triggering other faults. The bug is in a core networking path, so it could affect a wide range of services relying on TCP.
Both references [1][2] point to stable kernel commits that apply the fix: halving the contribution of sndbuf to the limit calculation to keep the sum within the signed int range. Users should apply these kernel updates to mitigate the issue. No workaround other than patching is known.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
59d04b4d0feee4f23cb2be530a85d39f14aa828addf029417ec791d8149ffVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- git.kernel.org/stable/c/28addf029417d53b1df062b4c87feb7bc033cb5fnvd
- git.kernel.org/stable/c/4f23cb2be530785db284a685d1b1c30224d8a538nvd
- git.kernel.org/stable/c/9d04b4d0feee12bce6bfe37f30d8e953d3c30368nvd
- git.kernel.org/stable/c/a85d39f14aa8a71e29cfb5eb5de02878a8779898nvd
- git.kernel.org/stable/c/ec791d8149ff60c40ad2074af3b92a39c916a03fnvd
News mentions
0No linked articles in our index yet.