{"id":"CVE-2025-38555","aliases":["CVE-2025-38555"],"related":[],"kind":"vulnerability","state":"published","title":"usb: gadget : fix use-after-free in composite_dev_cleanup()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget : fix use-after-free in composite_dev_cleanup()\n\n1. In func configfs_composite_bind() -> composite_os_desc_req_prepare():\nif kmalloc fails, the pointer cdev->os_desc_req will be freed but not\nset to NULL. Then it will return a failure to the upper-level function.\n2. in func configfs_composite_bind() -> composite_dev_cleanup():\nit will checks whether cdev->os_desc_req is NULL. If it is not NULL, it\nwill attempt to use it.This will lead to a use-after-free issue.\n\nBUG: KASAN: use-after-free in composite_dev_cleanup+0xf4/0x2c0\nRead of size 8 at addr 0000004827837a00 by task init/1\n\nCPU: 10 PID: 1 Comm: init Tainted: G           O      5.10.97-oh #1\n kasan_report+0x188/0x1cc\n __asan_load8+0xb4/0xbc\n composite_dev_cleanup+0xf4/0x2c0\n configfs_composite_bind+0x210/0x7ac\n udc_bind_to_driver+0xb4/0x1ec\n usb_gadget_probe_driver+0xec/0x21c\n gadget_dev_desc_UDC_store+0x264/0x27c","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget : fix use-after-free in composite_dev_cleanup()\n\n1. In func configfs_composite_bind() -> composite_os_desc_req_prepare():\nif kmalloc fails, the pointer cdev->os_desc_req will be freed but not\nset to NULL. Then it will return a failure to the upper-level function.\n2. in func configfs_composite_bind() -> composite_dev_cleanup():\nit will checks whether cdev->os_desc_req is NULL. If it is not NULL, it\nwill attempt to use it.This will lead to a use-after-free issue.\n\nBUG: KASAN: use-after-free in composite_dev_cleanup+0xf4/0x2c0\nRead of size 8 at addr 0000004827837a00 by task init/1\n\nCPU: 10 PID: 1 Comm: init Tainted: G           O      5.10.97-oh #1\n kasan_report+0x188/0x1cc\n __asan_load8+0xb4/0xbc\n composite_dev_cleanup+0xf4/0x2c0\n configfs_composite_bind+0x210/0x7ac\n udc_bind_to_driver+0xb4/0x1ec\n usb_gadget_probe_driver+0xec/0x21c\n gadget_dev_desc_UDC_store+0x264/0x27c","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: usb: gadget: corrección del problema de use-after-free en composite_dev_cleanup(). 1. En la función configfs_composite_bind() -&gt; composite_os_desc_req_prepare(): si kmalloc falla, el puntero cdev-&gt;os_desc_req se liberará, pero no se establecerá en NULL. En ese caso, devolverá un error a la función de nivel superior. 2. En la función configfs_composite_bind() -&gt; composite_dev_cleanup(): comprobará si cdev-&gt;os_desc_req es NULL. Si no lo es, intentará usarlo. Esto provocará un problema de use-after-free. ERROR: KASAN: use-after-free en composite_dev_cleanup+0xf4/0x2c0 Lectura de tamaño 8 en la dirección 0000004827837a00 por la tarea init/1 CPU: 10 PID: 1 Comm: init Contaminado: GO 5.10.97-oh #1 kasan_report+0x188/0x1cc __asan_load8+0xb4/0xbc composite_dev_cleanup+0xf4/0x2c0 configfs_composite_bind+0x210/0x7ac udc_bind_to_driver+0xb4/0x1ec usb_gadget_probe_driver+0xec/0x21c gadget_dev_desc_UDC_store+0x264/0x27c","source":"nvd"}],"published":"2025-08-19T17:02:34.110Z","modified":"2026-08-05T12:02:53.142Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"37a3a533429ef9b3cc9f15a656c19623f0e88df7","fixed":"dba96dfa5a0f685b959dd28a52ac8dab0b805204","status":"affected"},{"type":"git","introduced":"37a3a533429ef9b3cc9f15a656c19623f0e88df7","fixed":"2db29235e900a084a656dea7e0939b0abb7bb897","status":"affected"},{"type":"git","introduced":"37a3a533429ef9b3cc9f15a656c19623f0e88df7","fixed":"8afb22aa063f706f3343707cdfb8cda4d021dd33","status":"affected"},{"type":"git","introduced":"37a3a533429ef9b3cc9f15a656c19623f0e88df7","fixed":"e624bf26127645a2f7821e73fdf6dc64bad07835","status":"affected"},{"type":"git","introduced":"37a3a533429ef9b3cc9f15a656c19623f0e88df7","fixed":"aada327a9f8028c573636fa60c0abc80fb8135c9","status":"affected"},{"type":"git","introduced":"37a3a533429ef9b3cc9f15a656c19623f0e88df7","fixed":"5f06ee9f9a3665d43133f125c17e5258a13f3963","status":"affected"},{"type":"git","introduced":"37a3a533429ef9b3cc9f15a656c19623f0e88df7","fixed":"bd3c4ef60baf7f65c963f3e12d9d7b2b091e20ba","status":"affected"},{"type":"git","introduced":"37a3a533429ef9b3cc9f15a656c19623f0e88df7","fixed":"e1be1f380c82a69f80c68c96a7cfe8759fb30355","status":"affected"},{"type":"git","introduced":"37a3a533429ef9b3cc9f15a656c19623f0e88df7","fixed":"151c0aa896c47a4459e07fee7d4843f44c1bb18e","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.16","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.16","status":"unaffected"},{"type":"semver","introduced":"5.4.297","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.241","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.190","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.148","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.102","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.42","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.15.10","lastAffected":"6.15.*","status":"unaffected"},{"type":"semver","introduced":"6.16.1","lastAffected":"6.16.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.17","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"3.16","fixed":"5.4.297"},{"status":"affected","introduced":"5.5","fixed":"5.10.241"},{"status":"affected","introduced":"5.11","fixed":"5.15.190"},{"status":"affected","introduced":"5.16","fixed":"6.1.148"},{"status":"affected","introduced":"6.2","fixed":"6.6.102"},{"status":"affected","introduced":"6.7","fixed":"6.12.42"},{"status":"affected","introduced":"6.13","fixed":"6.15.10"},{"status":"affected","introduced":"6.16","fixed":"6.16.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/dba96dfa5a0f685b959dd28a52ac8dab0b805204","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2db29235e900a084a656dea7e0939b0abb7bb897","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8afb22aa063f706f3343707cdfb8cda4d021dd33","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e624bf26127645a2f7821e73fdf6dc64bad07835","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/aada327a9f8028c573636fa60c0abc80fb8135c9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5f06ee9f9a3665d43133f125c17e5258a13f3963","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/bd3c4ef60baf7f65c963f3e12d9d7b2b091e20ba","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e1be1f380c82a69f80c68c96a7cfe8759fb30355","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/151c0aa896c47a4459e07fee7d4843f44c1bb18e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":["mailing-list","third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","tags":["mailing-list","third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-38555","url":"https://www.cve.org/CVERecord?id=CVE-2025-38555","licence":"CVE Terms of Use","modified":"2026-08-05T12:02:53.142Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-38555","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38555","licence":"Public domain","modified":"2026-07-30T06:23:25.793Z"}],"updatedAt":"2026-11-25T22:59:02.696Z","epss":{"score":0.00218,"percentile":0.13036,"date":"2026-12-01T12:00:22.000Z"}}