CVE-2024-35827: io_uring/net: fix overflow check in io_recvmsg_mshot_prep()
In the Linux kernel, the following vulnerability has been resolved:
iouring/net: fix overflow check in iorecvmsgmshotprep()
The "controllen" variable is type sizet (unsigned long). Casting it to int could lead to an integer underflow.
The checkaddoverflow() function considers the type of the destination which is type int. If we add two positive values and the result cannot fit in an integer then that's counted as an overflow.
However, if we cast "controllen" to an int and it turns negative, then negative values can fit into an int type so there is no overflow.
Good: 100 + (unsigned long)-4 = 96 <-- overflow Bad: 100 + (int)-4 = 96 <-- no overflow
I deleted the cast of the sizeof() as well. That's not a bug but the cast is unnecessary.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
iouring/net: fix overflow check in iorecvmsgmshotprep()
The Linux kernel CVE team has assigned CVE-2024-35827 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024051741-CVE-2024-35827-822c@gregkh/T
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.1.83 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.6.23 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.7.11 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.8.2 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.9
Event History
Frequently Asked Questions
What is the severity of CVE-2024-35827?
CVE-2024-35827 has a high severity due to the potential for integer underflow causing system instability.
How do I fix CVE-2024-35827?
To fix CVE-2024-35827, update the kernel to a patched version such as 6.1.83, 6.6.23, 6.7.11, 6.8.2, or 6.9 for Red Hat systems, or appropriate Debian kernel versions.
What systems are affected by CVE-2024-35827?
CVE-2024-35827 affects multiple Linux kernel versions, particularly those in the Red Hat and Debian distributions.
Is there a workaround for CVE-2024-35827?
Currently, there is no reliable workaround for CVE-2024-35827 aside from applying the recommended updates.
When was CVE-2024-35827 disclosed?
CVE-2024-35827 was disclosed in early 2024, highlighting a critical issue in the Linux kernel's io_uring component.