CVE-2025-39993
NoneCVSS
—
EPSS
0.2%
Published
Oct 15, 2025
CISA due date
—
Cloudanix analysis
A flaw in how the Linux kernel handles certain USB remote-control devices can let an attacker crash the computer or potentially take control if the device is removed while in use.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Moderate
- Impact
- Other
- Component
- OS kernel
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free of usb_device pointers (usbdev_intf0/usbdev_intf1) in the iMON driver when imon_disconnect releases the reference without coordination with concurrent writers; vfd_write, lcd_write and send_packet dereference the pointers after usb_put_dev has freed them.
Why it matters to the business
Kernel crashes, denial of service, or potential local privilege escalation on Linux systems that use iMON USB media/remote devices; high prevalence of the kernel across servers and desktops increases exposure surface.
How an attack unfolds
An attacker with local access triggers imon_disconnect (via device removal or module unload) while a write operation is in flight; the writer path in send_packet calls usb_sndintpipe/usb_sndctrlpipe on a now-freed usb_device. Similar kernel races have been leveraged by actors such as VMSCAPE and in related container-optimized OS privilege-escalation campaigns.
How to fix it
Apply the upstream fix (commit 9348976003e39754af344949579e824a0a210fc4) or the equivalent SUSE kgraft-patch-SLE12_Update_29 (version 7-2.1). Rebuild and reboot with a patched kernel; ensure the disconnected flag is checked under ictx->lock before any USB pipe operations.
How to confirm the fix worked
Confirm the presence of early -ENODEV returns guarded by ictx->disconnected in send_packet, vfd_write, lcd_write and display_open, and that imon_disconnect acquires ictx->lock before setting the flag; run syzkaller or targeted USB disconnect/write stress tests to verify absence of KASAN reports.
Typical attack path
- Attacker obtains local code execution or shell on target system
- Triggers USB device disconnect or module unload to invoke imon_disconnect
- Concurrent vfd_write/lcd_write/send_packet path executes after usb_put_dev
- UAF read of usb_device structure leads to KASAN report or controlled memory access
- Attacker chains to privilege escalation or denial of service
How to detect it
Search kernel logs for KASAN use-after-free reports citing __create_pipe or send_packet in drivers/media/rc/imon.c; correlate with USB disconnect events and write syscalls on /dev devices managed by the iMON driver.
What your security team should do
- Prioritize kernel upgrade on any system exposing iMON or similar USB input devices
- Harden local access controls and container isolation to reduce attack surface for kernel UAF primitives
- Add monitoring for KASAN use-after-free reports referencing imon.c or send_packet
The record
In the Linux kernel, the following vulnerability has been resolved: media: rc: fix races with imon_disconnect() Syzbot reports a KASAN issue as below: BUG: KASAN: use-after-free in __create_pipe include/linux/usb.h:1945 [inline] BUG: KASAN: use-after-free in send_packet+0xa2d/0xbc0 drivers/media/rc/imon.c:627 Read of size 4 at addr ffff8880256fb000 by task syz-executor314/4465 CPU: 2 PID: 4465 Comm: syz-executor314 Not tainted 6.0.0-rc1-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x6e9 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495 __create_pipe include/linux/usb.h:1945 [inline] send_packet+0xa2d/0xbc0 drivers/media/rc/imon.c:627 vfd_write+0x2d9/0x550 drivers/media/rc/imon.c:991 vfs_write+0x2d7/0xdd0 fs/read_write.c:576 ksys_write+0x127/0x250 fs/read_write.c:631 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The iMON driver improperly releases the usb_device reference in imon_disconnect without coordinating with active users of the device. Specifically, the fields usbdev_intf0 and usbdev_intf1 are not protected by the users counter (ictx->users). During probe, imon_init_intf0 or imon_init_intf1 increments the usb_device reference count depending on the interface. However, during disconnect, usb_put_dev is called unconditionally, regardless of actual usage. As a result, if vfd_write or other operations are still in progress after disconnect, this can lead to a use-after-free of the usb_device pointer. Thread 1 vfd_write Thread 2 imon_disconnect ... if usb_put_dev(ictx->usbdev_intf0) else usb_put_dev(ictx->usbdev_intf1) ... while send_packet if pipe = usb_sndintpipe( ictx->usbdev_intf0) UAF else pipe = usb_sndctrlpipe( ictx->usbdev_intf0, 0) UAF Guard access to usbdev_intf0 and usbdev_intf1 after disconnect by checking ictx->disconnected in all writer paths. Add early return with -ENODEV in send_packet(), vfd_write(), lcd_write() and display_open() if the device is no longer present. Set and read ictx->disconnected under ictx->lock to ensure memory synchronization. Acquire the lock in imon_disconnect() before setting the flag to synchronize with any ongoing operations. Ensure writers exit early and safely after disconnect before the USB core proceeds with cleanup. Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | bpftool | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-abi-stablelists | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-core | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-cross-headers | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-debug | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-debug-core | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-debug-devel | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-debug-modules | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-debug-modules-extra | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-devel | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-doc | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-headers | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-modules | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-modules-extra | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-rt | 0 | 4.18.0-553.92.1.rt7.433.el8_10 |
| AlmaLinux:8 | kernel-rt-core | 0 | 4.18.0-553.92.1.rt7.433.el8_10 |
| AlmaLinux:8 | kernel-rt-debug | 0 | 4.18.0-553.92.1.rt7.433.el8_10 |
| AlmaLinux:8 | kernel-rt-debug-core | 0 | 4.18.0-553.92.1.rt7.433.el8_10 |
| AlmaLinux:8 | kernel-rt-debug-devel | 0 | 4.18.0-553.92.1.rt7.433.el8_10 |
| AlmaLinux:8 | kernel-rt-debug-modules | 0 | 4.18.0-553.92.1.rt7.433.el8_10 |
| AlmaLinux:8 | kernel-rt-debug-modules-extra | 0 | 4.18.0-553.92.1.rt7.433.el8_10 |
| AlmaLinux:8 | kernel-rt-devel | 0 | 4.18.0-553.92.1.rt7.433.el8_10 |
| AlmaLinux:8 | kernel-rt-modules | 0 | 4.18.0-553.92.1.rt7.433.el8_10 |
| AlmaLinux:8 | kernel-rt-modules-extra | 0 | 4.18.0-553.92.1.rt7.433.el8_10 |
| AlmaLinux:8 | kernel-tools | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-tools-libs | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-tools-libs-devel | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-zfcpdump | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-zfcpdump-core | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-zfcpdump-devel | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-zfcpdump-modules | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | kernel-zfcpdump-modules-extra | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | perf | 0 | 4.18.0-553.92.1.el8_10 |
| AlmaLinux:8 | python3-perf | 0 | 4.18.0-553.92.1.el8_10 |
| Linux | Kernel | 2.6.35 | 5.4.301 |
| Linux | Kernel | 2.6.35 | 6.1.156 |
| Mageia:9 | kernel | 0 | 6.6.116-1.mga9 |
| Mageia:9 | kernel-linus | 0 | 6.6.116-1.mga9 |
| Mageia:9 | kmod-virtualbox | 0 | 7.1.14-13.mga9 |
| Mageia:9 | kmod-xtables-addons | 0 | 3.24-87.mga9 |
| SUSE:Linux Enterprise High Availability Extension 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise High Availability Extension 15 SP7 | kernel-default | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_17 | 0 | 1-150600.1.3.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_17 | 0 | 1-150600.13.5.1 |
| SUSE:Linux Enterprise Live Patching 15 SP7 | kernel-default | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Live Patching 15 SP7 | kernel-livepatch-SLE15-SP7_Update_6 | 0 | 1-150700.15.3.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-64kb | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-default-base | 0 | 6.4.0-150600.23.78.1.150600.12.34.2 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-source | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-zfcpdump | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | kernel-64kb | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | kernel-default | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | kernel-default-base | 0 | 6.4.0-150700.53.22.1.150700.17.15.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | kernel-source | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | kernel-zfcpdump | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-docs | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-obs-build | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-source | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-syms | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP7 | kernel-docs | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP7 | kernel-obs-build | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP7 | kernel-source | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP7 | kernel-syms | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Legacy 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Legacy 15 SP7 | kernel-default | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-azure | 0 | 6.4.0-150600.8.55.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-source-azure | 0 | 6.4.0-150600.8.55.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-syms-azure | 0 | 6.4.0-150600.8.55.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP7 | kernel-azure | 0 | 6.4.0-150700.20.18.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP7 | kernel-source-azure | 0 | 6.4.0-150700.20.18.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP7 | kernel-syms-azure | 0 | 6.4.0-150700.20.18.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP7 | kernel-default | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Real Time Module 15 SP6 | kernel-rt | 0 | 6.4.0-150600.10.58.1 |
| SUSE:Real Time Module 15 SP6 | kernel-rt_debug | 0 | 6.4.0-150600.10.58.1 |
| SUSE:Real Time Module 15 SP6 | kernel-source-rt | 0 | 6.4.0-150600.10.58.1 |
| SUSE:Real Time Module 15 SP6 | kernel-syms-rt | 0 | 6.4.0-150600.10.58.1 |
| openSUSE:Leap 15.6 | dtb-aarch64 | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-64kb | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-azure | 0 | 6.4.0-150600.8.55.1 |
| openSUSE:Leap 15.6 | kernel-debug | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-default | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-default-base | 0 | 6.4.0-150600.23.78.1.150600.12.34.2 |
| openSUSE:Leap 15.6 | kernel-docs | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-kvmsmall | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-obs-build | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-obs-qa | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-rt | 0 | 6.4.0-150600.10.58.1 |
| openSUSE:Leap 15.6 | kernel-rt_debug | 0 | 6.4.0-150600.10.58.1 |
| openSUSE:Leap 15.6 | kernel-source | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-source-azure | 0 | 6.4.0-150600.8.55.1 |
| openSUSE:Leap 15.6 | kernel-source-rt | 0 | 6.4.0-150600.10.58.1 |
| openSUSE:Leap 15.6 | kernel-syms | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-syms-azure | 0 | 6.4.0-150600.8.55.1 |
| openSUSE:Leap 15.6 | kernel-syms-rt | 0 | 6.4.0-150600.10.58.1 |
| openSUSE:Leap 15.6 | kernel-zfcpdump | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 16.0 | dtb-aarch64 | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-64kb | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-default | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-default-base | 0 | 6.12.0-160000.6.1.160000.2.4 |
| openSUSE:Leap 16.0 | kernel-docs | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-kvmsmall | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-obs-build | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-obs-qa | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-rt | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-source | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-syms | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-zfcpdump | 0 | 6.12.0-160000.7.1 |
| openSUSE:Tumbleweed | kernel-source | 0 | 6.17.5-1.1 |
| openSUSE:Tumbleweed | kernel-source-longterm | 0 | 6.18.16-1.1 |
Related vulnerabilities
- CVE-2025-68301 In the Linux kernel, the following vulnerability has been resolved: net: atlantic: fix… Also affects bpftool
- CVE-2025-68285 In the Linux kernel, the following vulnerability has been resolved: libceph: fix… Also affects bpftool
- CVE-2025-40277 In the Linux kernel, the following vulnerability has been resolved: drm/vmwgfx: Validate… Also affects bpftool
- CVE-2025-40248 In the Linux kernel, the following vulnerability has been resolved: vsock: Ignore… Also affects bpftool
- CVE-2025-40240 In the Linux kernel, the following vulnerability has been resolved: sctp: avoid NULL… Also affects bpftool
- CVE-2025-40154 In the Linux kernel, the following vulnerability has been resolved: ASoC: Intel… Also affects bpftool
- CVE-2025-40096 In the Linux kernel, the following vulnerability has been resolved: drm/sched: Fix… Also affects bpftool
- CVE-2025-39971 In the Linux kernel, the following vulnerability has been resolved: i40e: fix idx… Also affects bpftool