Date
July 11, 2025, 11:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.935152] ================================================================== [ 17.935260] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 17.935351] Read of size 1 at addr fff00000c6f4d000 by task kunit_try_catch/214 [ 17.935405] [ 17.935450] CPU: 1 UID: 0 PID: 214 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 17.935537] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.935563] Hardware name: linux,dummy-virt (DT) [ 17.935597] Call trace: [ 17.935622] show_stack+0x20/0x38 (C) [ 17.935676] dump_stack_lvl+0x8c/0xd0 [ 17.935727] print_report+0x118/0x608 [ 17.935775] kasan_report+0xdc/0x128 [ 17.935819] __asan_report_load1_noabort+0x20/0x30 [ 17.935888] kmem_cache_rcu_uaf+0x388/0x468 [ 17.935935] kunit_try_run_case+0x170/0x3f0 [ 17.935985] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.936038] kthread+0x328/0x630 [ 17.936081] ret_from_fork+0x10/0x20 [ 17.936131] [ 17.936150] Allocated by task 214: [ 17.936180] kasan_save_stack+0x3c/0x68 [ 17.936220] kasan_save_track+0x20/0x40 [ 17.936259] kasan_save_alloc_info+0x40/0x58 [ 17.936298] __kasan_slab_alloc+0xa8/0xb0 [ 17.936336] kmem_cache_alloc_noprof+0x10c/0x398 [ 17.936377] kmem_cache_rcu_uaf+0x12c/0x468 [ 17.936414] kunit_try_run_case+0x170/0x3f0 [ 17.936451] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.936493] kthread+0x328/0x630 [ 17.936525] ret_from_fork+0x10/0x20 [ 17.936561] [ 17.936579] Freed by task 0: [ 17.936607] kasan_save_stack+0x3c/0x68 [ 17.936645] kasan_save_track+0x20/0x40 [ 17.936680] kasan_save_free_info+0x4c/0x78 [ 17.936719] __kasan_slab_free+0x6c/0x98 [ 17.936755] slab_free_after_rcu_debug+0xd4/0x2f8 [ 17.936794] rcu_core+0x9f4/0x1e20 [ 17.936830] rcu_core_si+0x18/0x30 [ 17.936874] handle_softirqs+0x374/0xb28 [ 17.936912] __do_softirq+0x1c/0x28 [ 17.936944] [ 17.936962] Last potentially related work creation: [ 17.936990] kasan_save_stack+0x3c/0x68 [ 17.937029] kasan_record_aux_stack+0xb4/0xc8 [ 17.937068] kmem_cache_free+0x120/0x468 [ 17.937106] kmem_cache_rcu_uaf+0x16c/0x468 [ 17.937143] kunit_try_run_case+0x170/0x3f0 [ 17.937179] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.937222] kthread+0x328/0x630 [ 17.937253] ret_from_fork+0x10/0x20 [ 17.937289] [ 17.937308] The buggy address belongs to the object at fff00000c6f4d000 [ 17.937308] which belongs to the cache test_cache of size 200 [ 17.937365] The buggy address is located 0 bytes inside of [ 17.937365] freed 200-byte region [fff00000c6f4d000, fff00000c6f4d0c8) [ 17.937427] [ 17.937447] The buggy address belongs to the physical page: [ 17.937481] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106f4d [ 17.937538] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.937591] page_type: f5(slab) [ 17.937632] raw: 0bfffe0000000000 fff00000c6f4f000 dead000000000122 0000000000000000 [ 17.937684] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 17.937726] page dumped because: kasan: bad access detected [ 17.937757] [ 17.937774] Memory state around the buggy address: [ 17.937808] fff00000c6f4cf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 17.937861] fff00000c6f4cf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 17.937904] >fff00000c6f4d000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.937943] ^ [ 17.937969] fff00000c6f4d080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 17.938012] fff00000c6f4d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.938049] ==================================================================
[ 13.156320] ================================================================== [ 13.156799] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.157246] Read of size 1 at addr ffff888102a0e000 by task kunit_try_catch/230 [ 13.157520] [ 13.157636] CPU: 1 UID: 0 PID: 230 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 13.157682] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.157693] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.157714] Call Trace: [ 13.157728] <TASK> [ 13.157747] dump_stack_lvl+0x73/0xb0 [ 13.157779] print_report+0xd1/0x650 [ 13.157802] ? __virt_addr_valid+0x1db/0x2d0 [ 13.157852] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.157875] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.157898] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.157931] kasan_report+0x141/0x180 [ 13.157953] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.157981] __asan_report_load1_noabort+0x18/0x20 [ 13.158006] kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.158030] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 13.158052] ? finish_task_switch.isra.0+0x153/0x700 [ 13.158076] ? __switch_to+0x47/0xf50 [ 13.158123] ? __pfx_read_tsc+0x10/0x10 [ 13.158144] ? ktime_get_ts64+0x86/0x230 [ 13.158169] kunit_try_run_case+0x1a5/0x480 [ 13.158195] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.158217] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.158242] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.158265] ? __kthread_parkme+0x82/0x180 [ 13.158286] ? preempt_count_sub+0x50/0x80 [ 13.158309] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.158333] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.158357] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.158382] kthread+0x337/0x6f0 [ 13.158400] ? trace_preempt_on+0x20/0xc0 [ 13.158424] ? __pfx_kthread+0x10/0x10 [ 13.158445] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.158466] ? calculate_sigpending+0x7b/0xa0 [ 13.158490] ? __pfx_kthread+0x10/0x10 [ 13.158515] ret_from_fork+0x116/0x1d0 [ 13.158533] ? __pfx_kthread+0x10/0x10 [ 13.158553] ret_from_fork_asm+0x1a/0x30 [ 13.158586] </TASK> [ 13.158595] [ 13.168587] Allocated by task 230: [ 13.168759] kasan_save_stack+0x45/0x70 [ 13.168962] kasan_save_track+0x18/0x40 [ 13.169142] kasan_save_alloc_info+0x3b/0x50 [ 13.169339] __kasan_slab_alloc+0x91/0xa0 [ 13.169525] kmem_cache_alloc_noprof+0x123/0x3f0 [ 13.169729] kmem_cache_rcu_uaf+0x155/0x510 [ 13.170740] kunit_try_run_case+0x1a5/0x480 [ 13.171221] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.171529] kthread+0x337/0x6f0 [ 13.171949] ret_from_fork+0x116/0x1d0 [ 13.172239] ret_from_fork_asm+0x1a/0x30 [ 13.172436] [ 13.172528] Freed by task 0: [ 13.172665] kasan_save_stack+0x45/0x70 [ 13.173198] kasan_save_track+0x18/0x40 [ 13.173482] kasan_save_free_info+0x3f/0x60 [ 13.173792] __kasan_slab_free+0x56/0x70 [ 13.174219] slab_free_after_rcu_debug+0xe4/0x310 [ 13.174446] rcu_core+0x66f/0x1c40 [ 13.174621] rcu_core_si+0x12/0x20 [ 13.175276] handle_softirqs+0x209/0x730 [ 13.175555] __irq_exit_rcu+0xc9/0x110 [ 13.175915] irq_exit_rcu+0x12/0x20 [ 13.176383] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.176679] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.177133] [ 13.177232] Last potentially related work creation: [ 13.177440] kasan_save_stack+0x45/0x70 [ 13.177623] kasan_record_aux_stack+0xb2/0xc0 [ 13.178421] kmem_cache_free+0x131/0x420 [ 13.178705] kmem_cache_rcu_uaf+0x194/0x510 [ 13.179239] kunit_try_run_case+0x1a5/0x480 [ 13.179452] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.179698] kthread+0x337/0x6f0 [ 13.180135] ret_from_fork+0x116/0x1d0 [ 13.180458] ret_from_fork_asm+0x1a/0x30 [ 13.180908] [ 13.181026] The buggy address belongs to the object at ffff888102a0e000 [ 13.181026] which belongs to the cache test_cache of size 200 [ 13.181777] The buggy address is located 0 bytes inside of [ 13.181777] freed 200-byte region [ffff888102a0e000, ffff888102a0e0c8) [ 13.182551] [ 13.182790] The buggy address belongs to the physical page: [ 13.183197] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a0e [ 13.183784] flags: 0x200000000000000(node=0|zone=2) [ 13.184094] page_type: f5(slab) [ 13.184299] raw: 0200000000000000 ffff888101c02c80 dead000000000122 0000000000000000 [ 13.184597] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 13.184942] page dumped because: kasan: bad access detected [ 13.185217] [ 13.185318] Memory state around the buggy address: [ 13.185520] ffff888102a0df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.185770] ffff888102a0df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.186285] >ffff888102a0e000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 13.186564] ^ [ 13.186729] ffff888102a0e080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 13.187144] ffff888102a0e100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.187413] ==================================================================