media: b2c2: Fix use-after-free causing by irq_check_work in flexcop_pci_remove
In the Linux kernel, the following vulnerability has been resolved: media: b2c2: Fix use-after-free causing by irq_check_work in flexcop_pci_remove The original code uses cancel_delayed_work() in flexcop_pci_remove(), which does not guarantee that the delayed work item irq_check_work has fully completed if it was already running. This leads to use-after-free scenarios where flexcop_pci_remove() may free the flexcop_device while irq_check_work is still active and attempts to dereference the device. A typical race condition is illustrated below: CPU 0 (remove) | CPU 1 (delayed work callback) flexcop_pci_remove() | flexcop_pci_irq_check_work() cancel_delayed_work() | flexcop_device_kfree(fc_pci->fc_dev) | | fc = fc_pci->fc_dev; // UAF This is confirmed by a KASAN report: ================================================================== BUG: KASAN: slab-use-after-free in __run_timer_base.part.0+0x7d7/0x8c0 Write of size 8 at addr ffff8880093aa8c8 by task bash/135 ... Call Trace: dump_stack_lvl+0x55/0x70 print_report+0xcf/0x610 ? __run_timer_base.part.0+0x7d7/0x8c0 kasan_report+0xb8/0xf0 ? __run_timer_base.part.0+0x7d7/0x8c0 __run_timer_base.part.0+0x7d7/0x8c0 ? __pfx___run_timer_base.part.0+0x10/0x10 ? __pfx_read_tsc+0x10/0x10 ? ktime_get+0x60/0x140 ? lapic_next_event+0x11/0x20 ? clockevents_program_event+0x1d4/0x2a0 run_timer_softirq+0xd1/0x190 handle_softirqs+0x16a/0x550 irq_exit_rcu+0xaf/0xe0 sysvec_apic_timer_interrupt+0x70/0x80 ... Allocated by task 1: kasan_save_stack+0x24
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.10.246, 5.15.195, 5.4.301, 6.1.156, 6.12.51, 6.16.11, 6.17.1, 6.6.110
- CVEs
- CVE-2025-39996
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 04:14 UTC · Revision 1
Source evidence
media: b2c2: Fix use-after-free causing by irq_check_work in flexcop_pci_remove
core-osv · Original sourcePublished 15 Oct 2025, 07:58 UTC
In the Linux kernel, the following vulnerability has been resolved: media: b2c2: Fix use-after-free causing by irq_check_work in flexcop_pci_remove The original code uses cancel_delayed_work() in flexcop_pci_remove(), which does not guarantee that the delayed work item irq_check_work has fully completed if it was already running. This leads to use-after-free scenarios where flexcop_pci_remove() may free the flexcop_device while irq_check_work is still active and attempts to dereference the device. A typical race condition is illustrated below: CPU 0 (remove) | CPU 1 (delayed work callback) flexcop_pci_remove() | flexcop_pci_irq_check_work() cancel_delayed_work() | flexcop_device_kfree(fc_pci->fc_dev) | | fc = fc_pci->fc_dev; // UAF This is confirmed by a KASAN report: ================================================================== BUG: KASAN: slab-use-after-free in __run_timer_base.part.0+0x7d7/0x8c0 Write of size 8 at addr ffff8880093aa8c8 by task bash/135 ... Call Trace: dump_stack_lvl+0x55/0x70 print_report+0xcf/0x610 ? __run_timer_base.part.0+0x7d7/0x8c0 kasan_report+0xb8/0xf0 ? __run_timer_base.part.0+0x7d7/0x8c0 __run_timer_base.part.0+0x7d7/0x8c0 ? __pfx___run_timer_base.part.0+0x10/0x10 ? __pfx_read_tsc+0x10/0x10 ? ktime_get+0x60/0x140 ? lapic_next_event+0x11/0x20 ? clockevents_program_event+0x1d4/0x2a0 run_timer_softirq+0xd1/0x190 handle_softirqs+0x16a/0x550 irq_exit_rcu+0xaf/0xe0 sysvec_apic_timer_interrupt+0x70/0x80 ... Allocated by task 1: kasan_save_stack+0x24
osv:CVE-2025-39996
Kernel
Fixed versions: 5.4.301, 5.10.246, 5.15.195, 6.1.156, 6.6.110, 6.12.51, 6.16.11, 6.17.1
Complete source record
{
"id": "72dee9dac4723a425b516b654e4d5eb01b2b7f94e3208284495bc21be6f7ecd0",
"url": "https://osv.dev/vulnerability/CVE-2025-39996",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "media: b2c2: Fix use-after-free causing by irq_check_work in flexcop_pci_remove",
"summary": "In the Linux kernel, the following vulnerability has been resolved: media: b2c2: Fix use-after-free causing by irq_check_work in flexcop_pci_remove The original code uses cancel_delayed_work() in flexcop_pci_remove(), which does not guarantee that the delayed work item irq_check_work has fully completed if it was already running. This leads to use-after-free scenarios where flexcop_pci_remove() may free the flexcop_device while irq_check_work is still active and attempts to dereference the device. A typical race condition is illustrated below: CPU 0 (remove) | CPU 1 (delayed work callback) flexcop_pci_remove() | flexcop_pci_irq_check_work() cancel_delayed_work() | flexcop_device_kfree(fc_pci->fc_dev) | | fc = fc_pci->fc_dev; // UAF This is confirmed by a KASAN report: ================================================================== BUG: KASAN: slab-use-after-free in __run_timer_base.part.0+0x7d7/0x8c0 Write of size 8 at addr ffff8880093aa8c8 by task bash/135 ... Call Trace: dump_stack_lvl+0x55/0x70 print_report+0xcf/0x610 ? __run_timer_base.part.0+0x7d7/0x8c0 kasan_report+0xb8/0xf0 ? __run_timer_base.part.0+0x7d7/0x8c0 __run_timer_base.part.0+0x7d7/0x8c0 ? __pfx___run_timer_base.part.0+0x10/0x10 ? __pfx_read_tsc+0x10/0x10 ? ktime_get+0x60/0x140 ? lapic_next_event+0x11/0x20 ? clockevents_program_event+0x1d4/0x2a0 run_timer_softirq+0xd1/0x190 handle_softirqs+0x16a/0x550 irq_exit_rcu+0xaf/0xe0 sysvec_apic_timer_interrupt+0x70/0x80 ... Allocated by task 1: kasan_save_stack+0x24",
"evidence": "osv:CVE-2025-39996",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.4.301",
"evidence": "/affected/1/ranges"
},
{
"value": "5.10.246",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.195",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.156",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.110",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.51",
"evidence": "/affected/1/ranges"
},
{
"value": "6.16.11",
"evidence": "/affected/1/ranges"
},
{
"value": "6.17.1",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2025-39996",
"aliases": [
"CVE-2025-39996"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "382c5546d618f24dc7d6ae7ca33412083720efbf"
},
{
"fixed": "607010d07b8a509b01ed15ea12744acac6536a98"
},
{
"fixed": "bde8173def374230226e8554efb51b271f4066ec"
},
{
"fixed": "120e221b4bbe9d0f6c09b5c4dc53ca4ad91d956b"
},
{
"fixed": "d502df8a716d993fa0f9d8c00684f1190750e28e"
},
{
"fixed": "bb10a9ddc8d6c5dbf098f21eb1055a652652e524"
},
{
"fixed": "514a519baa9e2be7ddc2714bd730bc5a883e1244"
},
{
"fixed": "3ffabc79388e68877d9c02f724a0b7a38d519daf"
},
{
"fixed": "6a92f5796880f5aa345f0fed53ef511e3fd6f706"
},
{
"fixed": "01e03fb7db419d39e18d6090d4873c1bff103914"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39996.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "2.6.29"
},
{
"fixed": "5.4.301"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.5.0"
},
{
"fixed": "5.10.246"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.195"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.156"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.110"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.51"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.16.11"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.17.0"
},
{
"fixed": "6.17.1"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39996.json"
}
}
],
"modified": "2026-10-28T02:30:42.451082874Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/01e03fb7db419d39e18d6090d4873c1bff103914",
"https://git.kernel.org/stable/c/120e221b4bbe9d0f6c09b5c4dc53ca4ad91d956b",
"https://git.kernel.org/stable/c/3ffabc79388e68877d9c02f724a0b7a38d519daf",
"https://git.kernel.org/stable/c/514a519baa9e2be7ddc2714bd730bc5a883e1244",
"https://git.kernel.org/stable/c/607010d07b8a509b01ed15ea12744acac6536a98",
"https://git.kernel.org/stable/c/6a92f5796880f5aa345f0fed53ef511e3fd6f706",
"https://git.kernel.org/stable/c/bb10a9ddc8d6c5dbf098f21eb1055a652652e524",
"https://git.kernel.org/stable/c/bde8173def374230226e8554efb51b271f4066ec",
"https://git.kernel.org/stable/c/d502df8a716d993fa0f9d8c00684f1190750e28e",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39996.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-39996",
"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/39xxx/CVE-2025-39996.json"
}
},
"related_cves": [
{
"value": "CVE-2025-39996",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 510193,
"published_at": "2025-10-15T07:58:21.049+00:00"
}