CVE-2025-38463: tcp: Correct signedness in skb remaining space calculation

Published Jul 25, 2025
·
Updated

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 = sizegoal - 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 sizegoal 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->skforwardalloc, 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 skforwardalloc to wrap around and become negative.

[1]: https://syzkaller.appspot.com/bug?extid=de6565462ab540f50e47

Affected Software

10 affected componentsFixes available
Linux Linux kernel
Linux Linux kernel>=6.5<6.6.99
Linux Linux kernel>=6.7<6.12.39
Linux Linux kernel>=6.13<6.15.7
Linux Linux kernel=6.16-rc1
Linux Linux kernel=6.16-rc2
Linux Linux kernel=6.16-rc3
Linux Linux kernel=6.16-rc4
Linux Linux kernel=6.16-rc5
debian/linux
6.1.176-16.1.190-16.12.107-16.12.113-17.2.12-17.2.13-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1

Event History

Jul 25, 2025
CVE Published
via MITRE·03:27 PM
Data Sourced
via MITRE·03:27 PM
DescriptionSeverity
Data Sourced
via Red Hat·04:02 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2025-38463?

CVE-2025-38463 is classified as a medium severity vulnerability in the Linux kernel.

2

How do I fix CVE-2025-38463?

To fix CVE-2025-38463, ensure that you upgrade your Linux kernel to the latest patched version.

3

What systems are affected by CVE-2025-38463?

CVE-2025-38463 affects various versions of the Linux kernel, particularly those where the signedness in skb remaining space calculation is present.

4

What impact does CVE-2025-38463 have on system security?

CVE-2025-38463 may allow for data corruption or denial of service due to the potential overflow in sk->sk_forward_alloc.

5

When was CVE-2025-38463 disclosed?

CVE-2025-38463 was reported and resolved in response to issues identified by Syzkaller.

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