Date
July 4, 2025, 11:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 30.946504] ================================================================== [ 30.946604] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 30.946683] Read of size 1 at addr fff00000c9b7b000 by task kunit_try_catch/246 [ 30.946737] [ 30.946783] CPU: 0 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4-next-20250704 #1 PREEMPT [ 30.946876] Tainted: [B]=BAD_PAGE, [N]=TEST [ 30.946919] Hardware name: linux,dummy-virt (DT) [ 30.946956] Call trace: [ 30.946981] show_stack+0x20/0x38 (C) [ 30.947036] dump_stack_lvl+0x8c/0xd0 [ 30.947089] print_report+0x118/0x608 [ 30.947137] kasan_report+0xdc/0x128 [ 30.947182] __asan_report_load1_noabort+0x20/0x30 [ 30.947231] kmem_cache_rcu_uaf+0x388/0x468 [ 30.947280] kunit_try_run_case+0x170/0x3f0 [ 30.947330] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.947384] kthread+0x328/0x630 [ 30.947428] ret_from_fork+0x10/0x20 [ 30.947477] [ 30.947494] Allocated by task 246: [ 30.947525] kasan_save_stack+0x3c/0x68 [ 30.947568] kasan_save_track+0x20/0x40 [ 30.947605] kasan_save_alloc_info+0x40/0x58 [ 30.947642] __kasan_slab_alloc+0xa8/0xb0 [ 30.947679] kmem_cache_alloc_noprof+0x10c/0x398 [ 30.947722] kmem_cache_rcu_uaf+0x12c/0x468 [ 30.947761] kunit_try_run_case+0x170/0x3f0 [ 30.947798] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.947842] kthread+0x328/0x630 [ 30.947875] ret_from_fork+0x10/0x20 [ 30.947978] [ 30.948006] Freed by task 0: [ 30.948038] kasan_save_stack+0x3c/0x68 [ 30.948092] kasan_save_track+0x20/0x40 [ 30.948131] kasan_save_free_info+0x4c/0x78 [ 30.948212] __kasan_slab_free+0x6c/0x98 [ 30.948255] slab_free_after_rcu_debug+0xd4/0x2f8 [ 30.948296] rcu_core+0x9f4/0x1e20 [ 30.948334] rcu_core_si+0x18/0x30 [ 30.948380] handle_softirqs+0x374/0xb28 [ 30.948417] __do_softirq+0x1c/0x28 [ 30.948452] [ 30.948471] Last potentially related work creation: [ 30.948499] kasan_save_stack+0x3c/0x68 [ 30.948539] kasan_record_aux_stack+0xb4/0xc8 [ 30.948575] kmem_cache_free+0x120/0x468 [ 30.948613] kmem_cache_rcu_uaf+0x16c/0x468 [ 30.948650] kunit_try_run_case+0x170/0x3f0 [ 30.948699] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.948744] kthread+0x328/0x630 [ 30.948775] ret_from_fork+0x10/0x20 [ 30.948816] [ 30.948834] The buggy address belongs to the object at fff00000c9b7b000 [ 30.948834] which belongs to the cache test_cache of size 200 [ 30.948905] The buggy address is located 0 bytes inside of [ 30.948905] freed 200-byte region [fff00000c9b7b000, fff00000c9b7b0c8) [ 30.948968] [ 30.949245] The buggy address belongs to the physical page: [ 30.949359] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109b7b [ 30.949723] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 30.949779] page_type: f5(slab) [ 30.949824] raw: 0bfffe0000000000 fff00000c45b3a00 dead000000000122 0000000000000000 [ 30.949877] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 30.949930] page dumped because: kasan: bad access detected [ 30.949963] [ 30.949983] Memory state around the buggy address: [ 30.950017] fff00000c9b7af00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.950061] fff00000c9b7af80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.950105] >fff00000c9b7b000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.950142] ^ [ 30.950171] fff00000c9b7b080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 30.950213] fff00000c9b7b100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.950251] ==================================================================
[ 25.788407] ================================================================== [ 25.789062] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 25.789968] Read of size 1 at addr ffff888105ab7000 by task kunit_try_catch/262 [ 25.790895] [ 25.791038] CPU: 0 UID: 0 PID: 262 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4-next-20250704 #1 PREEMPT(voluntary) [ 25.791230] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.791251] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 25.791281] Call Trace: [ 25.791425] <TASK> [ 25.791453] dump_stack_lvl+0x73/0xb0 [ 25.791496] print_report+0xd1/0x650 [ 25.791523] ? __virt_addr_valid+0x1db/0x2d0 [ 25.791553] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 25.791579] ? kasan_complete_mode_report_info+0x64/0x200 [ 25.791607] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 25.791633] kasan_report+0x141/0x180 [ 25.791657] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 25.791687] __asan_report_load1_noabort+0x18/0x20 [ 25.791713] kmem_cache_rcu_uaf+0x3e3/0x510 [ 25.791738] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 25.791762] ? finish_task_switch.isra.0+0x153/0x700 [ 25.791787] ? __switch_to+0x47/0xf50 [ 25.791821] ? __pfx_read_tsc+0x10/0x10 [ 25.791846] ? ktime_get_ts64+0x86/0x230 [ 25.791876] kunit_try_run_case+0x1a5/0x480 [ 25.791906] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.791932] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 25.791961] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 25.791987] ? __kthread_parkme+0x82/0x180 [ 25.792011] ? preempt_count_sub+0x50/0x80 [ 25.792037] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.792065] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.792091] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 25.792118] kthread+0x337/0x6f0 [ 25.792140] ? trace_preempt_on+0x20/0xc0 [ 25.792169] ? __pfx_kthread+0x10/0x10 [ 25.792192] ? _raw_spin_unlock_irq+0x47/0x80 [ 25.792216] ? calculate_sigpending+0x7b/0xa0 [ 25.792250] ? __pfx_kthread+0x10/0x10 [ 25.792273] ret_from_fork+0x116/0x1d0 [ 25.792295] ? __pfx_kthread+0x10/0x10 [ 25.792318] ret_from_fork_asm+0x1a/0x30 [ 25.792352] </TASK> [ 25.792368] [ 25.805239] Allocated by task 262: [ 25.805785] kasan_save_stack+0x45/0x70 [ 25.806127] kasan_save_track+0x18/0x40 [ 25.806273] kasan_save_alloc_info+0x3b/0x50 [ 25.806451] __kasan_slab_alloc+0x91/0xa0 [ 25.806648] kmem_cache_alloc_noprof+0x123/0x3f0 [ 25.806811] kmem_cache_rcu_uaf+0x155/0x510 [ 25.807126] kunit_try_run_case+0x1a5/0x480 [ 25.807468] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.807741] kthread+0x337/0x6f0 [ 25.807892] ret_from_fork+0x116/0x1d0 [ 25.808112] ret_from_fork_asm+0x1a/0x30 [ 25.808414] [ 25.808498] Freed by task 0: [ 25.808610] kasan_save_stack+0x45/0x70 [ 25.808772] kasan_save_track+0x18/0x40 [ 25.809089] kasan_save_free_info+0x3f/0x60 [ 25.809337] __kasan_slab_free+0x56/0x70 [ 25.809971] slab_free_after_rcu_debug+0xe4/0x310 [ 25.810715] rcu_core+0x66f/0x1c40 [ 25.810888] rcu_core_si+0x12/0x20 [ 25.811042] handle_softirqs+0x209/0x730 [ 25.811434] __irq_exit_rcu+0xc9/0x110 [ 25.811611] irq_exit_rcu+0x12/0x20 [ 25.811740] sysvec_apic_timer_interrupt+0x81/0x90 [ 25.811978] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 25.812325] [ 25.812445] Last potentially related work creation: [ 25.812673] kasan_save_stack+0x45/0x70 [ 25.812853] kasan_record_aux_stack+0xb2/0xc0 [ 25.813007] kmem_cache_free+0x131/0x420 [ 25.813149] kmem_cache_rcu_uaf+0x194/0x510 [ 25.813295] kunit_try_run_case+0x1a5/0x480 [ 25.813552] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.813731] kthread+0x337/0x6f0 [ 25.813916] ret_from_fork+0x116/0x1d0 [ 25.814111] ret_from_fork_asm+0x1a/0x30 [ 25.814424] [ 25.814799] The buggy address belongs to the object at ffff888105ab7000 [ 25.814799] which belongs to the cache test_cache of size 200 [ 25.815338] The buggy address is located 0 bytes inside of [ 25.815338] freed 200-byte region [ffff888105ab7000, ffff888105ab70c8) [ 25.816798] [ 25.817202] The buggy address belongs to the physical page: [ 25.818692] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105ab7 [ 25.820374] flags: 0x200000000000000(node=0|zone=2) [ 25.820740] page_type: f5(slab) [ 25.820896] raw: 0200000000000000 ffff888101d9e3c0 dead000000000122 0000000000000000 [ 25.821150] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 25.821407] page dumped because: kasan: bad access detected [ 25.821593] [ 25.821667] Memory state around the buggy address: [ 25.821834] ffff888105ab6f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.822065] ffff888105ab6f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.822294] >ffff888105ab7000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.824219] ^ [ 25.824785] ffff888105ab7080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 25.825939] ffff888105ab7100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.827018] ==================================================================