Date
July 8, 2025, 4:38 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.984191] ================================================================== [ 18.984289] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 18.986139] Read of size 1 at addr fff00000c6e5c000 by task kunit_try_catch/215 [ 18.986391] [ 18.986689] CPU: 1 UID: 0 PID: 215 Comm: kunit_try_catch Tainted: G B N 6.15.6-rc1 #1 PREEMPT [ 18.986783] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.986812] Hardware name: linux,dummy-virt (DT) [ 18.987551] Call trace: [ 18.987932] show_stack+0x20/0x38 (C) [ 18.988604] dump_stack_lvl+0x8c/0xd0 [ 18.988672] print_report+0x118/0x608 [ 18.989221] kasan_report+0xdc/0x128 [ 18.989739] __asan_report_load1_noabort+0x20/0x30 [ 18.990393] kmem_cache_rcu_uaf+0x388/0x468 [ 18.990455] kunit_try_run_case+0x170/0x3f0 [ 18.990512] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.990565] kthread+0x328/0x630 [ 18.990615] ret_from_fork+0x10/0x20 [ 18.991937] [ 18.992511] Allocated by task 215: [ 18.992558] kasan_save_stack+0x3c/0x68 [ 18.992972] kasan_save_track+0x20/0x40 [ 18.993314] kasan_save_alloc_info+0x40/0x58 [ 18.994055] __kasan_slab_alloc+0xa8/0xb0 [ 18.994343] kmem_cache_alloc_noprof+0x10c/0x398 [ 18.994876] kmem_cache_rcu_uaf+0x12c/0x468 [ 18.995545] kunit_try_run_case+0x170/0x3f0 [ 18.995601] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.995649] kthread+0x328/0x630 [ 18.996625] ret_from_fork+0x10/0x20 [ 18.996689] [ 18.996714] Freed by task 0: [ 18.996743] kasan_save_stack+0x3c/0x68 [ 18.997192] kasan_save_track+0x20/0x40 [ 18.997243] kasan_save_free_info+0x4c/0x78 [ 18.997660] __kasan_slab_free+0x6c/0x98 [ 18.998017] slab_free_after_rcu_debug+0xd4/0x2f8 [ 18.998499] rcu_core+0x9f4/0x1e20 [ 18.998571] rcu_core_si+0x18/0x30 [ 18.998608] handle_softirqs+0x374/0xb28 [ 18.999510] __do_softirq+0x1c/0x28 [ 18.999811] [ 18.999837] Last potentially related work creation: [ 19.000166] kasan_save_stack+0x3c/0x68 [ 19.000712] kasan_record_aux_stack+0xb4/0xc8 [ 19.000769] kmem_cache_free+0x120/0x468 [ 19.001356] kmem_cache_rcu_uaf+0x16c/0x468 [ 19.001434] kunit_try_run_case+0x170/0x3f0 [ 19.001477] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.001523] kthread+0x328/0x630 [ 19.001561] ret_from_fork+0x10/0x20 [ 19.002676] [ 19.002706] The buggy address belongs to the object at fff00000c6e5c000 [ 19.002706] which belongs to the cache test_cache of size 200 [ 19.003080] The buggy address is located 0 bytes inside of [ 19.003080] freed 200-byte region [fff00000c6e5c000, fff00000c6e5c0c8) [ 19.003670] [ 19.003955] The buggy address belongs to the physical page: [ 19.004535] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106e5c [ 19.005101] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.005172] page_type: f5(slab) [ 19.005219] raw: 0bfffe0000000000 fff00000c6e5a000 dead000000000122 0000000000000000 [ 19.005272] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 19.005315] page dumped because: kasan: bad access detected [ 19.006502] [ 19.006981] Memory state around the buggy address: [ 19.007130] fff00000c6e5bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.007298] fff00000c6e5bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.007370] >fff00000c6e5c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.008211] ^ [ 19.008244] fff00000c6e5c080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 19.008289] fff00000c6e5c100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.008331] ==================================================================
[ 12.105143] ================================================================== [ 12.105613] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.105972] Read of size 1 at addr ffff888103603000 by task kunit_try_catch/233 [ 12.106332] [ 12.106442] CPU: 0 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G B N 6.15.6-rc1 #1 PREEMPT(voluntary) [ 12.106538] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.106551] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.106575] Call Trace: [ 12.106601] <TASK> [ 12.106620] dump_stack_lvl+0x73/0xb0 [ 12.106650] print_report+0xd1/0x650 [ 12.106674] ? __virt_addr_valid+0x1db/0x2d0 [ 12.106699] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.106720] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.106743] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.106764] kasan_report+0x141/0x180 [ 12.106787] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.106812] __asan_report_load1_noabort+0x18/0x20 [ 12.106834] kmem_cache_rcu_uaf+0x3e3/0x510 [ 12.106854] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 12.106886] ? finish_task_switch.isra.0+0x153/0x700 [ 12.106913] ? __switch_to+0x5d9/0xf60 [ 12.106936] ? dequeue_task_fair+0x166/0x4e0 [ 12.107229] ? __pfx_read_tsc+0x10/0x10 [ 12.107254] ? ktime_get_ts64+0x86/0x230 [ 12.107281] kunit_try_run_case+0x1a5/0x480 [ 12.107304] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.107325] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.107351] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.107376] ? __kthread_parkme+0x82/0x180 [ 12.107400] ? preempt_count_sub+0x50/0x80 [ 12.107425] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.107446] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.107470] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.107494] kthread+0x337/0x6f0 [ 12.107520] ? trace_preempt_on+0x20/0xc0 [ 12.107546] ? __pfx_kthread+0x10/0x10 [ 12.107565] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.107595] ? calculate_sigpending+0x7b/0xa0 [ 12.107618] ? __pfx_kthread+0x10/0x10 [ 12.107637] ret_from_fork+0x41/0x80 [ 12.107659] ? __pfx_kthread+0x10/0x10 [ 12.107678] ret_from_fork_asm+0x1a/0x30 [ 12.107709] </TASK> [ 12.107721] [ 12.118288] Allocated by task 233: [ 12.118564] kasan_save_stack+0x45/0x70 [ 12.118918] kasan_save_track+0x18/0x40 [ 12.119204] kasan_save_alloc_info+0x3b/0x50 [ 12.119414] __kasan_slab_alloc+0x91/0xa0 [ 12.119811] kmem_cache_alloc_noprof+0x123/0x3f0 [ 12.120233] kmem_cache_rcu_uaf+0x155/0x510 [ 12.120446] kunit_try_run_case+0x1a5/0x480 [ 12.121034] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.121257] kthread+0x337/0x6f0 [ 12.121589] ret_from_fork+0x41/0x80 [ 12.121975] ret_from_fork_asm+0x1a/0x30 [ 12.122154] [ 12.122254] Freed by task 0: [ 12.122651] kasan_save_stack+0x45/0x70 [ 12.122867] kasan_save_track+0x18/0x40 [ 12.123305] kasan_save_free_info+0x3f/0x60 [ 12.123596] __kasan_slab_free+0x56/0x70 [ 12.124006] slab_free_after_rcu_debug+0xe4/0x310 [ 12.124245] rcu_core+0x66c/0x1c30 [ 12.124423] rcu_core_si+0x12/0x20 [ 12.124698] handle_softirqs+0x209/0x730 [ 12.125137] __irq_exit_rcu+0xc9/0x110 [ 12.125315] irq_exit_rcu+0x12/0x20 [ 12.125452] sysvec_apic_timer_interrupt+0x81/0x90 [ 12.125685] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 12.125983] [ 12.126084] Last potentially related work creation: [ 12.126281] kasan_save_stack+0x45/0x70 [ 12.126471] kasan_record_aux_stack+0xb2/0xc0 [ 12.126676] kmem_cache_free+0x131/0x420 [ 12.126919] kmem_cache_rcu_uaf+0x194/0x510 [ 12.127107] kunit_try_run_case+0x1a5/0x480 [ 12.127308] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.127534] kthread+0x337/0x6f0 [ 12.127685] ret_from_fork+0x41/0x80 [ 12.127821] ret_from_fork_asm+0x1a/0x30 [ 12.128024] [ 12.128122] The buggy address belongs to the object at ffff888103603000 [ 12.128122] which belongs to the cache test_cache of size 200 [ 12.128672] The buggy address is located 0 bytes inside of [ 12.128672] freed 200-byte region [ffff888103603000, ffff8881036030c8) [ 12.129388] [ 12.129474] The buggy address belongs to the physical page: [ 12.129686] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103603 [ 12.130064] flags: 0x200000000000000(node=0|zone=2) [ 12.130344] page_type: f5(slab) [ 12.130503] raw: 0200000000000000 ffff888101744500 dead000000000122 0000000000000000 [ 12.130848] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 12.131123] page dumped because: kasan: bad access detected [ 12.131365] [ 12.131465] Memory state around the buggy address: [ 12.131731] ffff888103602f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.131960] ffff888103602f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.132248] >ffff888103603000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 12.132774] ^ [ 12.133025] ffff888103603080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 12.133303] ffff888103603100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.133618] ==================================================================