CVE-2024-42236

Severity CVSS v4.0:
Pending analysis
Type:
CWE-787 Out-of-bounds Write
Publication date:
07/08/2024
Last modified:
03/11/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()<br /> <br /> Userspace provided string &amp;#39;s&amp;#39; could trivially have the length zero. Left<br /> unchecked this will firstly result in an OOB read in the form<br /> `if (str[0 - 1] == &amp;#39;\n&amp;#39;) followed closely by an OOB write in the form<br /> `str[0 - 1] = &amp;#39;\0&amp;#39;`.<br /> <br /> There is already a validating check to catch strings that are too long.<br /> Let&amp;#39;s supply an additional check for invalid strings that are too short.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.19.318 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.20 (including) 5.4.280 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.5 (including) 5.10.222 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.163 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 6.1.100 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.2 (including) 6.6.41 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7 (including) 6.9.10 (excluding)