CVE-2024-42236: usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: configfs: Prevent OOB read/write in usbstringcopy()
Userspace provided string 's' could trivially have the length zero. Left unchecked this will firstly result in an OOB read in the form if (str[0 - 1] == '\n') followed closely by an OOB write in the form str[0 - 1] = '\0'.
There is already a validating check to catch strings that are too long. Let's supply an additional check for invalid strings that are too short.
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
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.6.43.1-7 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 5.15.164.1-1
Event History
Frequently Asked Questions
What is the severity of CVE-2024-42236?
CVE-2024-42236 has been classified as a medium severity vulnerability due to potential out-of-bounds read and write conditions in the Linux kernel.
How do I fix CVE-2024-42236?
To fix CVE-2024-42236, ensure you update to the patched versions of the Linux kernel, such as 5.10.223-1 or 6.1.123-1.
Which versions of the Linux kernel are affected by CVE-2024-42236?
CVE-2024-42236 affects multiple versions of the Linux kernel, specifically versions prior to 4.19.318 and between 4.20 and 6.9.10.
What systems are at risk from CVE-2024-42236?
Systems using affected versions of the Linux kernel, including distributions like Debian, are at risk from CVE-2024-42236.
Is there a workaround for CVE-2024-42236?
There is no official workaround for CVE-2024-42236; updating the kernel to a secure version is the recommended solution.