Acknowledged
Created: Oct 16, 2025
Updated: Oct 17, 2025
Found In Version: 10.24.33.1
Severity: Standard
Applicable for: Wind River Linux LTS 24
Component/s: Kernel
In the Linux kernel, the following vulnerability has been resolved:[EOL][EOL]media: i2c: tc358743: Fix use-after-free bugs caused by orphan timer in probe[EOL][EOL]The state->timer is a cyclic timer that schedules work_i2c_poll and[EOL]delayed_work_enable_hotplug, while rearming itself. Using timer_delete()[EOL]fails to guarantee the timer isn't still running when destroyed, similarly[EOL]cancel_delayed_work() cannot ensure delayed_work_enable_hotplug has[EOL]terminated if already executing. During probe failure after timer[EOL]initialization, these may continue running as orphans and reference the[EOL]already-freed tc358743_state object through tc358743_irq_poll_timer.[EOL][EOL]The following is the trace captured by KASAN.[EOL][EOL]BUG: KASAN: slab-use-after-free in __run_timer_base.part.0+0x7d7/0x8c0[EOL]Write of size 8 at addr ffff88800ded83c8 by task swapper/1/0[EOL]...[EOL]Call Trace:[EOL] <IRQ>[EOL] dump_stack_lvl+0x55/0x70[EOL] print_report+0xcf/0x610[EOL] ? __pfx_sched_balance_find_src_group+0x10/0x10[EOL] ? __run_timer_base.part.0+0x7d7/0x8c0[EOL] kasan_report+0xb8/0xf0[EOL] ? __run_timer_base.part.0+0x7d7/0x8c0[EOL] __run_timer_base.part.0+0x7d7/0x8c0[EOL] ? rcu_sched_clock_irq+0xb06/0x27d0[EOL] ? __pfx___run_timer_base.part.0+0x10/0x10[EOL] ? try_to_wake_up+0xb15/0x1960[EOL] ? tmigr_update_events+0x280/0x740[EOL] ? _raw_spin_lock_irq+0x80/0xe0[EOL] ? __pfx__raw_spin_lock_irq+0x10/0x10[EOL] tmigr_handle_remote_up+0x603/0x7e0[EOL] ? __pfx_tmigr_handle_remote_up+0x10/0x10[EOL] ? sched_balance_trigger+0x98/0x9f0[EOL] ? sched_tick+0x221/0x5a0[EOL] ? _raw_spin_lock_irq+0x80/0xe0[EOL] ? __pfx__raw_spin_lock_irq+0x10/0x10[EOL] ? tick_nohz_handler+0x339/0x440[EOL] ? __pfx_tmigr_handle_remote_up+0x10/0x10[EOL] __walk_groups.isra.0+0x42/0x150[EOL] tmigr_handle_remote+0x1f4/0x2e0[EOL] ? __pfx_tmigr_handle_remote+0x10/0x10[EOL] ? ktime_get+0x60/0x140[EOL] ? lapic_next_event+0x11/0x20[EOL] ? clockevents_program_event+0x1d4/0x2a0[EOL] ? hrtimer_interrupt+0x322/0x780[EOL] handle_softirqs+0x16a/0x550[EOL] irq_exit_rcu+0xaf/0xe0[EOL] sysvec_apic_timer_interrupt+0x70/0x80[EOL] </IRQ>[EOL]...[EOL][EOL]Allocated by task 141:[EOL] kasan_save_stack+0x24/0x50[EOL] kasan_save_track+0x14/0x30[EOL] __kasan_kmalloc+0x7f/0x90[EOL] __kmalloc_node_track_caller_noprof+0x198/0x430[EOL] devm_kmalloc+0x7b/0x1e0[EOL] tc358743_probe+0xb7/0x610 i2c_device_probe+0x51d/0x880[EOL] really_probe+0x1ca/0x5c0[EOL] __driver_probe_device+0x248/0x310[EOL] driver_probe_device+0x44/0x120[EOL] __device_attach_driver+0x174/0x220[EOL] bus_for_each_drv+0x100/0x190[EOL] __device_attach+0x206/0x370[EOL] bus_probe_device+0x123/0x170[EOL] device_add+0xd25/0x1470[EOL] i2c_new_client_device+0x7a0/0xcd0[EOL] do_one_initcall+0x89/0x300[EOL] do_init_module+0x29d/0x7f0[EOL] load_module+0x4f48/0x69e0[EOL] init_module_from_file+0xe4/0x150[EOL] idempotent_init_module+0x320/0x670[EOL] __x64_sys_finit_module+0xbd/0x120[EOL] do_syscall_64+0xac/0x280[EOL] entry_SYSCALL_64_after_hwframe+0x77/0x7f[EOL][EOL]Freed by task 141:[EOL] kasan_save_stack+0x24/0x50[EOL] kasan_save_track+0x14/0x30[EOL] kasan_save_free_info+0x3a/0x60[EOL] __kasan_slab_free+0x3f/0x50[EOL] kfree+0x137/0x370[EOL] release_nodes+0xa4/0x100[EOL] devres_release_group+0x1b2/0x380[EOL] i2c_device_probe+0x694/0x880[EOL] really_probe+0x1ca/0x5c0[EOL] __driver_probe_device+0x248/0x310[EOL] driver_probe_device+0x44/0x120[EOL] __device_attach_driver+0x174/0x220[EOL] bus_for_each_drv+0x100/0x190[EOL] __device_attach+0x206/0x370[EOL] bus_probe_device+0x123/0x170[EOL] device_add+0xd25/0x1470[EOL] i2c_new_client_device+0x7a0/0xcd0[EOL] do_one_initcall+0x89/0x300[EOL] do_init_module+0x29d/0x7f0[EOL] load_module+0x4f48/0x69e0[EOL] init_module_from_file+0xe4/0x150[EOL] idempotent_init_module+0x320/0x670[EOL] __x64_sys_finit_module+0xbd/0x120[EOL] do_syscall_64+0xac/0x280[EOL] entry_SYSCALL_64_after_hwframe+0x77/0x7f[EOL]...[EOL][EOL]Replace timer_delete() with timer_delete_sync() and cancel_delayed_work()[EOL]with cancel_delayed_work_sync() to ensure proper termination of timer and[EOL]work items before resource cleanup.[EOL][EOL]This bug was initially identified through static analysis. For reproduction[EOL]and testing, I created a functional emulation of the tc358743 device via a[EOL]kernel module and introduced faults through the debugfs interface.