CVE-2025-38463

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-38463
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38463.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-38463
Downstream
Related
Published
2025-07-25T16:15:32Z
Modified
2025-08-13T12:49:46.572933Z
Summary
[none]
Details

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->skforwardalloc 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: ssizet (s64 on 64-bit systems) sizegoal: 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 sizegoal 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->skforward_alloc, which can easily cause it to overflow.

The syzkaller reproducer uses TCPREPAIR to reliably create this condition. However, this can also occur in real-world scenarios. The tcpboundtohalfwnd() function can also reduce sizegoal to a small value. This would cause the subsequent tcpwmemschedule() to set sk->skforwardalloc to a value close to INTMAX. Further memory allocation requests would then cause skforward_alloc to wrap around and become negative.

References

Affected packages

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.12.41-1

Affected versions

6.*

6.12.38-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:14 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

6.*

6.12.38-1
6.13~rc6-1~exp1
6.13~rc7-1~exp1
6.13.2-1~exp1
6.13.3-1~exp1
6.13.4-1~exp1
6.13.5-1~exp1
6.13.6-1~exp1
6.13.7-1~exp1
6.13.8-1~exp1
6.13.9-1~exp1
6.13.10-1~exp1
6.13.11-1~exp1
6.14.3-1~exp1
6.14.5-1~exp1
6.14.6-1~exp1
6.15~rc7-1~exp1
6.15-1~exp1
6.15.1-1~exp1
6.15.2-1~exp1
6.15.3-1~exp1
6.15.4-1~exp1
6.15.5-1~exp1
6.15.6-1~exp1
6.16~rc7-1~exp1
6.16-1~exp1

Ecosystem specific

{
    "urgency": "not yet assigned"
}