CVE-2025-38463 Details
Description
In the Linux kernel, the following vulnerability has been resolved: tcp: Correct signedness in skb remaining space calculation Syzkaller reported a bug [1] where sk->sk_forward_alloc can overflow. When we send data, if an skb exists at the tail of the write queue, the kernel will attempt to append the new data to that skb. However, the code that checks for available space in the skb is flawed: ''' copy = size_goal - skb->len ''' The types of the variables involved are: ''' copy: ssize_t (s64 on 64-bit systems) size_goal: int skb->len: unsigned int ''' Due to C's type promotion rules, the signed size_goal is converted to an unsigned int to match skb->len before the subtraction. The result is an unsigned int. When this unsigned int result is then assigned to the s64 copy variable, it is zero-extended, preserving its non-negative value. Consequently, copy is always >= 0. Assume we are sending 2GB of data and size_goal has been adjusted to a value smaller than skb->len. The subtraction will result in copy holding a very large positive integer. In the subsequent logic, this large value is used to update sk->sk_forward_alloc, which can easily cause it to overflow. The syzkaller reproducer uses TCP_REPAIR to reliably create this condition. However, this can also occur in real-world scenarios. The tcp_bound_to_half_wnd() function can also reduce size_goal to a small value. This would cause the subsequent tcp_wmem_schedule() to set sk->sk_forward_alloc to a value close to INT_MAX. Further memory allocation requests would then cause sk_forward_alloc to wrap around and become negative. [1]: https://syzkaller.appspot.com/bug?extid=de6565462ab540f50e47
A vulnerability in the Linux kernel's TCP implementation can lead to an overflow in the sk->sk_forward_alloc variable. This issue arises from a flaw in how the available space in a socket buffer (skb) is calculated. When data is sent and an skb is present at the end of the write queue, the kernel tries to add the new data to that skb. However, the calculation of available space is incorrect due to a signedness issue. The size_goal variable, which is signed, is converted to an unsigned int for the calculation, leading to a scenario where copy, a ssize_t variable, can hold a large positive value. This can cause sk->sk_forward_alloc to overflow and become negative, potentially leading to memory allocation issues. The vulnerability can be reproduced using the TCP_REPAIR feature, but it may also occur in normal operation.
Users can upgrade to the latest version of the Linux kernel where this vulnerability has been addressed. The specific commit that resolves this issue is available in the Linux kernel stable tree.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/62e6160cfb5514787bda833d466509edc38fde23 | kernel.org | Patch |
| https://git.kernel.org/stable/c/81373cd1d72d87c7d844d4454a526b8f53e72d00 | kernel.org | Patch |
| https://git.kernel.org/stable/c/9f164fa6bb09fbcc60fa5c3ff551ce9eec1befd7 | kernel.org | Patch |
| https://git.kernel.org/stable/c/d3a5f2871adc0c61c61869f37f3e697d97f03d8c | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-191 | Integer Underflow (Wrap or Wraparound) | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 6.5, < 6.6.99 >= 6.7, < 6.12.39 >= 6.13, < 6.15.7 6.16 rc1 6.16 rc2 6.16 rc3 6.16 rc4 6.16 rc5 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 30, 2026 | CVE Modified | kernel.org |
| Jun 17, 2026 | CVE Modified | kernel.org |
| Nov 19, 2025 | Initial Analysis | [email protected] |
| Jul 25, 2025 | New CVE Received | kernel.org |