{"id":"CVE-2026-80824","summary":"usb: usbfs: fix use-after-free of usb_device in usbdev_release()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: usbfs: fix use-after-free of usb_device in usbdev_release()\n\nusbdev_release() drops its reference to the struct usb_device before\ndraining the list of completed async URBs, but that drain path reads back\nthrough the same object: free_async() calls dec_usb_memory_use_count()\nfor any URB whose buffer came from the usbfs mmap() region, and its first\nstatement is bus_to_hcd(ps-\u003edev-\u003ebus).\n\nAfter a disconnect the usbfs reference can be the last one, in which case\nusb_put_dev() frees the device and the subsequent loop reads offset 80 of\nfreed memory and uses the result as a struct usb_hcd *, which\nhcd_buffer_free_pages() then dereferences.\n\nThis is reachable by an unprivileged process that has read/write access to\na /dev/bus/usb node: mmap() the fd, submit one URB with a buffer inside the\nmapping, wait for the device to be unplugged, then munmap() and close().\nIt reproduces on every attempt rather than being a race, because a live\nMAP_SHARED vma holds a reference on the struct file, so usbdev_release()\ncannot run until the last vma is gone and the freeing branch of\ndec_usb_memory_use_count() is always taken.\n\n  BUG: KASAN: slab-use-after-free in dec_usb_memory_use_count+0x3ae/0x410\n  Read of size 8 at addr ffff8880122ee050 by task poc/769\n  CPU: 1 UID: 1000 PID: 769 Comm: poc Tainted: G    B    6.12.94 #3\n\n  Call Trace:\n   dec_usb_memory_use_count+0x3ae/0x410\n   free_async+0x2aa/0x4f0\n   usbdev_release+0x375/0x460\n   __fput+0x3ea/0xb50\n   __x64_sys_close+0x86/0x100\n\n  Allocated by task 11:\n   usb_alloc_dev+0x55/0xd90\n   hub_event+0x2524/0x43d0\n\n  Freed by task 769:\n   kfree+0x121/0x360\n   device_release+0xd2/0x280\n   usb_put_dev+0x23/0x30\n   usbdev_release+0x2d8/0x460\n\nRelease the device reference after the drain loop instead. Nothing between\nthe two points requires it to have been dropped.","modified":"2026-09-06T03:46:51.496318675Z","published":"2026-09-04T15:54:28.038Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/80xxx/CVE-2026-80824.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/0a960b88c5979f853019d4dc4957dfbeeb193440"},{"type":"WEB","url":"https://git.kernel.org/stable/c/0dd68b5d01d022fc9c5e71c82a82b0a94d3d0671"},{"type":"WEB","url":"https://git.kernel.org/stable/c/47a7f98fbb5006d46d15a3a210ffdc61448a4f19"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5f08c45bdcfd28d1171de38c5ef29fc89a76eedc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/65879e0a452ca2a234b9475e0c11aff7a4343738"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7f0278e474c4d1c4457974ff1137cc385c944ab3"},{"type":"WEB","url":"https://git.kernel.org/stable/c/96f5520fc9a5e4bbf77ac93c9d5ce502f597e6cf"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b3cde26a66b04f1d90ed0b675899c88b4e49d424"},{"type":"WEB","url":"https://git.kernel.org/stable/c/bd4bffc621a8cb2f4d9ed9b6447415de524a3bef"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/80xxx/CVE-2026-80824.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-80824"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"f7d34b445abc00e979b7cf36b9580ac3d1a47cd8"},{"fixed":"0a960b88c5979f853019d4dc4957dfbeeb193440"},{"fixed":"96f5520fc9a5e4bbf77ac93c9d5ce502f597e6cf"},{"fixed":"bd4bffc621a8cb2f4d9ed9b6447415de524a3bef"},{"fixed":"65879e0a452ca2a234b9475e0c11aff7a4343738"},{"fixed":"b3cde26a66b04f1d90ed0b675899c88b4e49d424"},{"fixed":"5f08c45bdcfd28d1171de38c5ef29fc89a76eedc"},{"fixed":"7f0278e474c4d1c4457974ff1137cc385c944ab3"},{"fixed":"47a7f98fbb5006d46d15a3a210ffdc61448a4f19"},{"fixed":"0dd68b5d01d022fc9c5e71c82a82b0a94d3d0671"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-80824.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.6.0"},{"fixed":"5.10.269"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.220"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.187"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.156"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.108"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.49"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.1.13"}]},{"type":"ECOSYSTEM","events":[{"introduced":"7.2.0"},{"fixed":"7.2.3"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-80824.json"}}],"schema_version":"1.9.0"}