CVE-2025-39996

media: b2c2: Fix use-after-free causing by irq_check_work in flexcop_pci_remove

CVE-2025-39996 is fixed in 44 products on 1 platform, first by DEBIAN-CVE-2025-39996, released October 15, 2025. It is not reported as exploited. Patch Radar priority: Urgent.

Urgent
CVSS
9.8
Critical
Exploitation
None reported
No vendor assessment
CISA KEV
Not listed
Not in the Known Exploited Vulnerabilities catalog
EPSS
0.0023
14th percentile

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: <IRQ> 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 </IRQ> ... Allocated by task 1: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 __kasan_kmalloc+0x7f/0x90 __kmalloc_noprof+0x1be/0x460 flexcop_device_kmalloc+0x54/0xe0 flexcop_pci_probe+0x1f/0x9d0 local_pci_probe+0xdc/0x190 pci_device_probe+0x2fe/0x470 really_probe+0x1ca/0x5c0 __driver_probe_device+0x248/0x310 driver_probe_device+0x44/0x120 __driver_attach+0xd2/0x310 bus_for_each_dev+0xed/0x170 bus_add_driver+0x208/0x500 driver_register+0x132/0x460 do_one_initcall+0x89/0x300 kernel_init_freeable+0x40d/0x720 kernel_init+0x1a/0x150 ret_from_fork+0x10c/0x1a0 ret_from_fork_asm+0x1a/0x30 Freed by task 135: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3a/0x60 __kasan_slab_free+0x3f/0x50 kfree+0x137/0x370 flexcop_device_kfree+0x32/0x50 pci_device_remove+0xa6/0x1d0 device_release_driver_internal+0xf8/0x210 pci_stop_bus_device+0x105/0x150 pci_stop_and_remove_bus_device_locked+0x15/0x30 remove_store+0xcc/0xe0 kernfs_fop_write_iter+0x2c3/0x440 vfs_write+0x871/0xd70 ksys_write+0xee/0x1c0 do_syscall_64+0xac/0x280 entry_SYSCALL_64_after_hwframe+0x77/0x7f ... Replace cancel_delayed_work() with cancel_delayed_work_sync() to ensure that the delayed work item is properly canceled and any executing delayed work has finished before the device memory is deallocated. This bug was initially identified through static analysis. To reproduce and test it, I simulated the B2C2 FlexCop PCI device in QEMU and introduced artificial delays within the flexcop_pci_irq_check_work() function to increase the likelihood of triggering the bug.

Where it's fixed

