{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-42236","id":"CVE-2024-42236","title":"usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: configfs: Prevent OOB read/write in usb_string_copy()\n\nUserspace provided string 's' could trivially have the length zero. Left\nunchecked this will firstly result in an OOB read in the form\n`if (str[0 - 1] == '\\n') followed closely by an OOB write in the form\n`str[0 - 1] = '\\0'`.\n\nThere is already a validating check ","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: configfs: Prevent OOB read/write in usb_string_copy()\n\nUserspace provided string 's' could trivially have the length zero. Left\nunchecked this will firstly result in an OOB read in the form\n`if (str[0 - 1] == '\\n') followed closely by an OOB write in the form\n`str[0 - 1] = '\\0'`.\n\nThere is already a validating check to catch strings that are too long.\nLet's supply an additional check for invalid strings that are too short.","published":"2024-08-07T15:14:25.642Z","updated":"2026-10-28T02:30:31.335340407Z","reserved":"2024-07-30T07:40:12.252Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"Linux"},"metrics":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"Linux"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"88af8bbe4ef781031ad3370847553f3b42ba0076","lessThan":"a444c3fc264119801575ab086e03fb4952f23fd0","status":"affected","versionType":"git"},{"version":"88af8bbe4ef781031ad3370847553f3b42ba0076","lessThan":"c95fbdde87e39e5e0ae27f28bf6711edfb985caa","status":"affected","versionType":"git"},{"version":"88af8bbe4ef781031ad3370847553f3b42ba0076","lessThan":"e8474a10c535e6a2024c3b06e37e4a3a23beb490","status":"affected","versionType":"git"},{"version":"88af8bbe4ef781031ad3370847553f3b42ba0076","lessThan":"72b8ee0d9826e8ed00e0bdfce3e46b98419b37ce","status":"affected","versionType":"git"},{"version":"88af8bbe4ef781031ad3370847553f3b42ba0076","lessThan":"2d16f63d8030903e5031853e79d731ee5d474e70","status":"affected","versionType":"git"},{"version":"88af8bbe4ef781031ad3370847553f3b42ba0076","lessThan":"d1205033e912f9332c1dbefa812e6ceb0575ce0a","status":"affected","versionType":"git"},{"version":"88af8bbe4ef781031ad3370847553f3b42ba0076","lessThan":"eecfefad0953b2f31aaefa058f7f348ff39c4bba","status":"affected","versionType":"git"},{"version":"88af8bbe4ef781031ad3370847553f3b42ba0076","lessThan":"6d3c721e686ea6c59e18289b400cc95c76e927e0","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.10","status":"affected"},{"version":"0","lessThan":"3.10","status":"unaffected","versionType":"semver"},{"version":"4.19.318","lessThanOrEqual":"4.19.*","status":"unaffected","versionType":"semver"},{"version":"5.4.280","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.222","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.163","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.100","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.41","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.9.10","lessThanOrEqual":"6.9.*","status":"unaffected","versionType":"semver"},{"version":"6.10","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-787"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/a444c3fc264119801575ab086e03fb4952f23fd0","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/c95fbdde87e39e5e0ae27f28bf6711edfb985caa","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/e8474a10c535e6a2024c3b06e37e4a3a23beb490","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/72b8ee0d9826e8ed00e0bdfce3e46b98419b37ce","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/2d16f63d8030903e5031853e79d731ee5d474e70","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/d1205033e912f9332c1dbefa812e6ceb0575ce0a","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/eecfefad0953b2f31aaefa058f7f348ff39c4bba","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/6d3c721e686ea6c59e18289b400cc95c76e927e0","tags":["Patch","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42236.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42236","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00241,"epssPercentile":0.15415,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-42236","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42236","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-42236","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-42236","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}