Date
July 2, 2025, 11:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.369120] ================================================================== [ 19.369223] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 19.369297] Read of size 1 at addr fff00000c589b000 by task kunit_try_catch/213 [ 19.369350] [ 19.369390] CPU: 1 UID: 0 PID: 213 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 19.369474] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.369502] Hardware name: linux,dummy-virt (DT) [ 19.369537] Call trace: [ 19.369560] show_stack+0x20/0x38 (C) [ 19.369636] dump_stack_lvl+0x8c/0xd0 [ 19.369683] print_report+0x118/0x608 [ 19.369731] kasan_report+0xdc/0x128 [ 19.369776] __asan_report_load1_noabort+0x20/0x30 [ 19.369827] kmem_cache_rcu_uaf+0x388/0x468 [ 19.369874] kunit_try_run_case+0x170/0x3f0 [ 19.369921] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.369975] kthread+0x328/0x630 [ 19.370017] ret_from_fork+0x10/0x20 [ 19.370066] [ 19.370085] Allocated by task 213: [ 19.370116] kasan_save_stack+0x3c/0x68 [ 19.370157] kasan_save_track+0x20/0x40 [ 19.370194] kasan_save_alloc_info+0x40/0x58 [ 19.370235] __kasan_slab_alloc+0xa8/0xb0 [ 19.370272] kmem_cache_alloc_noprof+0x10c/0x398 [ 19.370313] kmem_cache_rcu_uaf+0x12c/0x468 [ 19.370350] kunit_try_run_case+0x170/0x3f0 [ 19.370387] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.370430] kthread+0x328/0x630 [ 19.370463] ret_from_fork+0x10/0x20 [ 19.370497] [ 19.370517] Freed by task 0: [ 19.370545] kasan_save_stack+0x3c/0x68 [ 19.370593] kasan_save_track+0x20/0x40 [ 19.370630] kasan_save_free_info+0x4c/0x78 [ 19.370669] __kasan_slab_free+0x6c/0x98 [ 19.370704] slab_free_after_rcu_debug+0xd4/0x2f8 [ 19.370744] rcu_core+0x9f4/0x1e20 [ 19.370781] rcu_core_si+0x18/0x30 [ 19.370816] handle_softirqs+0x374/0xb28 [ 19.370858] __do_softirq+0x1c/0x28 [ 19.370890] [ 19.370909] Last potentially related work creation: [ 19.370935] kasan_save_stack+0x3c/0x68 [ 19.370972] kasan_record_aux_stack+0xb4/0xc8 [ 19.371012] kmem_cache_free+0x120/0x468 [ 19.371049] kmem_cache_rcu_uaf+0x16c/0x468 [ 19.371086] kunit_try_run_case+0x170/0x3f0 [ 19.371123] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.371166] kthread+0x328/0x630 [ 19.371197] ret_from_fork+0x10/0x20 [ 19.371233] [ 19.371252] The buggy address belongs to the object at fff00000c589b000 [ 19.371252] which belongs to the cache test_cache of size 200 [ 19.371310] The buggy address is located 0 bytes inside of [ 19.371310] freed 200-byte region [fff00000c589b000, fff00000c589b0c8) [ 19.371371] [ 19.371394] The buggy address belongs to the physical page: [ 19.371425] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10589b [ 19.371483] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.371535] page_type: f5(slab) [ 19.371586] raw: 0bfffe0000000000 fff00000c3de5b40 dead000000000122 0000000000000000 [ 19.371636] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 19.371677] page dumped because: kasan: bad access detected [ 19.371708] [ 19.371725] Memory state around the buggy address: [ 19.371758] fff00000c589af00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 19.371803] fff00000c589af80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 19.371847] >fff00000c589b000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.371887] ^ [ 19.371915] fff00000c589b080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 19.371958] fff00000c589b100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.371997] ==================================================================
[ 12.188880] ================================================================== [ 12.189388] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.189831] Read of size 1 at addr ffff88810311d000 by task kunit_try_catch/232 [ 12.190701] [ 12.190857] CPU: 0 UID: 0 PID: 232 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 12.190906] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.190918] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.190939] Call Trace: [ 12.191147] <TASK> [ 12.191176] dump_stack_lvl+0x73/0xb0 [ 12.191213] print_report+0xd1/0x650 [ 12.191237] ? __virt_addr_valid+0x1db/0x2d0 [ 12.191262] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.191284] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.191305] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.191327] kasan_report+0x141/0x180 [ 12.191348] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.191386] __asan_report_load1_noabort+0x18/0x20 [ 12.191411] kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.191433] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 12.191455] ? finish_task_switch.isra.0+0x153/0x700 [ 12.191478] ? __switch_to+0x47/0xf50 [ 12.191506] ? __pfx_read_tsc+0x10/0x10 [ 12.191528] ? ktime_get_ts64+0x86/0x230 [ 12.191552] kunit_try_run_case+0x1a5/0x480 [ 12.191734] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.191763] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.192020] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.192043] ? __kthread_parkme+0x82/0x180 [ 12.192066] ? preempt_count_sub+0x50/0x80 [ 12.192089] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.192112] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.192134] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.192156] kthread+0x337/0x6f0 [ 12.192176] ? trace_preempt_on+0x20/0xc0 [ 12.192201] ? __pfx_kthread+0x10/0x10 [ 12.192222] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.192242] ? calculate_sigpending+0x7b/0xa0 [ 12.192266] ? __pfx_kthread+0x10/0x10 [ 12.192287] ret_from_fork+0x116/0x1d0 [ 12.192304] ? __pfx_kthread+0x10/0x10 [ 12.192324] ret_from_fork_asm+0x1a/0x30 [ 12.192355] </TASK> [ 12.192381] [ 12.203040] Allocated by task 232: [ 12.203198] kasan_save_stack+0x45/0x70 [ 12.203583] kasan_save_track+0x18/0x40 [ 12.203930] kasan_save_alloc_info+0x3b/0x50 [ 12.204357] __kasan_slab_alloc+0x91/0xa0 [ 12.204790] kmem_cache_alloc_noprof+0x123/0x3f0 [ 12.204971] kmem_cache_rcu_uaf+0x155/0x510 [ 12.205316] kunit_try_run_case+0x1a5/0x480 [ 12.205599] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.206014] kthread+0x337/0x6f0 [ 12.206280] ret_from_fork+0x116/0x1d0 [ 12.206436] ret_from_fork_asm+0x1a/0x30 [ 12.206752] [ 12.207094] Freed by task 0: [ 12.207222] kasan_save_stack+0x45/0x70 [ 12.207423] kasan_save_track+0x18/0x40 [ 12.207615] kasan_save_free_info+0x3f/0x60 [ 12.208228] __kasan_slab_free+0x56/0x70 [ 12.208395] slab_free_after_rcu_debug+0xe4/0x310 [ 12.208816] rcu_core+0x66f/0x1c40 [ 12.209142] rcu_core_si+0x12/0x20 [ 12.209450] handle_softirqs+0x209/0x730 [ 12.209725] __irq_exit_rcu+0xc9/0x110 [ 12.210043] irq_exit_rcu+0x12/0x20 [ 12.210301] sysvec_apic_timer_interrupt+0x81/0x90 [ 12.210528] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 12.211130] [ 12.211209] Last potentially related work creation: [ 12.211721] kasan_save_stack+0x45/0x70 [ 12.211918] kasan_record_aux_stack+0xb2/0xc0 [ 12.212076] kmem_cache_free+0x131/0x420 [ 12.212283] kmem_cache_rcu_uaf+0x194/0x510 [ 12.212499] kunit_try_run_case+0x1a5/0x480 [ 12.213142] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.213378] kthread+0x337/0x6f0 [ 12.213777] ret_from_fork+0x116/0x1d0 [ 12.214176] ret_from_fork_asm+0x1a/0x30 [ 12.214357] [ 12.214471] The buggy address belongs to the object at ffff88810311d000 [ 12.214471] which belongs to the cache test_cache of size 200 [ 12.215401] The buggy address is located 0 bytes inside of [ 12.215401] freed 200-byte region [ffff88810311d000, ffff88810311d0c8) [ 12.216029] [ 12.216115] The buggy address belongs to the physical page: [ 12.216344] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10311d [ 12.217176] flags: 0x200000000000000(node=0|zone=2) [ 12.217867] page_type: f5(slab) [ 12.218316] raw: 0200000000000000 ffff888101b7e280 dead000000000122 0000000000000000 [ 12.219247] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 12.220156] page dumped because: kasan: bad access detected [ 12.220643] [ 12.220728] Memory state around the buggy address: [ 12.220890] ffff88810311cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.221107] ffff88810311cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.221325] >ffff88810311d000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 12.221642] ^ [ 12.221812] ffff88810311d080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 12.222147] ffff88810311d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.222532] ==================================================================