Vulnerability · Published Oct 15, 2025 · Assigned by Linux
CVE-2025-39995media: i2c: tc358743: Fix use-after-free bugs caused by orphan timer in probe
Unrated
In plain English
A security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 14% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: media: i2c: tc358743: Fix use-after-free bugs caused by orphan timer in probe The state->timer is a cyclic timer that schedules work_i2c_poll and delayed_work_enable_hotplug, while rearming itself. Using timer_delete() fails to guarantee the timer isn't still running when destroyed, similarly cancel_delayed_work() cannot ensure delayed_work_enable_hotplug has terminated if already executing. During probe failure after timer initialization, these may continue running as orphans and reference the already-freed tc358743_state object through tc358743_irq_poll_timer. The following is the trace captured by KASAN. BUG: KASAN: slab-use-after-free in __run_timer_base.part.0+0x7d7/0x8c0 Write of size 8 at addr ffff88800ded83c8 by task swapper/1/0 ... Call Trace: <IRQ> dump_stack_lvl+0x55/0x70 print_report+0xcf/0x610 ? __pfx_sched_balance_find_src_group+0x10/0x10 ? __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 ? rcu_sched_clock_irq+0xb06/0x27d0 ? __pfx___run_timer_base.part.0+0x10/0x10 ? try_to_wake_up+0xb15/0x1960 ? tmigr_update_events+0x280/0x740 ? _raw_spin_lock_irq+0x80/0xe0 ? __pfx__raw_spin_lock_irq+0x10/0x10 tmigr_handle_remote_up+0x603/0x7e0 ? __pfx_tmigr_handle_remote_up+0x10/0x10 ? sched_balance_trigger+0x98/0x9f0 ? sched_tick+0x221/0x5a0 ? _raw_spin_lock_irq+0x80/0xe0 ? __pfx__raw_spin_lock_irq+0x10/0x10 ? tick_nohz_handler+0x339/0x440 ? __pfx_tmigr_handle_remote_up+0x10/0x10 __walk_groups.isra.0+0x42/0x150 tmigr_handle_remote+0x1f4/0x2e0 ? __pfx_tmigr_handle_remote+0x10/0x10 ? ktime_get+0x60/0x140 ? lapic_next_event+0x11/0x20 ? clockevents_program_event+0x1d4/0x2a0 ? hrtimer_interrupt+0x322/0x780 handle_softirqs+0x16a/0x550 irq_exit_rcu+0xaf/0xe0 sysvec_apic_timer_interrupt+0x70/0x80 </IRQ> ... Allocated by task 141: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 __kasan_kmalloc+0x7f/0x90 __kmalloc_node_track_caller_noprof+0x198/0x430 devm_kmalloc+0x7b/0x1e0 tc358743_probe+0xb7/0x610 i2c_device_probe+0x51d/0x880 really_probe+0x1ca/0x5c0 __driver_probe_device+0x248/0x310 driver_probe_device+0x44/0x120 __device_attach_driver+0x174/0x220 bus_for_each_drv+0x100/0x190 __device_attach+0x206/0x370 bus_probe_device+0x123/0x170 device_add+0xd25/0x1470 i2c_new_client_device+0x7a0/0xcd0 do_one_initcall+0x89/0x300 do_init_module+0x29d/0x7f0 load_module+0x4f48/0x69e0 init_module_from_file+0xe4/0x150 idempotent_init_module+0x320/0x670 __x64_sys_finit_module+0xbd/0x120 do_syscall_64+0xac/0x280 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 141: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3a/0x60 __kasan_slab_free+0x3f/0x50 kfree+0x137/0x370 release_nodes+0xa4/0x100 devres_release_group+0x1b2/0x380 i2c_device_probe+0x694/0x880 really_probe+0x1ca/0x5c0 __driver_probe_device+0x248/0x310 driver_probe_device+0x44/0x120 __device_attach_driver+0x174/0x220 bus_for_each_drv+0x100/0x190 __device_attach+0x206/0x370 bus_probe_device+0x123/0x170 device_add+0xd25/0x1470 i2c_new_client_device+0x7a0/0xcd0 do_one_initcall+0x89/0x300 do_init_module+0x29d/0x7f0 load_module+0x4f48/0x69e0 init_module_from_file+0xe4/0x150 idempotent_init_module+0x320/0x670 __x64_sys_finit_module+0xbd/0x120 do_syscall_64+0xac/0x280 entry_SYSCALL_64_after_hwframe+0x77/0x7f ... Replace timer_delete() with timer_delete_sync() and cancel_delayed_work() with cancel_delayed_work_sync() to ensure proper termination of timer and work items before resource cleanup. This bug was initially identified through static analysis. For reproduction and testing, I created a functional emulation of the tc358743 device via a kernel module and introduced faults through the debugfs interface.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.158-1 | DSA-6053-1 |
| Debian:12 | linux | 6.1.158-1 | DEBIAN-CVE-2025-39995 |
| Debian:13 | linux | 6.12.57-1 | DEBIAN-CVE-2025-39995 |
| Debian:14 | linux | 6.16.11-1 | DEBIAN-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux | 5.15.0-170.180 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux | 5.15.0-170.180 | USN-8033-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-106.106 | UBUNTU-CVE-2025-39995 |
| Ubuntu:25.10 | linux | 6.17.0-6.6 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1100.107 | USN-8033-1 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1100.107 | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1050.53 | UBUNTU-CVE-2025-39995 |
| Ubuntu:25.10 | linux-aws | 6.17.0-1003.3 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-aws-6.14 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1050.53~22.04.1 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1109.118 | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1051.57 | UBUNTU-CVE-2025-39995 |
| Ubuntu:25.10 | linux-azure | 6.17.0-1006.6 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-azure-6.14 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1051.57~22.04.1 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1109.118.1 | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-azure-fde | 6.8.0-1058.65 | UBUNTU-CVE-2025-39995 |
| Ubuntu:25.10 | linux-azure-fde | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-azure-fde-6.14 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.8 | 6.8.0-1058.65~22.04.1 | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-azure-nvidia-6.14 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1100.109 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1100.109 | USN-8033-1 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1052.55 | UBUNTU-CVE-2025-39995 |
| Ubuntu:25.10 | linux-gcp | 6.17.0-1003.3 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-gcp-6.14 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1052.55~22.04.1 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1096.102 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1096.102 | USN-8033-1 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1048.53 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1083.91 | USN-8033-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1083.91 | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1035.38 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-hwe-6.14 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-106.106~22.04.1 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1094.97 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1094.97 | USN-8033-1 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1049.49 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1049.49~22.04.1 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1095.101 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1095.101 | USN-8033-8 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1092.97 | USN-8033-5 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1092.97 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-170.180 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-170.180 | USN-8033-1 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-106.106.1 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-106.106.1~22.04.1 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1095.96 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1095.96 | USN-8033-6 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1049.52 | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1049.52~22.04.1 | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1049.52.1 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1052.52 | USN-8034-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1052.52 | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1020.20 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1041.41 | USN-8034-2 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1041.41 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-oem-6.14 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1097.103 | USN-8033-5 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1097.103 | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1047.48 | UBUNTU-CVE-2025-39995 |
| Ubuntu:25.10 | linux-oracle | 6.17.0-1003.3 | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-oracle-6.14 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1047.48~22.04.1 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1097.100 | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1050.54 | UBUNTU-CVE-2025-39995 |
| Ubuntu:25.10 | linux-raspi | 6.17.0-1004.4 | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:25.10 | linux-realtime | 6.17.0-1002.3 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:25.10 | linux-riscv | 6.17.0-6.6.1 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-riscv-6.14 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-106.106~22.04.1 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-39995 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1028.29 | UBUNTU-CVE-2025-39995 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1064.68 | USN-8033-7 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1064.68 | UBUNTU-CVE-2025-39995 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | d32d98642de66048f9534a05f3641558e811bbc9 – before 9205fb6e617a1c596d9a9ad2a160ee696e09d520d32d98642de66048f9534a05f3641558e811bbc9 – before 70913586c717dd25cfbade7a418e92cc9c99398ad32d98642de66048f9534a05f3641558e811bbc9 – before 663faf1179db9663a3793c75e9bc869358bad910d32d98642de66048f9534a05f3641558e811bbc9 – before 3d17701c156579969470e58b3a906511f8bc018dd32d98642de66048f9534a05f3641558e811bbc9 – before 228d06c4cbfc750f1216a3fd91b4693b0766d2f6d32d98642de66048f9534a05f3641558e811bbc9 – before f92181c0e13cad9671d07b15be695a97fc2534a3d32d98642de66048f9534a05f3641558e811bbc9 – before f3f3f00bcabbd2ce0a77a2ac7a6797b8646bfd8bd32d98642de66048f9534a05f3641558e811bbc9 – before 2610617effb4454d2f1c434c011ccb5cc7140711 |
| Linux | Linux | 4.3 |
References
- https://git.kernel.org/stable/c/9205fb6e617a1c596d9a9ad2a160ee696e09d520
- https://git.kernel.org/stable/c/70913586c717dd25cfbade7a418e92cc9c99398a
- https://git.kernel.org/stable/c/663faf1179db9663a3793c75e9bc869358bad910
- https://git.kernel.org/stable/c/3d17701c156579969470e58b3a906511f8bc018d
- https://git.kernel.org/stable/c/228d06c4cbfc750f1216a3fd91b4693b0766d2f6
- https://git.kernel.org/stable/c/f92181c0e13cad9671d07b15be695a97fc2534a3
- https://git.kernel.org/stable/c/f3f3f00bcabbd2ce0a77a2ac7a6797b8646bfd8b
- https://git.kernel.org/stable/c/2610617effb4454d2f1c434c011ccb5cc7140711
- https://git.kernel.org/stable/c/79d10f4f21a92e459b2276a77be62c59c1502c9d