Date
July 18, 2025, 1:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 32.734691] ================================================================== [ 32.734792] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 32.734874] Read of size 1 at addr fff00000c3ff1000 by task kunit_try_catch/244 [ 32.734924] [ 32.734968] CPU: 0 UID: 0 PID: 244 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250718 #1 PREEMPT [ 32.735058] Tainted: [B]=BAD_PAGE, [N]=TEST [ 32.737531] Hardware name: linux,dummy-virt (DT) [ 32.738102] Call trace: [ 32.738343] show_stack+0x20/0x38 (C) [ 32.738748] dump_stack_lvl+0x8c/0xd0 [ 32.739459] print_report+0x118/0x5e8 [ 32.739908] kasan_report+0xdc/0x128 [ 32.740089] __asan_report_load1_noabort+0x20/0x30 [ 32.740520] kmem_cache_rcu_uaf+0x388/0x468 [ 32.741131] kunit_try_run_case+0x170/0x3f0 [ 32.741683] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.742092] kthread+0x328/0x630 [ 32.742686] ret_from_fork+0x10/0x20 [ 32.743125] [ 32.743150] Allocated by task 244: [ 32.744203] kasan_save_stack+0x3c/0x68 [ 32.744497] kasan_save_track+0x20/0x40 [ 32.744579] kasan_save_alloc_info+0x40/0x58 [ 32.744656] __kasan_slab_alloc+0xa8/0xb0 [ 32.744969] kmem_cache_alloc_noprof+0x10c/0x398 [ 32.745335] kmem_cache_rcu_uaf+0x12c/0x468 [ 32.745392] kunit_try_run_case+0x170/0x3f0 [ 32.745430] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.745472] kthread+0x328/0x630 [ 32.745508] ret_from_fork+0x10/0x20 [ 32.745542] [ 32.745567] Freed by task 0: [ 32.746044] kasan_save_stack+0x3c/0x68 [ 32.746375] kasan_save_track+0x20/0x40 [ 32.746422] kasan_save_free_info+0x4c/0x78 [ 32.746691] __kasan_slab_free+0x6c/0x98 [ 32.746858] slab_free_after_rcu_debug+0xd4/0x2f8 [ 32.746925] rcu_core+0x9f4/0x1e58 [ 32.746967] rcu_core_si+0x18/0x30 [ 32.747009] handle_softirqs+0x374/0xb28 [ 32.747048] __do_softirq+0x1c/0x28 [ 32.747434] [ 32.747543] Last potentially related work creation: [ 32.747573] kasan_save_stack+0x3c/0x68 [ 32.747615] kasan_record_aux_stack+0xb4/0xc8 [ 32.747653] kmem_cache_free+0x120/0x468 [ 32.747690] kmem_cache_rcu_uaf+0x16c/0x468 [ 32.747737] kunit_try_run_case+0x170/0x3f0 [ 32.748587] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.748751] kthread+0x328/0x630 [ 32.748800] ret_from_fork+0x10/0x20 [ 32.748838] [ 32.748857] The buggy address belongs to the object at fff00000c3ff1000 [ 32.748857] which belongs to the cache test_cache of size 200 [ 32.749469] The buggy address is located 0 bytes inside of [ 32.749469] freed 200-byte region [fff00000c3ff1000, fff00000c3ff10c8) [ 32.749758] [ 32.749783] The buggy address belongs to the physical page: [ 32.749820] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103ff1 [ 32.749879] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 32.749934] page_type: f5(slab) [ 32.749977] raw: 0bfffe0000000000 fff00000c4743780 dead000000000122 0000000000000000 [ 32.750032] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 32.750704] page dumped because: kasan: bad access detected [ 32.751000] [ 32.751020] Memory state around the buggy address: [ 32.751242] fff00000c3ff0f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 32.751378] fff00000c3ff0f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 32.751420] >fff00000c3ff1000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.751887] ^ [ 32.751925] fff00000c3ff1080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 32.751970] fff00000c3ff1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.752009] ==================================================================
[ 25.656023] ================================================================== [ 25.656542] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 25.656891] Read of size 1 at addr ffff888102b0c000 by task kunit_try_catch/261 [ 25.657565] [ 25.657692] CPU: 1 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250718 #1 PREEMPT(voluntary) [ 25.657745] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.657757] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 25.657779] Call Trace: [ 25.657815] <TASK> [ 25.657835] dump_stack_lvl+0x73/0xb0 [ 25.657870] print_report+0xd1/0x640 [ 25.657893] ? __virt_addr_valid+0x1db/0x2d0 [ 25.657919] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 25.657941] ? kasan_complete_mode_report_info+0x64/0x200 [ 25.657967] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 25.657989] kasan_report+0x141/0x180 [ 25.658011] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 25.658037] __asan_report_load1_noabort+0x18/0x20 [ 25.658060] kmem_cache_rcu_uaf+0x3e3/0x510 [ 25.658083] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 25.658104] ? finish_task_switch.isra.0+0x153/0x700 [ 25.658126] ? __switch_to+0x47/0xf80 [ 25.658156] ? __pfx_read_tsc+0x10/0x10 [ 25.658178] ? ktime_get_ts64+0x86/0x230 [ 25.658203] kunit_try_run_case+0x1a5/0x480 [ 25.658241] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.658263] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 25.658287] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 25.658310] ? __kthread_parkme+0x82/0x180 [ 25.658330] ? preempt_count_sub+0x50/0x80 [ 25.658352] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.658375] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.658398] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 25.658421] kthread+0x337/0x6f0 [ 25.658439] ? trace_preempt_on+0x20/0xc0 [ 25.658463] ? __pfx_kthread+0x10/0x10 [ 25.658483] ? _raw_spin_unlock_irq+0x47/0x80 [ 25.658504] ? calculate_sigpending+0x7b/0xa0 [ 25.658528] ? __pfx_kthread+0x10/0x10 [ 25.658548] ret_from_fork+0x116/0x1d0 [ 25.658567] ? __pfx_kthread+0x10/0x10 [ 25.658586] ret_from_fork_asm+0x1a/0x30 [ 25.658618] </TASK> [ 25.658633] [ 25.667674] Allocated by task 261: [ 25.667988] kasan_save_stack+0x45/0x70 [ 25.668165] kasan_save_track+0x18/0x40 [ 25.668354] kasan_save_alloc_info+0x3b/0x50 [ 25.668540] __kasan_slab_alloc+0x91/0xa0 [ 25.668717] kmem_cache_alloc_noprof+0x123/0x3f0 [ 25.668901] kmem_cache_rcu_uaf+0x155/0x510 [ 25.669091] kunit_try_run_case+0x1a5/0x480 [ 25.669297] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.669517] kthread+0x337/0x6f0 [ 25.669657] ret_from_fork+0x116/0x1d0 [ 25.669840] ret_from_fork_asm+0x1a/0x30 [ 25.669994] [ 25.670081] Freed by task 0: [ 25.670217] kasan_save_stack+0x45/0x70 [ 25.671115] kasan_save_track+0x18/0x40 [ 25.671278] kasan_save_free_info+0x3f/0x60 [ 25.671998] __kasan_slab_free+0x56/0x70 [ 25.672566] slab_free_after_rcu_debug+0xe4/0x310 [ 25.673271] rcu_core+0x66f/0x1c40 [ 25.673654] rcu_core_si+0x12/0x20 [ 25.673783] handle_softirqs+0x209/0x730 [ 25.674424] __irq_exit_rcu+0xc9/0x110 [ 25.675062] irq_exit_rcu+0x12/0x20 [ 25.675513] sysvec_apic_timer_interrupt+0x81/0x90 [ 25.675700] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 25.676283] [ 25.676451] Last potentially related work creation: [ 25.676897] kasan_save_stack+0x45/0x70 [ 25.677111] kasan_record_aux_stack+0xb2/0xc0 [ 25.677321] kmem_cache_free+0x131/0x420 [ 25.677497] kmem_cache_rcu_uaf+0x194/0x510 [ 25.677688] kunit_try_run_case+0x1a5/0x480 [ 25.677880] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.678114] kthread+0x337/0x6f0 [ 25.678274] ret_from_fork+0x116/0x1d0 [ 25.678450] ret_from_fork_asm+0x1a/0x30 [ 25.678631] [ 25.678701] The buggy address belongs to the object at ffff888102b0c000 [ 25.678701] which belongs to the cache test_cache of size 200 [ 25.679209] The buggy address is located 0 bytes inside of [ 25.679209] freed 200-byte region [ffff888102b0c000, ffff888102b0c0c8) [ 25.679873] [ 25.679949] The buggy address belongs to the physical page: [ 25.680199] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b0c [ 25.680581] flags: 0x200000000000000(node=0|zone=2) [ 25.680908] page_type: f5(slab) [ 25.681108] raw: 0200000000000000 ffff8881012b1780 dead000000000122 0000000000000000 [ 25.681442] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 25.681767] page dumped because: kasan: bad access detected [ 25.682211] [ 25.682296] Memory state around the buggy address: [ 25.682492] ffff888102b0bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.683048] ffff888102b0bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.683359] >ffff888102b0c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.683645] ^ [ 25.683905] ffff888102b0c080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 25.684213] ffff888102b0c100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.684545] ==================================================================