usb: phy: fsl-usb: Fix use-after-free in delayed work during device removal
In the Linux kernel, the following vulnerability has been resolved: usb: phy: fsl-usb: Fix use-after-free in delayed work during device removal The delayed work item otg_event is initialized in fsl_otg_conf() and scheduled under two conditions: 1. When a host controller binds to the OTG controller. 2. When the USB ID pin state changes (cable insertion/removal). A race condition occurs when the device is removed via fsl_otg_remove(): the fsl_otg instance may be freed while the delayed work is still pending or executing. This leads to use-after-free when the work function fsl_otg_event() accesses the already freed memory. The problematic scenario: (detach thread) | (delayed work) fsl_otg_remove() | kfree(fsl_otg_dev) //FREE| fsl_otg_event() | og = container_of(...) //USE | og-> //USE Fix this by calling disable_delayed_work_sync() in fsl_otg_remove() before deallocating the fsl_otg structure. This ensures the delayed work is properly canceled and completes execution prior to memory deallocation. This bug was identified through static analysis.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.12.64, 6.18.3
- CVEs
- CVE-2025-68781
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 01:34 UTC · Revision 1
Source evidence
usb: phy: fsl-usb: Fix use-after-free in delayed work during device removal
core-osv · Original sourcePublished 13 Jan 2026, 15:28 UTC
In the Linux kernel, the following vulnerability has been resolved: usb: phy: fsl-usb: Fix use-after-free in delayed work during device removal The delayed work item otg_event is initialized in fsl_otg_conf() and scheduled under two conditions: 1. When a host controller binds to the OTG controller. 2. When the USB ID pin state changes (cable insertion/removal). A race condition occurs when the device is removed via fsl_otg_remove(): the fsl_otg instance may be freed while the delayed work is still pending or executing. This leads to use-after-free when the work function fsl_otg_event() accesses the already freed memory. The problematic scenario: (detach thread) | (delayed work) fsl_otg_remove() | kfree(fsl_otg_dev) //FREE| fsl_otg_event() | og = container_of(...) //USE | og-> //USE Fix this by calling disable_delayed_work_sync() in fsl_otg_remove() before deallocating the fsl_otg structure. This ensures the delayed work is properly canceled and completes execution prior to memory deallocation. This bug was identified through static analysis.
osv:CVE-2025-68781
Kernel
Fixed versions: 6.12.64, 6.18.3
Complete source record
{
"id": "4334023ac91c67487c011c488c56a89b04d8db7ce49ee200777ba4321d1db565",
"url": "https://osv.dev/vulnerability/CVE-2025-68781",
"method": "structured",
"payload": {
"kind": "advisory",
"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: usb: phy: fsl-usb: Fix use-after-free in delayed work during device removal The delayed work item otg_event is initialized in fsl_otg_conf() and scheduled under two conditions: 1. When a host controller binds to the OTG controller. 2. When the USB ID pin state changes (cable insertion/removal). A race condition occurs when the device is removed via fsl_otg_remove(): the fsl_otg instance may be freed while the delayed work is still pending or executing. This leads to use-after-free when the work function fsl_otg_event() accesses the already freed memory. The problematic scenario: (detach thread) | (delayed work) fsl_otg_remove() | kfree(fsl_otg_dev) //FREE| fsl_otg_event() | og = container_of(...) //USE | og-> //USE Fix this by calling disable_delayed_work_sync() in fsl_otg_remove() before deallocating the fsl_otg structure. This ensures the delayed work is properly canceled and completes execution prior to memory deallocation. This bug was identified through static analysis.",
"evidence": "osv:CVE-2025-68781",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.12.64",
"evidence": "/affected/1/ranges"
},
{
"value": "6.18.3",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2025-68781",
"aliases": [
"CVE-2025-68781"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "0807c500a1a6d7fa20cbd7bbe7fea14a66112463"
},
{
"fixed": "69f9a0701abc3d1f8225074c56c27e6c16a37222"
},
{
"fixed": "2e7c47e2eb3cfeadf78a1ccbac8492c60d508f23"
},
{
"fixed": "41ca62e3e21e48c2903b3b45e232cf4f2ff7434f"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68781.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "3.0.0"
},
{
"fixed": "6.12.64"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.18.3"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68781.json"
}
}
],
"modified": "2026-10-28T02:30:41.279612760Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/2e7c47e2eb3cfeadf78a1ccbac8492c60d508f23",
"https://git.kernel.org/stable/c/41ca62e3e21e48c2903b3b45e232cf4f2ff7434f",
"https://git.kernel.org/stable/c/69f9a0701abc3d1f8225074c56c27e6c16a37222",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68781.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-68781",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68781.json"
}
},
"related_cves": [
{
"value": "CVE-2025-68781",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 509138,
"published_at": "2026-01-13T15:28:56.261+00:00"
}