CVE-2024-42236: Linux kernel · usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
Affects Linux kernelSource GCVE Database
Not known to be exploited · CVSS 7.8 High · fixed in 5.4.0-1132.142~18.04.1 : patch Linux kernel soon.
Data as of 26 Oct 2026, 23:28 UTC
- Patch
- Available – fixed in 5.4.0-1132.142~18.04.1, 5.4.0-1137.144~18.04.1, 5.4.0-1136.145~18.04.1 +77
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 7 Aug 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade to a fixed release listed under Affected software.
Patches and advisories
- ubuntu.com/security/notices/USN-7003-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7003-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-7006-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7003-3 (opens in a new tab)
- ubuntu.com/security/notices/USN-7007-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7009-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7019-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7007-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-7007-3 (opens in a new tab)
- ubuntu.com/security/notices/USN-7009-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-7003-4 (opens in a new tab)
- ubuntu.com/security/notices/USN-7003-5 (opens in a new tab)
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 24.04 LTSlinuxpkg:deb/ubuntu/linux?arch=source&distro=nobleOther threats | Affected
| Fixed in
|
Ubuntu 24.04 LTSlinux-awspkg:deb/ubuntu/linux-aws?arch=source&distro=nobleOther threats | Affected
| Fixed in
|
Ubuntu 24.04 LTSlinux-azurepkg:deb/ubuntu/linux-azure?arch=source&distro=nobleOther threats | Affected
| Fixed in
|
Ubuntu 24.04 LTSlinux-gcppkg:deb/ubuntu/linux-gcp?arch=source&distro=nobleOther threats | Affected
| Fixed in
|
Ubuntu 24.04 LTSlinux-gkepkg:deb/ubuntu/linux-gke?arch=source&distro=nobleOther threats | Affected
| Fixed in
|
Ubuntu 24.04 LTSlinux-gkeoppkg:deb/ubuntu/linux-gkeop?arch=source&distro=nobleOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: configfs: Prevent OOB read/write in usb_string_copy() 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.
References
- ubuntu.com/security/CVE-2024-42236 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2024-42236 (opens in a new tab)
- git.kernel.org/linus/6d3c721e686ea6c59e18289b400cc95c76e927e0 (opens in a new tab)
- git.kernel.org/stable/c/a444c3fc264119801575ab086e03fb4952f23fd0 (opens in a new tab)
- git.kernel.org/stable/c/c95fbdde87e39e5e0ae27f28bf6711edfb985caa (opens in a new tab)
- git.kernel.org/stable/c/e8474a10c535e6a2024c3b06e37e4a3a23beb490 (opens in a new tab)
- git.kernel.org/stable/c/72b8ee0d9826e8ed00e0bdfce3e46b98419b37ce (opens in a new tab)
- git.kernel.org/stable/c/2d16f63d8030903e5031853e79d731ee5d474e70 (opens in a new tab)
- git.kernel.org/stable/c/d1205033e912f9332c1dbefa812e6ceb0575ce0a (opens in a new tab)
- git.kernel.org/stable/c/eecfefad0953b2f31aaefa058f7f348ff39c4bba (opens in a new tab)
- git.kernel.org/stable/c/6d3c721e686ea6c59e18289b400cc95c76e927e0 (opens in a new tab)
- ubuntu.com/security/notices/USN-7003-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7003-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-7006-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7003-3 (opens in a new tab)
- ubuntu.com/security/notices/USN-7007-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7009-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7019-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7007-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-7007-3 (opens in a new tab)