Date
July 17, 2025, 11:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.860458] ================================================================== [ 17.860558] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 17.860639] Read of size 1 at addr fff00000c65a6000 by task kunit_try_catch/213 [ 17.860690] [ 17.860735] CPU: 1 UID: 0 PID: 213 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 17.860818] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.860843] Hardware name: linux,dummy-virt (DT) [ 17.860908] Call trace: [ 17.860932] show_stack+0x20/0x38 (C) [ 17.860993] dump_stack_lvl+0x8c/0xd0 [ 17.861043] print_report+0x118/0x5d0 [ 17.861124] kasan_report+0xdc/0x128 [ 17.861169] __asan_report_load1_noabort+0x20/0x30 [ 17.861265] kmem_cache_rcu_uaf+0x388/0x468 [ 17.861340] kunit_try_run_case+0x170/0x3f0 [ 17.861393] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.861456] kthread+0x328/0x630 [ 17.861599] ret_from_fork+0x10/0x20 [ 17.861807] [ 17.861827] Allocated by task 213: [ 17.861889] kasan_save_stack+0x3c/0x68 [ 17.861940] kasan_save_track+0x20/0x40 [ 17.862139] kasan_save_alloc_info+0x40/0x58 [ 17.862182] __kasan_slab_alloc+0xa8/0xb0 [ 17.862331] kmem_cache_alloc_noprof+0x10c/0x398 [ 17.862434] kmem_cache_rcu_uaf+0x12c/0x468 [ 17.862474] kunit_try_run_case+0x170/0x3f0 [ 17.862512] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.862554] kthread+0x328/0x630 [ 17.862586] ret_from_fork+0x10/0x20 [ 17.862622] [ 17.862647] Freed by task 0: [ 17.862790] kasan_save_stack+0x3c/0x68 [ 17.862974] kasan_save_track+0x20/0x40 [ 17.863010] kasan_save_free_info+0x4c/0x78 [ 17.863169] __kasan_slab_free+0x6c/0x98 [ 17.863332] slab_free_after_rcu_debug+0xd4/0x2f8 [ 17.863416] rcu_core+0x9f4/0x1e20 [ 17.863516] rcu_core_si+0x18/0x30 [ 17.863680] handle_softirqs+0x374/0xb28 [ 17.863725] __do_softirq+0x1c/0x28 [ 17.863996] [ 17.864076] Last potentially related work creation: [ 17.864342] kasan_save_stack+0x3c/0x68 [ 17.864435] kasan_record_aux_stack+0xb4/0xc8 [ 17.864476] kmem_cache_free+0x120/0x468 [ 17.864558] kmem_cache_rcu_uaf+0x16c/0x468 [ 17.864711] kunit_try_run_case+0x170/0x3f0 [ 17.864808] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.864989] kthread+0x328/0x630 [ 17.865130] ret_from_fork+0x10/0x20 [ 17.865251] [ 17.865313] The buggy address belongs to the object at fff00000c65a6000 [ 17.865313] which belongs to the cache test_cache of size 200 [ 17.865424] The buggy address is located 0 bytes inside of [ 17.865424] freed 200-byte region [fff00000c65a6000, fff00000c65a60c8) [ 17.865626] [ 17.865711] The buggy address belongs to the physical page: [ 17.865744] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1065a6 [ 17.865803] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.866129] page_type: f5(slab) [ 17.866408] raw: 0bfffe0000000000 fff00000c3e568c0 dead000000000122 0000000000000000 [ 17.866540] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 17.866608] page dumped because: kasan: bad access detected [ 17.866640] [ 17.866657] Memory state around the buggy address: [ 17.866703] fff00000c65a5f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 17.866750] fff00000c65a5f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 17.866985] >fff00000c65a6000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.867190] ^ [ 17.867226] fff00000c65a6080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 17.867534] fff00000c65a6100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.867693] ==================================================================
[ 13.088015] ================================================================== [ 13.088595] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.088962] Read of size 1 at addr ffff8881026c1000 by task kunit_try_catch/230 [ 13.089428] [ 13.089551] CPU: 1 UID: 0 PID: 230 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 13.089599] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.089611] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.089633] Call Trace: [ 13.089646] <TASK> [ 13.089665] dump_stack_lvl+0x73/0xb0 [ 13.089697] print_report+0xd1/0x610 [ 13.089720] ? __virt_addr_valid+0x1db/0x2d0 [ 13.089744] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.089766] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.089789] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.089812] kasan_report+0x141/0x180 [ 13.089833] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.089898] __asan_report_load1_noabort+0x18/0x20 [ 13.089922] kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.089957] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 13.089979] ? finish_task_switch.isra.0+0x153/0x700 [ 13.090003] ? __switch_to+0x47/0xf50 [ 13.090034] ? __pfx_read_tsc+0x10/0x10 [ 13.090062] ? ktime_get_ts64+0x86/0x230 [ 13.090087] kunit_try_run_case+0x1a5/0x480 [ 13.090114] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.090135] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.090160] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.090182] ? __kthread_parkme+0x82/0x180 [ 13.090203] ? preempt_count_sub+0x50/0x80 [ 13.090230] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.090254] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.090277] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.090300] kthread+0x337/0x6f0 [ 13.090319] ? trace_preempt_on+0x20/0xc0 [ 13.090342] ? __pfx_kthread+0x10/0x10 [ 13.090361] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.090405] ? calculate_sigpending+0x7b/0xa0 [ 13.090430] ? __pfx_kthread+0x10/0x10 [ 13.090450] ret_from_fork+0x116/0x1d0 [ 13.090480] ? __pfx_kthread+0x10/0x10 [ 13.090499] ret_from_fork_asm+0x1a/0x30 [ 13.090552] </TASK> [ 13.090562] [ 13.099114] Allocated by task 230: [ 13.099255] kasan_save_stack+0x45/0x70 [ 13.099403] kasan_save_track+0x18/0x40 [ 13.099539] kasan_save_alloc_info+0x3b/0x50 [ 13.099749] __kasan_slab_alloc+0x91/0xa0 [ 13.099952] kmem_cache_alloc_noprof+0x123/0x3f0 [ 13.100305] kmem_cache_rcu_uaf+0x155/0x510 [ 13.100544] kunit_try_run_case+0x1a5/0x480 [ 13.100756] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.101180] kthread+0x337/0x6f0 [ 13.101345] ret_from_fork+0x116/0x1d0 [ 13.101524] ret_from_fork_asm+0x1a/0x30 [ 13.101958] [ 13.102067] Freed by task 0: [ 13.102187] kasan_save_stack+0x45/0x70 [ 13.102395] kasan_save_track+0x18/0x40 [ 13.102566] kasan_save_free_info+0x3f/0x60 [ 13.103695] __kasan_slab_free+0x56/0x70 [ 13.103869] slab_free_after_rcu_debug+0xe4/0x310 [ 13.104033] rcu_core+0x66f/0x1c40 [ 13.104173] rcu_core_si+0x12/0x20 [ 13.104297] handle_softirqs+0x209/0x730 [ 13.104437] __irq_exit_rcu+0xc9/0x110 [ 13.104569] irq_exit_rcu+0x12/0x20 [ 13.104695] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.104858] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.105028] [ 13.105111] Last potentially related work creation: [ 13.105267] kasan_save_stack+0x45/0x70 [ 13.105698] kasan_record_aux_stack+0xb2/0xc0 [ 13.105852] kmem_cache_free+0x131/0x420 [ 13.105989] kmem_cache_rcu_uaf+0x194/0x510 [ 13.106371] kunit_try_run_case+0x1a5/0x480 [ 13.106906] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.107372] kthread+0x337/0x6f0 [ 13.107680] ret_from_fork+0x116/0x1d0 [ 13.108191] ret_from_fork_asm+0x1a/0x30 [ 13.108610] [ 13.108869] The buggy address belongs to the object at ffff8881026c1000 [ 13.108869] which belongs to the cache test_cache of size 200 [ 13.110172] The buggy address is located 0 bytes inside of [ 13.110172] freed 200-byte region [ffff8881026c1000, ffff8881026c10c8) [ 13.111364] [ 13.111529] The buggy address belongs to the physical page: [ 13.112106] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1026c1 [ 13.113090] flags: 0x200000000000000(node=0|zone=2) [ 13.113618] page_type: f5(slab) [ 13.113934] raw: 0200000000000000 ffff8881010b4780 dead000000000122 0000000000000000 [ 13.114831] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 13.115690] page dumped because: kasan: bad access detected [ 13.116379] [ 13.116569] Memory state around the buggy address: [ 13.117162] ffff8881026c0f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.117858] ffff8881026c0f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.118486] >ffff8881026c1000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 13.119246] ^ [ 13.119494] ffff8881026c1080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 13.119798] ffff8881026c1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.120567] ==================================================================