{"api_version":"1","generated_at":"2026-10-21T10:16:49+00:00","cve":"CVE-2026-98757","urls":{"html":"https://cve.report/CVE-2026-98757","api":"https://cve.report/api/cve/CVE-2026-98757.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-98757","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-98757"},"summary":{"title":"usb: cdns3: fix use-after-free in cdns3_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.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-10-18 16:17:29","updated_at":"2026-10-19 10:19:39"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/95160fe606e685ff18de1e6ddcbc08289476004e","name":"https://git.kernel.org/stable/c/95160fe606e685ff18de1e6ddcbc08289476004e","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/159dada48ee2d53eff46e66a8011d67b2c209bbc","name":"https://git.kernel.org/stable/c/159dada48ee2d53eff46e66a8011d67b2c209bbc","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/cc448700db656cceb4b411bf99a2e7132144d035","name":"https://git.kernel.org/stable/c/cc448700db656cceb4b411bf99a2e7132144d035","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ebe9b68c396792c15d0ac690d592e449e74ed804","name":"https://git.kernel.org/stable/c/ebe9b68c396792c15d0ac690d592e449e74ed804","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-98757","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98757","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7733f6c32e36ff9d7adadf40001039bf219b1cbe cc448700db656cceb4b411bf99a2e7132144d035 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7733f6c32e36ff9d7adadf40001039bf219b1cbe 95160fe606e685ff18de1e6ddcbc08289476004e git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7733f6c32e36ff9d7adadf40001039bf219b1cbe 159dada48ee2d53eff46e66a8011d67b2c209bbc git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7733f6c32e36ff9d7adadf40001039bf219b1cbe ebe9b68c396792c15d0ac690d592e449e74ed804 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.4","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.4 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.113 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.56 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2.10 7.2.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/usb/cdns3/cdns3-gadget.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"cc448700db656cceb4b411bf99a2e7132144d035","status":"affected","version":"7733f6c32e36ff9d7adadf40001039bf219b1cbe","versionType":"git"},{"lessThan":"95160fe606e685ff18de1e6ddcbc08289476004e","status":"affected","version":"7733f6c32e36ff9d7adadf40001039bf219b1cbe","versionType":"git"},{"lessThan":"159dada48ee2d53eff46e66a8011d67b2c209bbc","status":"affected","version":"7733f6c32e36ff9d7adadf40001039bf219b1cbe","versionType":"git"},{"lessThan":"ebe9b68c396792c15d0ac690d592e449e74ed804","status":"affected","version":"7733f6c32e36ff9d7adadf40001039bf219b1cbe","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/usb/cdns3/cdns3-gadget.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"5.4"},{"lessThan":"5.4","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.113","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.56","versionType":"semver"},{"lessThanOrEqual":"7.2.*","status":"unaffected","version":"7.2.10","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.3","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.113","versionStartIncluding":"5.4","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.56","versionStartIncluding":"5.4","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.2.10","versionStartIncluding":"5.4","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3","versionStartIncluding":"5.4","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"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."}],"providerMetadata":{"dateUpdated":"2026-10-19T09:25:10.801Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"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"}],"title":"usb: cdns3: fix use-after-free in cdns3_gadget_exit()","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-98757","datePublished":"2026-10-18T15:47:44.486Z","dateReserved":"2026-09-25T10:25:14.368Z","dateUpdated":"2026-10-19T09:25:10.801Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-10-18 16:17:29","lastModifiedDate":"2026-10-19 10:19:39","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"98757","Ordinal":"1","Title":"usb: cdns3: fix use-after-free in cdns3_gadget_exit()","CVE":"CVE-2026-98757","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"98757","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"usb: cdns3: fix use-after-free in cdns3_gadget_exit()"}]}}}