CVE-2025-38463

tcp: Correct signedness in skb remaining space calculation

MEDIUM
5.5
CVSS Score
Published: July 25, 2025 at 03:27 PM UTC
Updated: August 5, 2026 at 12:44 PM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

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

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

6.13 ≤ v < 6.15.76.5 ≤ v < 6.12.396.5 ≤ v < 6.15.76.5 ≤ v < 6.166.5 ≤ v < 6.6.996.7 ≤ v < 6.12.39270a1c3de47e49dd2fc18f48e46b101e48050e786.16 rc16.16 rc26.16 rc36.16 rc46.16 rc5
Vendor states this is fixed in 62e6160cfb5514787bda833d466509edc38fde23 (fixed)
Vendor states this is fixed in 81373cd1d72d87c7d844d4454a526b8f53e72d00 (fixed)
Vendor states this is fixed in 9f164fa6bb09fbcc60fa5c3ff551ce9eec1befd7 (fixed)
Vendor states this is fixed in d3a5f2871adc0c61c61869f37f3e697d97f03d8c (fixed)
Vendor states this is fixed in 6.12.39 (unaffected)
Vendor states this is fixed in 6.15.7 (unaffected)
Vendor states this is fixed in 6.16 (unaffected)
Vendor states this is fixed in 6.5 (unaffected)
Vendor states this is fixed in 6.6.99 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/62e6160cfb5514787bda833d466509edc38fde23
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/81373cd1d72d87c7d844d4454a526b8f53e72d00
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9f164fa6bb09fbcc60fa5c3ff551ce9eec1befd7
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/d3a5f2871adc0c61c61869f37f3e697d97f03d8c

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-191

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card