CVE-2024-26752 l2tp: pass correct message length to ip6_append_data
A logic error in the Linux kernel L2TP IPv6 implementation causes corrupted packets, potentially leading to denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-26752?
CVE-2024-26752 is a medium-severity vulnerability in Debian Debian Linux, published on 3 Apr 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
l2tp: pass correct message length to ip6_append_data
l2tp_ip6_sendmsg needs to avoid accounting for the transport header twice when splicing more data into an already partially-occupied skbuff.
To manage this, we check whether the skbuff contains data using skb_queue_empty when deciding how much data to append using ip6_append_data.
However, the code which performed the calculation was incorrect:
ulen = len + skb_queue_empty(&sk->sk_write_queue) ? transhdrlen : 0;
...due to C operator precedence, this ends up setting ulen to transhdrlen for messages with a non-zero length, which results in corrupted packets on the wire.
Add parentheses to correct the calculation in line with the original intent.
Weakness: CWE-131
Which versions are affected by CVE-2024-26752?
It affects 2 products.
Products include Debian Debian Linux, Linux kernel.
How do I fix CVE-2024-26752?
Apply the vendor's patch.
Is CVE-2024-26752 being exploited?
There is no known exploitation of CVE-2024-26752 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as BELL-CVE-2024-26752, DEBIAN-CVE-2024-26752, GHSA-xhj3-2vvm-6mr5, UBUNTU-CVE-2024-26752.