{"id":"CVE-2025-68781","aliases":["CVE-2025-68781"],"related":[],"kind":"vulnerability","state":"published","title":"usb: phy: fsl-usb: Fix use-after-free in delayed work during device removal","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: phy: fsl-usb: Fix use-after-free in delayed work during device removal\n\nThe delayed work item otg_event is initialized in fsl_otg_conf() and\nscheduled under two conditions:\n1. When a host controller binds to the OTG controller.\n2. When the USB ID pin state changes (cable insertion/removal).\n\nA race condition occurs when the device is removed via fsl_otg_remove():\nthe fsl_otg instance may be freed while the delayed work is still pending\nor executing. This leads to use-after-free when the work function\nfsl_otg_event() accesses the already freed memory.\n\nThe problematic scenario:\n\n(detach thread)            | (delayed work)\nfsl_otg_remove()           |\n  kfree(fsl_otg_dev) //FREE| fsl_otg_event()\n                           |   og = container_of(...) //USE\n                           |   og-> //USE\n\nFix this by calling disable_delayed_work_sync() in fsl_otg_remove()\nbefore deallocating the fsl_otg structure. This ensures the delayed work\nis properly canceled and completes execution prior to memory deallocation.\n\nThis bug was identified through static analysis.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: phy: fsl-usb: Fix use-after-free in delayed work during device removal\n\nThe delayed work item otg_event is initialized in fsl_otg_conf() and\nscheduled under two conditions:\n1. When a host controller binds to the OTG controller.\n2. When the USB ID pin state changes (cable insertion/removal).\n\nA race condition occurs when the device is removed via fsl_otg_remove():\nthe fsl_otg instance may be freed while the delayed work is still pending\nor executing. This leads to use-after-free when the work function\nfsl_otg_event() accesses the already freed memory.\n\nThe problematic scenario:\n\n(detach thread)            | (delayed work)\nfsl_otg_remove()           |\n  kfree(fsl_otg_dev) //FREE| fsl_otg_event()\n                           |   og = container_of(...) //USE\n                           |   og-> //USE\n\nFix this by calling disable_delayed_work_sync() in fsl_otg_remove()\nbefore deallocating the fsl_otg structure. This ensures the delayed work\nis properly canceled and completes execution prior to memory deallocation.\n\nThis bug was identified through static analysis.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nusb: phy: fsl-usb: Corrección de uso después de liberación en trabajo retrasado durante la eliminación del dispositivo\n\nEl elemento de trabajo retrasado otg_event se inicializa en fsl_otg_conf() y se programa bajo dos condiciones:\n1. Cuando un controlador de host se enlaza al controlador OTG.\n2. Cuando el estado del pin ID USB cambia (inserción/extracción de cable).\n\nUna condición de carrera ocurre cuando el dispositivo es eliminado a través de fsl_otg_remove(): la instancia fsl_otg puede ser liberada mientras el trabajo retrasado aún está pendiente o ejecutándose. Esto lleva a un uso después de liberación cuando la función de trabajo fsl_otg_event() accede a la memoria ya liberada.\n\nEl escenario problemático:\n\n(hilo de desvinculación) | (trabajo retrasado)\nfsl_otg_remove() |\nkfree(fsl_otg_dev) //FREE| fsl_otg_event()\n| og = container_of(...) //USE\n| og-&gt; //USE\n\nSolucione esto llamando a disable_delayed_work_sync() en fsl_otg_remove() antes de desasignar la estructura fsl_otg. Esto asegura que el trabajo retrasado sea cancelado correctamente y complete su ejecución antes de la desasignación de memoria.\n\nEste error fue identificado a través de análisis estático.","source":"nvd"}],"published":"2026-01-13T15:28:56.261Z","modified":"2026-09-02T13:17:03.090Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"0807c500a1a6d7fa20cbd7bbe7fea14a66112463","fixed":"69f9a0701abc3d1f8225074c56c27e6c16a37222","status":"affected"},{"type":"git","introduced":"0807c500a1a6d7fa20cbd7bbe7fea14a66112463","fixed":"2e7c47e2eb3cfeadf78a1ccbac8492c60d508f23","status":"affected"},{"type":"git","introduced":"0807c500a1a6d7fa20cbd7bbe7fea14a66112463","fixed":"41ca62e3e21e48c2903b3b45e232cf4f2ff7434f","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.0","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.0","status":"unaffected"},{"type":"semver","introduced":"6.12.64","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.3","lastAffected":"6.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.19","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/69f9a0701abc3d1f8225074c56c27e6c16a37222","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2e7c47e2eb3cfeadf78a1ccbac8492c60d508f23","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/41ca62e3e21e48c2903b3b45e232cf4f2ff7434f","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-68781","url":"https://www.cve.org/CVERecord?id=CVE-2025-68781","licence":"CVE Terms of Use","modified":"2026-09-02T12:49:30.176Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-68781","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68781","licence":"Public domain","modified":"2026-09-02T13:17:03.090Z"}],"updatedAt":"2026-11-25T22:59:10.529Z","epss":{"score":0.00212,"percentile":0.12235,"date":"2026-12-01T12:00:22.000Z"}}