{"id":"CVE-2026-98757","title":"usb: cdns3: fix use-after-free in cdns3_gadget_exit()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: cdns3: fix use-after-free in cdns3_gadget_exit()\n\ncdns3_gadget_start() arms two works on system_freezable_wq:\npending_status_wq for the deferred ep0 status stage a…","severity":"none","vendor":"Linux","product":"Linux","affected":["Linux >= 7733f6c32e36ff9d7adadf40001039bf219b1cbe < cc448700db656cceb4b411bf99a2e7132144d035","Linux >= 7733f6c32e36ff9d7adadf40001039bf219b1cbe < 95160fe606e685ff18de1e6ddcbc08289476004e","Linux >= 7733f6c32e36ff9d7adadf40001039bf219b1cbe < 159dada48ee2d53eff46e66a8011d67b2c209bbc","Linux >= 7733f6c32e36ff9d7adadf40001039bf219b1cbe < ebe9b68c396792c15d0ac690d592e449e74ed804","Linux 5.4"],"published":"2026-10-18","updated":"2026-10-18","sourceUpdated":"2026-10-18T15:47:44.486Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-98757","references":[{"url":"https://git.kernel.org/stable/c/cc448700db656cceb4b411bf99a2e7132144d035"},{"url":"https://git.kernel.org/stable/c/95160fe606e685ff18de1e6ddcbc08289476004e"},{"url":"https://git.kernel.org/stable/c/159dada48ee2d53eff46e66a8011d67b2c209bbc"},{"url":"https://git.kernel.org/stable/c/ebe9b68c396792c15d0ac690d592e449e74ed804"}],"tags":["cve.org"],"ingestedAt":"2026-10-18T16:47:32.498Z","slug":"CVE-2026-98757","body":"## Overview\n\nIn the Linux kernel, the following vulnerability has been resolved:\n\nusb: cdns3: fix use-after-free in cdns3_gadget_exit()\n\ncdns3_gadget_start() arms two works on system_freezable_wq:\npending_status_wq for the deferred ep0 status stage and aligned_buf_wq\nfor realigned request buffers. Both handlers use the cdns3_device the\nworks are embedded in, and cdns3_pending_setup_status_handler() also\ncalls the ep0 request completion.\n\ncdns3_gadget_exit() does not wait for these works. It frees all\nendpoints and aligned buffers and drops the last reference to the\ngadget device, which frees priv_dev, so a work queued before the exit\ncan run after the free.\n\nFix this by waiting for both works after the gadget driver is unbound\nand the IRQ is freed, when no new work can be queued, and before the\nendpoints and buffers are released.\n\nThis issue was found by an in-house static analysis tool.\n\n## Affected\n\n- `Linux >= 7733f6c32e36ff9d7adadf40001039bf219b1cbe < cc448700db656cceb4b411bf99a2e7132144d035`\n- `Linux >= 7733f6c32e36ff9d7adadf40001039bf219b1cbe < 95160fe606e685ff18de1e6ddcbc08289476004e`\n- `Linux >= 7733f6c32e36ff9d7adadf40001039bf219b1cbe < 159dada48ee2d53eff46e66a8011d67b2c209bbc`\n- `Linux >= 7733f6c32e36ff9d7adadf40001039bf219b1cbe < ebe9b68c396792c15d0ac690d592e449e74ed804`\n- `Linux 5.4`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.","depth":"sunlit","depthScore":3,"depthScoreParts":{"impact":2.8,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}