Date
July 16, 2025, 3:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.583176] ================================================================== [ 17.583287] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 17.583373] Read of size 1 at addr fff00000c594f000 by task kunit_try_catch/213 [ 17.583428] [ 17.583475] CPU: 0 UID: 0 PID: 213 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 17.583565] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.583591] Hardware name: linux,dummy-virt (DT) [ 17.585327] Call trace: [ 17.585654] show_stack+0x20/0x38 (C) [ 17.586076] dump_stack_lvl+0x8c/0xd0 [ 17.586133] print_report+0x118/0x5d0 [ 17.586180] kasan_report+0xdc/0x128 [ 17.586225] __asan_report_load1_noabort+0x20/0x30 [ 17.586278] kmem_cache_rcu_uaf+0x388/0x468 [ 17.586324] kunit_try_run_case+0x170/0x3f0 [ 17.586375] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.588411] kthread+0x328/0x630 [ 17.588951] ret_from_fork+0x10/0x20 [ 17.589424] [ 17.589442] Allocated by task 213: [ 17.589477] kasan_save_stack+0x3c/0x68 [ 17.590317] kasan_save_track+0x20/0x40 [ 17.590492] kasan_save_alloc_info+0x40/0x58 [ 17.590535] __kasan_slab_alloc+0xa8/0xb0 [ 17.591000] kmem_cache_alloc_noprof+0x10c/0x398 [ 17.591753] kmem_cache_rcu_uaf+0x12c/0x468 [ 17.592204] kunit_try_run_case+0x170/0x3f0 [ 17.592378] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.592462] kthread+0x328/0x630 [ 17.592912] ret_from_fork+0x10/0x20 [ 17.593487] [ 17.593510] Freed by task 0: [ 17.593641] kasan_save_stack+0x3c/0x68 [ 17.593871] kasan_save_track+0x20/0x40 [ 17.593967] kasan_save_free_info+0x4c/0x78 [ 17.594724] __kasan_slab_free+0x6c/0x98 [ 17.594848] slab_free_after_rcu_debug+0xd4/0x2f8 [ 17.594985] rcu_core+0x9f4/0x1e20 [ 17.595464] rcu_core_si+0x18/0x30 [ 17.595743] handle_softirqs+0x374/0xb28 [ 17.595794] __do_softirq+0x1c/0x28 [ 17.595831] [ 17.596271] Last potentially related work creation: [ 17.596860] kasan_save_stack+0x3c/0x68 [ 17.597336] kasan_record_aux_stack+0xb4/0xc8 [ 17.597377] kmem_cache_free+0x120/0x468 [ 17.597415] kmem_cache_rcu_uaf+0x16c/0x468 [ 17.597453] kunit_try_run_case+0x170/0x3f0 [ 17.597491] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.597534] kthread+0x328/0x630 [ 17.597565] ret_from_fork+0x10/0x20 [ 17.598479] [ 17.598502] The buggy address belongs to the object at fff00000c594f000 [ 17.598502] which belongs to the cache test_cache of size 200 [ 17.599316] The buggy address is located 0 bytes inside of [ 17.599316] freed 200-byte region [fff00000c594f000, fff00000c594f0c8) [ 17.599671] [ 17.600159] The buggy address belongs to the physical page: [ 17.600201] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10594f [ 17.600371] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.600642] page_type: f5(slab) [ 17.600690] raw: 0bfffe0000000000 fff00000c782d000 dead000000000122 0000000000000000 [ 17.601650] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 17.602099] page dumped because: kasan: bad access detected [ 17.602141] [ 17.602276] Memory state around the buggy address: [ 17.602394] fff00000c594ef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.602441] fff00000c594ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.602760] >fff00000c594f000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.602923] ^ [ 17.603263] fff00000c594f080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 17.603310] fff00000c594f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.603357] ==================================================================
[ 13.349152] ================================================================== [ 13.349688] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.350313] Read of size 1 at addr ffff888103078000 by task kunit_try_catch/230 [ 13.350625] [ 13.350765] CPU: 0 UID: 0 PID: 230 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 13.350813] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.350825] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.350846] Call Trace: [ 13.350858] <TASK> [ 13.350877] dump_stack_lvl+0x73/0xb0 [ 13.350910] print_report+0xd1/0x610 [ 13.350934] ? __virt_addr_valid+0x1db/0x2d0 [ 13.350960] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.350982] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.351006] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.351029] kasan_report+0x141/0x180 [ 13.351051] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.351078] __asan_report_load1_noabort+0x18/0x20 [ 13.351103] kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.351126] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 13.351149] ? finish_task_switch.isra.0+0x153/0x700 [ 13.351178] ? __switch_to+0x47/0xf50 [ 13.351269] ? __pfx_read_tsc+0x10/0x10 [ 13.351292] ? ktime_get_ts64+0x86/0x230 [ 13.351317] kunit_try_run_case+0x1a5/0x480 [ 13.351344] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.351367] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.351393] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.351417] ? __kthread_parkme+0x82/0x180 [ 13.351438] ? preempt_count_sub+0x50/0x80 [ 13.351475] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.351499] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.351524] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.351549] kthread+0x337/0x6f0 [ 13.351568] ? trace_preempt_on+0x20/0xc0 [ 13.351592] ? __pfx_kthread+0x10/0x10 [ 13.351613] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.351634] ? calculate_sigpending+0x7b/0xa0 [ 13.351659] ? __pfx_kthread+0x10/0x10 [ 13.351680] ret_from_fork+0x116/0x1d0 [ 13.351699] ? __pfx_kthread+0x10/0x10 [ 13.351720] ret_from_fork_asm+0x1a/0x30 [ 13.352163] </TASK> [ 13.352178] [ 13.361017] Allocated by task 230: [ 13.361238] kasan_save_stack+0x45/0x70 [ 13.361465] kasan_save_track+0x18/0x40 [ 13.361623] kasan_save_alloc_info+0x3b/0x50 [ 13.361784] __kasan_slab_alloc+0x91/0xa0 [ 13.361959] kmem_cache_alloc_noprof+0x123/0x3f0 [ 13.362779] kmem_cache_rcu_uaf+0x155/0x510 [ 13.362989] kunit_try_run_case+0x1a5/0x480 [ 13.363187] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.363423] kthread+0x337/0x6f0 [ 13.363581] ret_from_fork+0x116/0x1d0 [ 13.363766] ret_from_fork_asm+0x1a/0x30 [ 13.363951] [ 13.364043] Freed by task 0: [ 13.364191] kasan_save_stack+0x45/0x70 [ 13.364371] kasan_save_track+0x18/0x40 [ 13.364546] kasan_save_free_info+0x3f/0x60 [ 13.364735] __kasan_slab_free+0x56/0x70 [ 13.365468] slab_free_after_rcu_debug+0xe4/0x310 [ 13.365644] rcu_core+0x66f/0x1c40 [ 13.365784] rcu_core_si+0x12/0x20 [ 13.365954] handle_softirqs+0x209/0x730 [ 13.366367] __irq_exit_rcu+0xc9/0x110 [ 13.366620] irq_exit_rcu+0x12/0x20 [ 13.366849] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.367234] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.367510] [ 13.367610] Last potentially related work creation: [ 13.367846] kasan_save_stack+0x45/0x70 [ 13.368464] kasan_record_aux_stack+0xb2/0xc0 [ 13.368743] kmem_cache_free+0x131/0x420 [ 13.369072] kmem_cache_rcu_uaf+0x194/0x510 [ 13.369319] kunit_try_run_case+0x1a5/0x480 [ 13.369530] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.369872] kthread+0x337/0x6f0 [ 13.370111] ret_from_fork+0x116/0x1d0 [ 13.370390] ret_from_fork_asm+0x1a/0x30 [ 13.370567] [ 13.370774] The buggy address belongs to the object at ffff888103078000 [ 13.370774] which belongs to the cache test_cache of size 200 [ 13.371482] The buggy address is located 0 bytes inside of [ 13.371482] freed 200-byte region [ffff888103078000, ffff8881030780c8) [ 13.372193] [ 13.372321] The buggy address belongs to the physical page: [ 13.372553] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103078 [ 13.373123] flags: 0x200000000000000(node=0|zone=2) [ 13.373330] page_type: f5(slab) [ 13.373578] raw: 0200000000000000 ffff888103074140 dead000000000122 0000000000000000 [ 13.373884] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 13.374414] page dumped because: kasan: bad access detected [ 13.374719] [ 13.374823] Memory state around the buggy address: [ 13.375221] ffff888103077f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.375600] ffff888103077f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.375907] >ffff888103078000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 13.376447] ^ [ 13.376655] ffff888103078080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 13.377084] ffff888103078100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.377434] ==================================================================