Date
July 10, 2025, 6:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.126487] ================================================================== [ 18.126606] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 18.126692] Read of size 1 at addr fff00000c5a3f000 by task kunit_try_catch/213 [ 18.126745] [ 18.126791] CPU: 1 UID: 0 PID: 213 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 18.126878] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.126904] Hardware name: linux,dummy-virt (DT) [ 18.126939] Call trace: [ 18.126963] show_stack+0x20/0x38 (C) [ 18.127019] dump_stack_lvl+0x8c/0xd0 [ 18.127073] print_report+0x118/0x608 [ 18.127121] kasan_report+0xdc/0x128 [ 18.127168] __asan_report_load1_noabort+0x20/0x30 [ 18.127219] kmem_cache_rcu_uaf+0x388/0x468 [ 18.127267] kunit_try_run_case+0x170/0x3f0 [ 18.127318] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.127386] kthread+0x328/0x630 [ 18.127435] ret_from_fork+0x10/0x20 [ 18.127486] [ 18.127504] Allocated by task 213: [ 18.127535] kasan_save_stack+0x3c/0x68 [ 18.127576] kasan_save_track+0x20/0x40 [ 18.127614] kasan_save_alloc_info+0x40/0x58 [ 18.127655] __kasan_slab_alloc+0xa8/0xb0 [ 18.127696] kmem_cache_alloc_noprof+0x10c/0x398 [ 18.127739] kmem_cache_rcu_uaf+0x12c/0x468 [ 18.127778] kunit_try_run_case+0x170/0x3f0 [ 18.127817] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.127860] kthread+0x328/0x630 [ 18.127894] ret_from_fork+0x10/0x20 [ 18.127929] [ 18.127947] Freed by task 0: [ 18.127976] kasan_save_stack+0x3c/0x68 [ 18.128015] kasan_save_track+0x20/0x40 [ 18.128051] kasan_save_free_info+0x4c/0x78 [ 18.128092] __kasan_slab_free+0x6c/0x98 [ 18.128130] slab_free_after_rcu_debug+0xd4/0x2f8 [ 18.128171] rcu_core+0x9f4/0x1e20 [ 18.128211] rcu_core_si+0x18/0x30 [ 18.128245] handle_softirqs+0x374/0xb28 [ 18.128284] __do_softirq+0x1c/0x28 [ 18.128318] [ 18.128347] Last potentially related work creation: [ 18.128375] kasan_save_stack+0x3c/0x68 [ 18.128414] kasan_record_aux_stack+0xb4/0xc8 [ 18.128454] kmem_cache_free+0x120/0x468 [ 18.128493] kmem_cache_rcu_uaf+0x16c/0x468 [ 18.128530] kunit_try_run_case+0x170/0x3f0 [ 18.128570] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.128613] kthread+0x328/0x630 [ 18.128646] ret_from_fork+0x10/0x20 [ 18.128681] [ 18.128701] The buggy address belongs to the object at fff00000c5a3f000 [ 18.128701] which belongs to the cache test_cache of size 200 [ 18.128761] The buggy address is located 0 bytes inside of [ 18.128761] freed 200-byte region [fff00000c5a3f000, fff00000c5a3f0c8) [ 18.128823] [ 18.128845] The buggy address belongs to the physical page: [ 18.128879] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a3f [ 18.128937] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.128991] page_type: f5(slab) [ 18.129034] raw: 0bfffe0000000000 fff00000c5973640 dead000000000122 0000000000000000 [ 18.129084] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 18.129125] page dumped because: kasan: bad access detected [ 18.129156] [ 18.129175] Memory state around the buggy address: [ 18.129207] fff00000c5a3ef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.129251] fff00000c5a3ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.129294] >fff00000c5a3f000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.129333] ^ [ 18.129373] fff00000c5a3f080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 18.129415] fff00000c5a3f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.129453] ==================================================================
[ 13.285002] ================================================================== [ 13.285477] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.285722] Read of size 1 at addr ffff888103a0f000 by task kunit_try_catch/230 [ 13.286780] [ 13.287131] CPU: 0 UID: 0 PID: 230 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 13.287201] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.287215] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.287238] Call Trace: [ 13.287251] <TASK> [ 13.287269] dump_stack_lvl+0x73/0xb0 [ 13.287304] print_report+0xd1/0x650 [ 13.287328] ? __virt_addr_valid+0x1db/0x2d0 [ 13.287352] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.287375] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.287399] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.287423] kasan_report+0x141/0x180 [ 13.287444] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.287472] __asan_report_load1_noabort+0x18/0x20 [ 13.287496] kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.287520] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 13.287543] ? finish_task_switch.isra.0+0x153/0x700 [ 13.287568] ? __switch_to+0x47/0xf50 [ 13.287598] ? __pfx_read_tsc+0x10/0x10 [ 13.287620] ? ktime_get_ts64+0x86/0x230 [ 13.287647] kunit_try_run_case+0x1a5/0x480 [ 13.287672] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.287695] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.287720] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.287744] ? __kthread_parkme+0x82/0x180 [ 13.287764] ? preempt_count_sub+0x50/0x80 [ 13.287787] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.287811] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.287835] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.287860] kthread+0x337/0x6f0 [ 13.287879] ? trace_preempt_on+0x20/0xc0 [ 13.287903] ? __pfx_kthread+0x10/0x10 [ 13.287923] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.288103] ? calculate_sigpending+0x7b/0xa0 [ 13.288131] ? __pfx_kthread+0x10/0x10 [ 13.288165] ret_from_fork+0x116/0x1d0 [ 13.288185] ? __pfx_kthread+0x10/0x10 [ 13.288238] ret_from_fork_asm+0x1a/0x30 [ 13.288272] </TASK> [ 13.288283] [ 13.297630] Allocated by task 230: [ 13.297968] kasan_save_stack+0x45/0x70 [ 13.298298] kasan_save_track+0x18/0x40 [ 13.298448] kasan_save_alloc_info+0x3b/0x50 [ 13.298668] __kasan_slab_alloc+0x91/0xa0 [ 13.298860] kmem_cache_alloc_noprof+0x123/0x3f0 [ 13.299319] kmem_cache_rcu_uaf+0x155/0x510 [ 13.299617] kunit_try_run_case+0x1a5/0x480 [ 13.299819] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.300186] kthread+0x337/0x6f0 [ 13.300367] ret_from_fork+0x116/0x1d0 [ 13.300686] ret_from_fork_asm+0x1a/0x30 [ 13.300976] [ 13.301090] Freed by task 0: [ 13.301358] kasan_save_stack+0x45/0x70 [ 13.301531] kasan_save_track+0x18/0x40 [ 13.301713] kasan_save_free_info+0x3f/0x60 [ 13.301897] __kasan_slab_free+0x56/0x70 [ 13.302364] slab_free_after_rcu_debug+0xe4/0x310 [ 13.302557] rcu_core+0x66f/0x1c40 [ 13.302854] rcu_core_si+0x12/0x20 [ 13.303180] handle_softirqs+0x209/0x730 [ 13.303461] __irq_exit_rcu+0xc9/0x110 [ 13.303730] irq_exit_rcu+0x12/0x20 [ 13.303878] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.304304] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.304646] [ 13.304726] Last potentially related work creation: [ 13.305094] kasan_save_stack+0x45/0x70 [ 13.305382] kasan_record_aux_stack+0xb2/0xc0 [ 13.305667] kmem_cache_free+0x131/0x420 [ 13.305856] kmem_cache_rcu_uaf+0x194/0x510 [ 13.306226] kunit_try_run_case+0x1a5/0x480 [ 13.306441] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.306679] kthread+0x337/0x6f0 [ 13.306837] ret_from_fork+0x116/0x1d0 [ 13.307255] ret_from_fork_asm+0x1a/0x30 [ 13.307529] [ 13.307609] The buggy address belongs to the object at ffff888103a0f000 [ 13.307609] which belongs to the cache test_cache of size 200 [ 13.308398] The buggy address is located 0 bytes inside of [ 13.308398] freed 200-byte region [ffff888103a0f000, ffff888103a0f0c8) [ 13.309016] [ 13.309129] The buggy address belongs to the physical page: [ 13.309502] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a0f [ 13.309906] flags: 0x200000000000000(node=0|zone=2) [ 13.310318] page_type: f5(slab) [ 13.310457] raw: 0200000000000000 ffff888101654c80 dead000000000122 0000000000000000 [ 13.310787] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 13.311294] page dumped because: kasan: bad access detected [ 13.311617] [ 13.311718] Memory state around the buggy address: [ 13.312185] ffff888103a0ef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.312597] ffff888103a0ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.312975] >ffff888103a0f000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 13.313390] ^ [ 13.313514] ffff888103a0f080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 13.313896] ffff888103a0f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.314407] ==================================================================