Date
July 5, 2025, 5:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.326261] ================================================================== [ 19.326359] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 19.326436] Read of size 1 at addr fff00000c7827000 by task kunit_try_catch/213 [ 19.326486] [ 19.326528] CPU: 1 UID: 0 PID: 213 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 19.326613] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.326639] Hardware name: linux,dummy-virt (DT) [ 19.326672] Call trace: [ 19.326697] show_stack+0x20/0x38 (C) [ 19.326759] dump_stack_lvl+0x8c/0xd0 [ 19.326811] print_report+0x118/0x608 [ 19.330359] kasan_report+0xdc/0x128 [ 19.330716] __asan_report_load1_noabort+0x20/0x30 [ 19.330994] kmem_cache_rcu_uaf+0x388/0x468 [ 19.331076] kunit_try_run_case+0x170/0x3f0 [ 19.332028] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.332449] kthread+0x328/0x630 [ 19.333143] ret_from_fork+0x10/0x20 [ 19.334027] [ 19.334415] Allocated by task 213: [ 19.334645] kasan_save_stack+0x3c/0x68 [ 19.335249] kasan_save_track+0x20/0x40 [ 19.335356] kasan_save_alloc_info+0x40/0x58 [ 19.335689] __kasan_slab_alloc+0xa8/0xb0 [ 19.336254] kmem_cache_alloc_noprof+0x10c/0x398 [ 19.336664] kmem_cache_rcu_uaf+0x12c/0x468 [ 19.336931] kunit_try_run_case+0x170/0x3f0 [ 19.337409] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.337809] kthread+0x328/0x630 [ 19.337857] ret_from_fork+0x10/0x20 [ 19.338499] [ 19.339063] Freed by task 12: [ 19.339249] kasan_save_stack+0x3c/0x68 [ 19.339409] kasan_save_track+0x20/0x40 [ 19.340021] kasan_save_free_info+0x4c/0x78 [ 19.340282] __kasan_slab_free+0x6c/0x98 [ 19.340484] slab_free_after_rcu_debug+0xd4/0x2f8 [ 19.341243] rcu_core+0x9f4/0x1e20 [ 19.341361] rcu_core_si+0x18/0x30 [ 19.341676] handle_softirqs+0x374/0xb28 [ 19.341766] __do_softirq+0x1c/0x28 [ 19.342194] [ 19.342818] Last potentially related work creation: [ 19.343127] kasan_save_stack+0x3c/0x68 [ 19.343244] kasan_record_aux_stack+0xb4/0xc8 [ 19.344104] kmem_cache_free+0x120/0x468 [ 19.344239] kmem_cache_rcu_uaf+0x16c/0x468 [ 19.345026] kunit_try_run_case+0x170/0x3f0 [ 19.345128] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.345173] kthread+0x328/0x630 [ 19.345205] ret_from_fork+0x10/0x20 [ 19.345939] [ 19.346131] The buggy address belongs to the object at fff00000c7827000 [ 19.346131] which belongs to the cache test_cache of size 200 [ 19.346611] The buggy address is located 0 bytes inside of [ 19.346611] freed 200-byte region [fff00000c7827000, fff00000c78270c8) [ 19.346710] [ 19.346980] The buggy address belongs to the physical page: [ 19.347394] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107827 [ 19.347464] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.347518] page_type: f5(slab) [ 19.347560] raw: 0bfffe0000000000 fff00000c5ca58c0 dead000000000122 0000000000000000 [ 19.347610] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 19.348258] page dumped because: kasan: bad access detected [ 19.348298] [ 19.348316] Memory state around the buggy address: [ 19.348613] fff00000c7826f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 19.348661] fff00000c7826f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 19.349055] >fff00000c7827000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.349325] ^ [ 19.349357] fff00000c7827080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 19.349824] fff00000c7827100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.349886] ==================================================================
[ 12.397578] ================================================================== [ 12.398157] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.398816] Read of size 1 at addr ffff8881031ba000 by task kunit_try_catch/231 [ 12.399129] [ 12.399545] CPU: 0 UID: 0 PID: 231 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 12.399598] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.399610] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.399732] Call Trace: [ 12.399751] <TASK> [ 12.399771] dump_stack_lvl+0x73/0xb0 [ 12.399804] print_report+0xd1/0x650 [ 12.399827] ? __virt_addr_valid+0x1db/0x2d0 [ 12.399851] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.399880] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.399901] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.399925] kasan_report+0x141/0x180 [ 12.399947] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.399973] __asan_report_load1_noabort+0x18/0x20 [ 12.399996] kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.400018] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 12.400040] ? finish_task_switch.isra.0+0x153/0x700 [ 12.400063] ? __switch_to+0x47/0xf50 [ 12.400092] ? __pfx_read_tsc+0x10/0x10 [ 12.400114] ? ktime_get_ts64+0x86/0x230 [ 12.400138] kunit_try_run_case+0x1a5/0x480 [ 12.400394] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.400416] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.400440] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.400476] ? __kthread_parkme+0x82/0x180 [ 12.400496] ? preempt_count_sub+0x50/0x80 [ 12.400519] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.400542] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.400565] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.400587] kthread+0x337/0x6f0 [ 12.400606] ? trace_preempt_on+0x20/0xc0 [ 12.400630] ? __pfx_kthread+0x10/0x10 [ 12.400650] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.400670] ? calculate_sigpending+0x7b/0xa0 [ 12.400695] ? __pfx_kthread+0x10/0x10 [ 12.400716] ret_from_fork+0x116/0x1d0 [ 12.400733] ? __pfx_kthread+0x10/0x10 [ 12.400753] ret_from_fork_asm+0x1a/0x30 [ 12.400784] </TASK> [ 12.400796] [ 12.408426] Allocated by task 231: [ 12.408632] kasan_save_stack+0x45/0x70 [ 12.409017] kasan_save_track+0x18/0x40 [ 12.409160] kasan_save_alloc_info+0x3b/0x50 [ 12.409308] __kasan_slab_alloc+0x91/0xa0 [ 12.409463] kmem_cache_alloc_noprof+0x123/0x3f0 [ 12.409806] kmem_cache_rcu_uaf+0x155/0x510 [ 12.410023] kunit_try_run_case+0x1a5/0x480 [ 12.410299] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.410593] kthread+0x337/0x6f0 [ 12.410829] ret_from_fork+0x116/0x1d0 [ 12.411004] ret_from_fork_asm+0x1a/0x30 [ 12.411162] [ 12.411376] Freed by task 0: [ 12.411531] kasan_save_stack+0x45/0x70 [ 12.411729] kasan_save_track+0x18/0x40 [ 12.411920] kasan_save_free_info+0x3f/0x60 [ 12.412067] __kasan_slab_free+0x56/0x70 [ 12.412219] slab_free_after_rcu_debug+0xe4/0x310 [ 12.412445] rcu_core+0x66f/0x1c40 [ 12.412639] rcu_core_si+0x12/0x20 [ 12.412999] handle_softirqs+0x209/0x730 [ 12.413184] __irq_exit_rcu+0xc9/0x110 [ 12.413390] irq_exit_rcu+0x12/0x20 [ 12.413531] sysvec_apic_timer_interrupt+0x81/0x90 [ 12.413696] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 12.413863] [ 12.413961] Last potentially related work creation: [ 12.414193] kasan_save_stack+0x45/0x70 [ 12.414446] kasan_record_aux_stack+0xb2/0xc0 [ 12.415303] kmem_cache_free+0x131/0x420 [ 12.415811] kmem_cache_rcu_uaf+0x194/0x510 [ 12.416537] kunit_try_run_case+0x1a5/0x480 [ 12.417116] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.417313] kthread+0x337/0x6f0 [ 12.417445] ret_from_fork+0x116/0x1d0 [ 12.418233] ret_from_fork_asm+0x1a/0x30 [ 12.418843] [ 12.419018] The buggy address belongs to the object at ffff8881031ba000 [ 12.419018] which belongs to the cache test_cache of size 200 [ 12.420590] The buggy address is located 0 bytes inside of [ 12.420590] freed 200-byte region [ffff8881031ba000, ffff8881031ba0c8) [ 12.421604] [ 12.421816] The buggy address belongs to the physical page: [ 12.422371] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1031ba [ 12.423000] flags: 0x200000000000000(node=0|zone=2) [ 12.423341] page_type: f5(slab) [ 12.423641] raw: 0200000000000000 ffff888100a553c0 dead000000000122 0000000000000000 [ 12.424160] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 12.424721] page dumped because: kasan: bad access detected [ 12.425060] [ 12.425158] Memory state around the buggy address: [ 12.425363] ffff8881031b9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.425842] ffff8881031b9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.426163] >ffff8881031ba000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 12.426758] ^ [ 12.427030] ffff8881031ba080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 12.427513] ffff8881031ba100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.427984] ==================================================================