Date
July 3, 2025, 11:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 21.106227] ================================================================== [ 21.106527] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 21.106747] Read of size 1 at addr fff00000c636b000 by task kunit_try_catch/213 [ 21.106867] [ 21.107008] CPU: 0 UID: 0 PID: 213 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 21.107189] Tainted: [B]=BAD_PAGE, [N]=TEST [ 21.107254] Hardware name: linux,dummy-virt (DT) [ 21.107576] Call trace: [ 21.107643] show_stack+0x20/0x38 (C) [ 21.107764] dump_stack_lvl+0x8c/0xd0 [ 21.108164] print_report+0x118/0x608 [ 21.108302] kasan_report+0xdc/0x128 [ 21.108409] __asan_report_load1_noabort+0x20/0x30 [ 21.108536] kmem_cache_rcu_uaf+0x388/0x468 [ 21.108660] kunit_try_run_case+0x170/0x3f0 [ 21.108793] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.108927] kthread+0x328/0x630 [ 21.109080] ret_from_fork+0x10/0x20 [ 21.109240] [ 21.109293] Allocated by task 213: [ 21.109360] kasan_save_stack+0x3c/0x68 [ 21.109454] kasan_save_track+0x20/0x40 [ 21.109536] kasan_save_alloc_info+0x40/0x58 [ 21.109623] __kasan_slab_alloc+0xa8/0xb0 [ 21.109697] kmem_cache_alloc_noprof+0x10c/0x398 [ 21.109777] kmem_cache_rcu_uaf+0x12c/0x468 [ 21.109853] kunit_try_run_case+0x170/0x3f0 [ 21.111238] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.111345] kthread+0x328/0x630 [ 21.111412] ret_from_fork+0x10/0x20 [ 21.111812] [ 21.111954] Freed by task 0: [ 21.113197] kasan_save_stack+0x3c/0x68 [ 21.113326] kasan_save_track+0x20/0x40 [ 21.113394] kasan_save_free_info+0x4c/0x78 [ 21.113899] __kasan_slab_free+0x6c/0x98 [ 21.114016] slab_free_after_rcu_debug+0xd4/0x2f8 [ 21.114120] rcu_core+0x9f4/0x1e20 [ 21.114203] rcu_core_si+0x18/0x30 [ 21.114277] handle_softirqs+0x374/0xb28 [ 21.114352] __do_softirq+0x1c/0x28 [ 21.114424] [ 21.114465] Last potentially related work creation: [ 21.114518] kasan_save_stack+0x3c/0x68 [ 21.114595] kasan_record_aux_stack+0xb4/0xc8 [ 21.114678] kmem_cache_free+0x120/0x468 [ 21.114750] kmem_cache_rcu_uaf+0x16c/0x468 [ 21.114826] kunit_try_run_case+0x170/0x3f0 [ 21.114901] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.114973] kthread+0x328/0x630 [ 21.115919] ret_from_fork+0x10/0x20 [ 21.116019] [ 21.116330] The buggy address belongs to the object at fff00000c636b000 [ 21.116330] which belongs to the cache test_cache of size 200 [ 21.116929] The buggy address is located 0 bytes inside of [ 21.116929] freed 200-byte region [fff00000c636b000, fff00000c636b0c8) [ 21.117381] [ 21.117738] The buggy address belongs to the physical page: [ 21.118083] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10636b [ 21.119049] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 21.119188] page_type: f5(slab) [ 21.119284] raw: 0bfffe0000000000 fff00000c6de63c0 dead000000000122 0000000000000000 [ 21.119395] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 21.119481] page dumped because: kasan: bad access detected [ 21.119548] [ 21.119582] Memory state around the buggy address: [ 21.119652] fff00000c636af00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.119748] fff00000c636af80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.119842] >fff00000c636b000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.119922] ^ [ 21.119978] fff00000c636b080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 21.120083] fff00000c636b100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.120165] ==================================================================
[ 12.321684] ================================================================== [ 12.322166] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.322439] Read of size 1 at addr ffff88810318f000 by task kunit_try_catch/230 [ 12.322751] [ 12.322849] CPU: 1 UID: 0 PID: 230 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 12.322895] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.322906] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.322926] Call Trace: [ 12.322938] <TASK> [ 12.322956] dump_stack_lvl+0x73/0xb0 [ 12.322983] print_report+0xd1/0x650 [ 12.323004] ? __virt_addr_valid+0x1db/0x2d0 [ 12.323027] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.323048] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.323068] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.323090] kasan_report+0x141/0x180 [ 12.323110] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.323168] __asan_report_load1_noabort+0x18/0x20 [ 12.323191] kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.323212] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 12.323234] ? finish_task_switch.isra.0+0x153/0x700 [ 12.323256] ? __switch_to+0x47/0xf50 [ 12.323283] ? __pfx_read_tsc+0x10/0x10 [ 12.323303] ? ktime_get_ts64+0x86/0x230 [ 12.323327] kunit_try_run_case+0x1a5/0x480 [ 12.323353] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.323375] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.323398] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.323419] ? __kthread_parkme+0x82/0x180 [ 12.323439] ? preempt_count_sub+0x50/0x80 [ 12.323460] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.323482] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.323503] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.323744] kthread+0x337/0x6f0 [ 12.323764] ? trace_preempt_on+0x20/0xc0 [ 12.323787] ? __pfx_kthread+0x10/0x10 [ 12.323809] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.323829] ? calculate_sigpending+0x7b/0xa0 [ 12.323852] ? __pfx_kthread+0x10/0x10 [ 12.323872] ret_from_fork+0x116/0x1d0 [ 12.323891] ? __pfx_kthread+0x10/0x10 [ 12.323912] ret_from_fork_asm+0x1a/0x30 [ 12.323941] </TASK> [ 12.323953] [ 12.330728] Allocated by task 230: [ 12.330864] kasan_save_stack+0x45/0x70 [ 12.331064] kasan_save_track+0x18/0x40 [ 12.331292] kasan_save_alloc_info+0x3b/0x50 [ 12.331512] __kasan_slab_alloc+0x91/0xa0 [ 12.331719] kmem_cache_alloc_noprof+0x123/0x3f0 [ 12.331923] kmem_cache_rcu_uaf+0x155/0x510 [ 12.332144] kunit_try_run_case+0x1a5/0x480 [ 12.332292] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.332523] kthread+0x337/0x6f0 [ 12.332701] ret_from_fork+0x116/0x1d0 [ 12.332870] ret_from_fork_asm+0x1a/0x30 [ 12.333032] [ 12.333167] Freed by task 0: [ 12.333319] kasan_save_stack+0x45/0x70 [ 12.333465] kasan_save_track+0x18/0x40 [ 12.333598] kasan_save_free_info+0x3f/0x60 [ 12.333743] __kasan_slab_free+0x56/0x70 [ 12.333878] slab_free_after_rcu_debug+0xe4/0x310 [ 12.334065] rcu_core+0x66f/0x1c40 [ 12.334276] rcu_core_si+0x12/0x20 [ 12.334454] handle_softirqs+0x209/0x730 [ 12.334654] __irq_exit_rcu+0xc9/0x110 [ 12.334844] irq_exit_rcu+0x12/0x20 [ 12.335020] sysvec_apic_timer_interrupt+0x81/0x90 [ 12.335228] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 12.335399] [ 12.335469] Last potentially related work creation: [ 12.335640] kasan_save_stack+0x45/0x70 [ 12.335834] kasan_record_aux_stack+0xb2/0xc0 [ 12.336048] kmem_cache_free+0x131/0x420 [ 12.336277] kmem_cache_rcu_uaf+0x194/0x510 [ 12.336490] kunit_try_run_case+0x1a5/0x480 [ 12.336695] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.336937] kthread+0x337/0x6f0 [ 12.337100] ret_from_fork+0x116/0x1d0 [ 12.337285] ret_from_fork_asm+0x1a/0x30 [ 12.337484] [ 12.337557] The buggy address belongs to the object at ffff88810318f000 [ 12.337557] which belongs to the cache test_cache of size 200 [ 12.338043] The buggy address is located 0 bytes inside of [ 12.338043] freed 200-byte region [ffff88810318f000, ffff88810318f0c8) [ 12.338541] [ 12.338633] The buggy address belongs to the physical page: [ 12.338814] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10318f [ 12.339054] flags: 0x200000000000000(node=0|zone=2) [ 12.339251] page_type: f5(slab) [ 12.339413] raw: 0200000000000000 ffff888100c16640 dead000000000122 0000000000000000 [ 12.339752] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 12.340089] page dumped because: kasan: bad access detected [ 12.340366] [ 12.340462] Memory state around the buggy address: [ 12.340672] ffff88810318ef00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc [ 12.340889] ffff88810318ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.341150] >ffff88810318f000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 12.341473] ^ [ 12.341639] ffff88810318f080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 12.341955] ffff88810318f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.342279] ==================================================================