{"id":"CVE-2026-98757","kind":"vulnerability","aliases":["CVE-2026-98757"],"related":[],"title":"Linux kernel: cdns3 USB driver use-after-free on gadget exit","description":"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 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.","summary":"The Cadence USB3 gadget driver in the Linux kernel can free its device structures while deferred work items still reference them, because the exit path does not wait for those work items to finish. A local or hardware-triggered race on driver teardown can lead to a use-after-free in kernel memory.","severity":"unknown","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["embedded","linux-kernel","runtime","usb-gadget"],"not_affected_if":["cdns3-driver-not-loaded","no-usb-gadget-mode"],"how_to_check":"- Check whether the running kernel includes the usb: cdns3 fix by looking at the kernel version with `uname -r` and the distribution's changelog for 'cdns3_gadget_exit'.\n- Check whether the cdns3 driver is loaded with `lsmod | grep cdns3` or `lsmod | grep cdns3_`; if absent, the system is not exposed through this driver.","fix":"- Update the Linux kernel to a release that contains the upstream commit fixing cdns3_gadget_exit(); the fixed version is unknown from the sources.\n- Until patched, avoid unbinding or unloading the cdns3 gadget driver on exposed systems (unknown from the sources whether this fully mitigates).","status":"open","published_at":"2026-10-18T16:17:29+00:00","first_seen_at":"2026-10-23T21:57:16+00:00","triaged_at":"2026-10-25T05:16:50+00:00","updated_at":"2026-10-25T05:16:50+00:00","category":"runtime","confidence":0.5,"triage":{"at":"2026-10-25T05:16:50Z","model":"claude-haiku-5-5","output":{"fix":"- Update the Linux kernel to a release that contains the upstream commit fixing cdns3_gadget_exit(); the fixed version is unknown from the sources.\n- Until patched, avoid unbinding or unloading the cdns3 gadget driver on exposed systems (unknown from the sources whether this fully mitigates).","reach":"local","title":"Linux kernel: cdns3 USB driver use-after-free on gadget exit","impact":"medium","summary":"The Cadence USB3 gadget driver in the Linux kernel can free its device structures while deferred work items still reference them, because the exit path does not wait for those work items to finish. A local or hardware-triggered race on driver teardown can lead to a use-after-free in kernel memory.","category":"runtime","nicknames":[],"who_cares":["linux-kernel","embedded","usb-gadget"],"confidence":0.5,"needs_auth":"unknown","worst_case":"kernel memory use-after-free could lead to crash or code execution","analyst_note":"Find the fixed kernel version and the affected range from the upstream stable commit referenced by NVD (https://nvd.nist.gov/vuln/detail/CVE-2026-98757).","how_to_check":"- Check whether the running kernel includes the usb: cdns3 fix by looking at the kernel version with `uname -r` and the distribution's changelog for 'cdns3_gadget_exit'.\n- Check whether the cdns3 driver is loaded with `lsmod | grep cdns3` or `lsmod | grep cdns3_`; if absent, the system is not exposed through this driver.","needs_analyst":true,"not_affected_if":["cdns3-driver-not-loaded","no-usb-gadget-mode"],"who_is_affected":"Systems running a Linux kernel with the Cadence USB3 (cdns3) gadget driver, typically embedded boards or devices acting as USB peripherals. The flaw is in driver teardown, so systems without this driver, or hosts that never unbind it, are unlikely to be exposed. The sources do not state the exact kernel versions affected.","user_interaction":"unknown","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.00073,"input_tokens":3533,"output_tokens":753,"severity_before":"unknown"},"analyst_status":null,"analyst_note":null,"search":"'-2026':14A,17A '-98757':15A,18A 'align':123C,167C 'also':147C 'analysi':237C 'arm':106C 'buf':124C 'buffer':129C,168C,224C 'cadenc':28B 'call':148C 'cdns3':3A,93C,100C,103C,134C,142C,153C 'complet':152C 'cve':13A,16A 'defer':42B,118C 'dev':181C 'devic':39B,135C,177C 'driver':5A,31B,69B,204C 'drop':170C 'embed':19B,139C 'endpoint':165C,222C 'ep0':119C,150C 'exit':12A,50B,102C,155C,188C 'finish':60B 'fix':94C,194C 'follow':87C 'found':230C 'free':9A,37B,78B,98C,163C,179C,193C 'freed':211C 'freezabl':111C 'gadget':11A,26B,30B,101C,104C,154C,176C,203C 'handler':131C,146C 'hardwar':65B 'hardware-trigg':64B 'hous':235C 'in-hous':233C 'irq':209C 'issu':228C 'item':44B,58B 'kernel':2A,22B,35B,80B,85C 'last':172C 'lead':72B 'linux':1A,21B,34B,84C 'linux-kernel':20B 'local':62B 'memori':81B 'new':214C 'path':51B 'pend':113C,143C 'priv':180C 'queu':185C,218C 'race':67B 'realign':127C 'refer':46B,173C 'releas':226C 'request':128C,151C 'resolv':91C 'run':190C 'runtim':23B 'setup':144C 'stage':121C 'start':105C 'static':236C 'status':114C,120C,145C 'still':45B 'structur':40B 'system':110C 'teardown':70B 'tool':238C 'trigger':66B 'two':107C 'unbound':206C 'usb':4A,25B,92C 'usb-gadget':24B 'usb3':29B 'use':7A,76B,96C,132C 'use-after-fre':6A,75B,95C 'vulner':88C 'wait':54B,158C,197C 'work':43B,57B,108C,137C,161C,184C,200C,215C 'wq':112C,115C,125C","nicknames":[],"mitigations":[],"who_affected":"Systems running a Linux kernel with the Cadence USB3 (cdns3) gadget driver, typically embedded boards or devices acting as USB peripherals. The flaw is in driver teardown, so systems without this driver, or hosts that never unbind it, are unlikely to be exposed. The sources do not state the exact kernel versions affected.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-18T16:17:29+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-98757","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98757","severity":null,"published_at":"2026-10-18T16:17:29+00:00","modified_at":"2026-10-21T13:21:44+00:00","first_seen_at":"2026-10-23T21:57:16+00:00","fetched_at":"2026-10-23T22:28:56+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}