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 &#39;s&#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] == &#39;\n&#39;) followed closely by an OOB write in the form<br />
`str[0 - 1] = &#39;\0&#39;`.<br />
<br />
There is already a validating check to catch strings that are too long.<br />
Let&#39;s supply an additional check for invalid strings that are too short.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
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) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/2d16f63d8030903e5031853e79d731ee5d474e70
- https://git.kernel.org/stable/c/6d3c721e686ea6c59e18289b400cc95c76e927e0
- https://git.kernel.org/stable/c/72b8ee0d9826e8ed00e0bdfce3e46b98419b37ce
- https://git.kernel.org/stable/c/a444c3fc264119801575ab086e03fb4952f23fd0
- https://git.kernel.org/stable/c/c95fbdde87e39e5e0ae27f28bf6711edfb985caa
- https://git.kernel.org/stable/c/d1205033e912f9332c1dbefa812e6ceb0575ce0a
- https://git.kernel.org/stable/c/e8474a10c535e6a2024c3b06e37e4a3a23beb490
- https://git.kernel.org/stable/c/eecfefad0953b2f31aaefa058f7f348ff39c4bba
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html



