Date
July 10, 2025, 11:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.106012] ================================================================== [ 17.106752] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 17.107633] Read of size 1 at addr fff00000c63c5000 by task kunit_try_catch/213 [ 17.108131] [ 17.108244] CPU: 0 UID: 0 PID: 213 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 17.109139] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.109387] Hardware name: linux,dummy-virt (DT) [ 17.109759] Call trace: [ 17.109836] show_stack+0x20/0x38 (C) [ 17.110158] dump_stack_lvl+0x8c/0xd0 [ 17.110651] print_report+0x118/0x608 [ 17.110973] kasan_report+0xdc/0x128 [ 17.111069] __asan_report_load1_noabort+0x20/0x30 [ 17.111136] kmem_cache_rcu_uaf+0x388/0x468 [ 17.111183] kunit_try_run_case+0x170/0x3f0 [ 17.112799] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.113122] kthread+0x328/0x630 [ 17.113190] ret_from_fork+0x10/0x20 [ 17.113608] [ 17.113671] Allocated by task 213: [ 17.114241] kasan_save_stack+0x3c/0x68 [ 17.114636] kasan_save_track+0x20/0x40 [ 17.115289] kasan_save_alloc_info+0x40/0x58 [ 17.115757] __kasan_slab_alloc+0xa8/0xb0 [ 17.116487] kmem_cache_alloc_noprof+0x10c/0x398 [ 17.116586] kmem_cache_rcu_uaf+0x12c/0x468 [ 17.116744] kunit_try_run_case+0x170/0x3f0 [ 17.117062] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.117884] kthread+0x328/0x630 [ 17.117922] ret_from_fork+0x10/0x20 [ 17.120114] [ 17.120139] Freed by task 0: [ 17.120268] kasan_save_stack+0x3c/0x68 [ 17.120451] kasan_save_track+0x20/0x40 [ 17.120572] kasan_save_free_info+0x4c/0x78 [ 17.121346] __kasan_slab_free+0x6c/0x98 [ 17.121595] slab_free_after_rcu_debug+0xd4/0x2f8 [ 17.122215] rcu_core+0x9f4/0x1e20 [ 17.122398] rcu_core_si+0x18/0x30 [ 17.122571] handle_softirqs+0x374/0xb28 [ 17.122636] __do_softirq+0x1c/0x28 [ 17.122672] [ 17.122810] Last potentially related work creation: [ 17.123055] kasan_save_stack+0x3c/0x68 [ 17.123716] kasan_record_aux_stack+0xb4/0xc8 [ 17.123801] kmem_cache_free+0x120/0x468 [ 17.124004] kmem_cache_rcu_uaf+0x16c/0x468 [ 17.124507] kunit_try_run_case+0x170/0x3f0 [ 17.124843] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.125508] kthread+0x328/0x630 [ 17.125678] ret_from_fork+0x10/0x20 [ 17.125733] [ 17.126111] The buggy address belongs to the object at fff00000c63c5000 [ 17.126111] which belongs to the cache test_cache of size 200 [ 17.126451] The buggy address is located 0 bytes inside of [ 17.126451] freed 200-byte region [fff00000c63c5000, fff00000c63c50c8) [ 17.126822] [ 17.126848] The buggy address belongs to the physical page: [ 17.127305] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1063c5 [ 17.127375] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.127431] page_type: f5(slab) [ 17.127474] raw: 0bfffe0000000000 fff00000c5945640 dead000000000122 0000000000000000 [ 17.127525] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 17.129419] page dumped because: kasan: bad access detected [ 17.129620] [ 17.129765] Memory state around the buggy address: [ 17.129939] fff00000c63c4f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.129986] fff00000c63c4f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.130031] >fff00000c63c5000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.130823] ^ [ 17.131365] fff00000c63c5080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 17.131420] fff00000c63c5100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.131461] ==================================================================
[ 13.488643] ================================================================== [ 13.489877] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.490540] Read of size 1 at addr ffff888102d76000 by task kunit_try_catch/230 [ 13.491171] [ 13.491353] CPU: 1 UID: 0 PID: 230 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 13.491409] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.491421] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.491441] Call Trace: [ 13.491455] <TASK> [ 13.491474] dump_stack_lvl+0x73/0xb0 [ 13.491537] print_report+0xd1/0x650 [ 13.491561] ? __virt_addr_valid+0x1db/0x2d0 [ 13.491585] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.491607] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.491629] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.491652] kasan_report+0x141/0x180 [ 13.491673] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.491700] __asan_report_load1_noabort+0x18/0x20 [ 13.491724] kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.491747] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 13.491769] ? sysvec_apic_timer_interrupt+0x50/0x90 [ 13.491800] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 13.491827] kunit_try_run_case+0x1a5/0x480 [ 13.491852] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.491874] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.491899] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.491922] ? __kthread_parkme+0x82/0x180 [ 13.491943] ? preempt_count_sub+0x50/0x80 [ 13.491967] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.491991] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.492014] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.492039] kthread+0x337/0x6f0 [ 13.492069] ? trace_preempt_on+0x20/0xc0 [ 13.492093] ? __pfx_kthread+0x10/0x10 [ 13.492113] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.492147] ? calculate_sigpending+0x7b/0xa0 [ 13.492171] ? __pfx_kthread+0x10/0x10 [ 13.492209] ret_from_fork+0x116/0x1d0 [ 13.492229] ? __pfx_kthread+0x10/0x10 [ 13.492249] ret_from_fork_asm+0x1a/0x30 [ 13.492280] </TASK> [ 13.492290] [ 13.505300] Allocated by task 230: [ 13.505642] kasan_save_stack+0x45/0x70 [ 13.505995] kasan_save_track+0x18/0x40 [ 13.506332] kasan_save_alloc_info+0x3b/0x50 [ 13.506836] __kasan_slab_alloc+0x91/0xa0 [ 13.507209] kmem_cache_alloc_noprof+0x123/0x3f0 [ 13.507675] kmem_cache_rcu_uaf+0x155/0x510 [ 13.507818] kunit_try_run_case+0x1a5/0x480 [ 13.507959] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.508128] kthread+0x337/0x6f0 [ 13.508252] ret_from_fork+0x116/0x1d0 [ 13.508398] ret_from_fork_asm+0x1a/0x30 [ 13.508804] [ 13.508957] Freed by task 0: [ 13.509217] kasan_save_stack+0x45/0x70 [ 13.509644] kasan_save_track+0x18/0x40 [ 13.510051] kasan_save_free_info+0x3f/0x60 [ 13.510509] __kasan_slab_free+0x56/0x70 [ 13.510882] slab_free_after_rcu_debug+0xe4/0x310 [ 13.511397] rcu_core+0x66f/0x1c40 [ 13.511744] rcu_core_si+0x12/0x20 [ 13.512053] handle_softirqs+0x209/0x730 [ 13.512418] __irq_exit_rcu+0xc9/0x110 [ 13.512806] irq_exit_rcu+0x12/0x20 [ 13.512972] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.513593] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.514068] [ 13.514230] Last potentially related work creation: [ 13.514746] kasan_save_stack+0x45/0x70 [ 13.515178] kasan_record_aux_stack+0xb2/0xc0 [ 13.515644] kmem_cache_free+0x131/0x420 [ 13.516014] kmem_cache_rcu_uaf+0x194/0x510 [ 13.516303] kunit_try_run_case+0x1a5/0x480 [ 13.516728] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.517169] kthread+0x337/0x6f0 [ 13.517286] ret_from_fork+0x116/0x1d0 [ 13.517465] ret_from_fork_asm+0x1a/0x30 [ 13.517907] [ 13.518071] The buggy address belongs to the object at ffff888102d76000 [ 13.518071] which belongs to the cache test_cache of size 200 [ 13.519407] The buggy address is located 0 bytes inside of [ 13.519407] freed 200-byte region [ffff888102d76000, ffff888102d760c8) [ 13.519743] [ 13.519815] The buggy address belongs to the physical page: [ 13.519981] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102d76 [ 13.520217] flags: 0x200000000000000(node=0|zone=2) [ 13.520426] page_type: f5(slab) [ 13.520558] raw: 0200000000000000 ffff888100ff4c80 dead000000000122 0000000000000000 [ 13.520988] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 13.521779] page dumped because: kasan: bad access detected [ 13.522280] [ 13.522549] Memory state around the buggy address: [ 13.522971] ffff888102d75f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.523674] ffff888102d75f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.524158] >ffff888102d76000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 13.524467] ^ [ 13.524788] ffff888102d76080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 13.525822] ffff888102d76100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.526495] ==================================================================