{"id":"CVE-2024-42236","published":"2024-08-07T15:14:25Z","modified":"2026-08-05T11:36:01Z","title":"usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00241,"percentile":0.15529,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/a444c3fc264119801575ab086e03fb4952f23fd0","tags":[]},{"url":"https://git.kernel.org/stable/c/c95fbdde87e39e5e0ae27f28bf6711edfb985caa","tags":[]},{"url":"https://git.kernel.org/stable/c/e8474a10c535e6a2024c3b06e37e4a3a23beb490","tags":[]},{"url":"https://git.kernel.org/stable/c/72b8ee0d9826e8ed00e0bdfce3e46b98419b37ce","tags":[]},{"url":"https://git.kernel.org/stable/c/2d16f63d8030903e5031853e79d731ee5d474e70","tags":[]},{"url":"https://git.kernel.org/stable/c/d1205033e912f9332c1dbefa812e6ceb0575ce0a","tags":[]},{"url":"https://git.kernel.org/stable/c/eecfefad0953b2f31aaefa058f7f348ff39c4bba","tags":[]},{"url":"https://git.kernel.org/stable/c/6d3c721e686ea6c59e18289b400cc95c76e927e0","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","tags":[]}],"priority":{"score":8.6,"factors":[{"name":"EPSS percentile","points":3.11},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 88af8bbe4ef781031ad3370847553f3b42ba0076, < a444c3fc264119801575ab086e03fb4952f23fd0",">= 88af8bbe4ef781031ad3370847553f3b42ba0076, < c95fbdde87e39e5e0ae27f28bf6711edfb985caa",">= 88af8bbe4ef781031ad3370847553f3b42ba0076, < e8474a10c535e6a2024c3b06e37e4a3a23beb490",">= 88af8bbe4ef781031ad3370847553f3b42ba0076, < 72b8ee0d9826e8ed00e0bdfce3e46b98419b37ce",">= 88af8bbe4ef781031ad3370847553f3b42ba0076, < 2d16f63d8030903e5031853e79d731ee5d474e70",">= 88af8bbe4ef781031ad3370847553f3b42ba0076, < d1205033e912f9332c1dbefa812e6ceb0575ce0a",">= 88af8bbe4ef781031ad3370847553f3b42ba0076, < eecfefad0953b2f31aaefa058f7f348ff39c4bba",">= 88af8bbe4ef781031ad3370847553f3b42ba0076, < 6d3c721e686ea6c59e18289b400cc95c76e927e0"]},{"vendor":"Linux","product":"Linux","versions":["3.10"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-09-10T16:14:04.317460Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-39440","exploited":false,"provenance":"source"}}