ProductFixed inFixReleased
Linux
bpftool · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
bpftool · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
dtb-aarch64 · opensuse-leap 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
dtb-aarch64 · opensuse-leap 16.0 6.12.0-160000.7.1 OPENSUSE-SU-2025:20091-1 Nov 26, 2025
kernel-64kb · opensuse-leap 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-64kb · opensuse-leap 16.0 6.12.0-160000.7.1 OPENSUSE-SU-2025:20091-1 Nov 26, 2025
kernel-64kb · sles 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-64kb · sles 15.7 6.4.0-150700.53.22.1 SUSE-SU-2025:4057-1 Nov 11, 2025
kernel-64kb · sles 16.0 6.12.0-160000.7.1 SUSE-SU-2025:21147-1 Nov 26, 2025
kernel-azure · opensuse-leap 15.6 6.4.0-150600.8.55.1 SUSE-SU-2025:4128-1 Nov 18, 2025
kernel-azure · sles 15.6 6.4.0-150600.8.55.1 SUSE-SU-2025:4128-1 Nov 18, 2025
kernel-azure · sles 15.7 6.4.0-150700.20.18.1 SUSE-SU-2025:4132-1 Nov 18, 2025
kernel-debug · opensuse-leap 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-default · opensuse-leap 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-default · opensuse-leap 16.0 6.12.0-160000.7.1 OPENSUSE-SU-2025:20091-1 Nov 26, 2025
kernel-default · sles 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-default · sles 15.7 6.4.0-150700.53.22.1 SUSE-SU-2025:4057-1 Nov 11, 2025
kernel-default · sles 16.0 6.12.0-160000.7.1 SUSE-SU-2025:21147-1 Nov 26, 2025
kernel-default-base · opensuse-leap 15.6 6.4.0-150600.23.78.1.150600.12.34.2 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-default-base · opensuse-leap 16.0 6.12.0-160000.6.1.160000.2.4 OPENSUSE-SU-2025:20091-1 Nov 26, 2025
kernel-default-base · sles 15.6 6.4.0-150600.23.78.1.150600.12.34.2 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-default-base · sles 15.7 6.4.0-150700.53.22.1.150700.17.15.1 SUSE-SU-2025:4057-1 Nov 11, 2025
kernel-default-base · sles 16.0 6.12.0-160000.6.1.160000.2.4 SUSE-SU-2025:21147-1 Nov 26, 2025
kernel-docs · opensuse-leap 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-docs · opensuse-leap 16.0 6.12.0-160000.7.1 OPENSUSE-SU-2025:20091-1 Nov 26, 2025
kernel-docs · sles 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-docs · sles 15.7 6.4.0-150700.53.22.1 SUSE-SU-2025:4057-1 Nov 11, 2025
kernel-docs · sles 16.0 6.12.0-160000.7.1 SUSE-SU-2025:21147-1 Nov 26, 2025
kernel-kvmsmall · opensuse-leap 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-kvmsmall · opensuse-leap 16.0 6.12.0-160000.7.1 OPENSUSE-SU-2025:20091-1 Nov 26, 2025
kernel-kvmsmall · sles 16.0 6.12.0-160000.7.1 SUSE-SU-2025:21147-1 Nov 26, 2025
kernel-livepatch-SLE15-SP6-RT_Update_17 · sles 15.6 1-150600.1.3.1 SUSE-SU-2025:4301-1 Nov 28, 2025
kernel-livepatch-SLE15-SP6_Update_17 · sles 15.6 1-150600.13.5.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-livepatch-SLE15-SP7-RT_Update_6 · sles 15.7 1-150700.1.3.1 SUSE-SU-2025:4141-1 Nov 19, 2025
kernel-livepatch-SLE15-SP7_Update_6 · sles 15.7 1-150700.15.3.1 SUSE-SU-2025:4057-1 Nov 11, 2025
kernel-obs-build · opensuse-leap 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-obs-build · opensuse-leap 16.0 6.12.0-160000.7.1 OPENSUSE-SU-2025:20091-1 Nov 26, 2025
kernel-obs-build · sles 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-obs-build · sles 15.7 6.4.0-150700.53.22.1 SUSE-SU-2025:4057-1 Nov 11, 2025
kernel-obs-qa · opensuse-leap 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-obs-qa · opensuse-leap 16.0 6.12.0-160000.7.1 OPENSUSE-SU-2025:20091-1 Nov 26, 2025
kernel-obs-qa · sles 16.0 6.12.0-160000.7.1 SUSE-SU-2025:21147-1 Nov 26, 2025
kernel-rt · opensuse-leap 15.6 6.4.0-150600.10.58.1 SUSE-SU-2025:4301-1 Nov 28, 2025
kernel-rt · opensuse-leap 16.0 6.12.0-160000.7.1 OPENSUSE-SU-2025:20091-1 Nov 26, 2025
kernel-rt_debug · opensuse-leap 15.6 6.4.0-150600.10.58.1 SUSE-SU-2025:4301-1 Nov 28, 2025
kernel-source · opensuse-leap 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-source · opensuse-leap 16.0 6.12.0-160000.7.1 OPENSUSE-SU-2025:20091-1 Nov 26, 2025
kernel-source · sles 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-source · sles 15.7 6.4.0-150700.53.22.1 SUSE-SU-2025:4057-1 Nov 11, 2025
kernel-source · sles 16.0 6.12.0-160000.7.1 SUSE-SU-2025:21147-1 Nov 26, 2025
kernel-source-azure · opensuse-leap 15.6 6.4.0-150600.8.55.1 SUSE-SU-2025:4128-1 Nov 18, 2025
kernel-source-azure · sles 15.6 6.4.0-150600.8.55.1 SUSE-SU-2025:4128-1 Nov 18, 2025
kernel-source-azure · sles 15.7 6.4.0-150700.20.18.1 SUSE-SU-2025:4132-1 Nov 18, 2025
kernel-source-rt · opensuse-leap 15.6 6.4.0-150600.10.58.1 SUSE-SU-2025:4301-1 Nov 28, 2025
kernel-syms · opensuse-leap 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-syms · opensuse-leap 16.0 6.12.0-160000.7.1 OPENSUSE-SU-2025:20091-1 Nov 26, 2025
kernel-syms · sles 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-syms · sles 15.7 6.4.0-150700.53.22.1 SUSE-SU-2025:4057-1 Nov 11, 2025
kernel-syms · sles 16.0 6.12.0-160000.7.1 SUSE-SU-2025:21147-1 Nov 26, 2025
kernel-syms-azure · opensuse-leap 15.6 6.4.0-150600.8.55.1 SUSE-SU-2025:4128-1 Nov 18, 2025
kernel-syms-azure · sles 15.6 6.4.0-150600.8.55.1 SUSE-SU-2025:4128-1 Nov 18, 2025
kernel-syms-azure · sles 15.7 6.4.0-150700.20.18.1 SUSE-SU-2025:4132-1 Nov 18, 2025
kernel-syms-rt · opensuse-leap 15.6 6.4.0-150600.10.58.1 SUSE-SU-2025:4301-1 Nov 28, 2025
kernel-uek · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-container · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-container · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-container-debug · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-container-debug · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-core · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-core · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-debug · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-debug · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-debug-core · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-debug-core · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-debug-devel · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-debug-devel · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-debug-modules · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-debug-modules · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-debug-modules-extra · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-debug-modules-extra · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-devel · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-devel · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-doc · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-doc · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-modules · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-modules · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-modules-extra · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-modules-extra · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek-tools · ol 8 0:5.4.17-2136.350.3.1.el7uek ELSA-2025-28049 Dec 12, 2025
kernel-uek64k · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek64k · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek64k-core · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek64k-core · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek64k-devel · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek64k-devel · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek64k-modules · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek64k-modules · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek64k-modules-extra · ol 8 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-uek64k-modules-extra · ol 9 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048 Dec 12, 2025
kernel-zfcpdump · opensuse-leap 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-zfcpdump · opensuse-leap 16.0 6.12.0-160000.7.1 OPENSUSE-SU-2025:20091-1 Nov 26, 2025
kernel-zfcpdump · sles 15.6 6.4.0-150600.23.78.1 SUSE-SU-2025:4140-1 Nov 19, 2025
kernel-zfcpdump · sles 15.7 6.4.0-150700.53.22.1 SUSE-SU-2025:4057-1 Nov 11, 2025
kernel-zfcpdump · sles 16.0 6.12.0-160000.7.1 SUSE-SU-2025:21147-1 Nov 26, 2025
linux · Debian 12.15 (bookworm) 6.1.158-1 DEBIAN-CVE-2025-39996 Oct 15, 2025
linux · Debian 13.5 (trixie) 6.12.57-1 DEBIAN-CVE-2025-39996 Oct 15, 2025
linux · Debian 14 6.16.11-1 DEBIAN-CVE-2025-39996 Oct 15, 2025

Patch Radar data is free to use with attribution. Terms and how to credit it.

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.