Date
July 23, 2025, 2:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.660330] ================================================================== [ 16.660524] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 16.660723] Read of size 1 at addr fff00000c3f9b000 by task kunit_try_catch/213 [ 16.661054] [ 16.661118] CPU: 1 UID: 0 PID: 213 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7 #1 PREEMPT [ 16.661208] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.661236] Hardware name: linux,dummy-virt (DT) [ 16.661271] Call trace: [ 16.661778] show_stack+0x20/0x38 (C) [ 16.661875] dump_stack_lvl+0x8c/0xd0 [ 16.661930] print_report+0x118/0x5d0 [ 16.661978] kasan_report+0xdc/0x128 [ 16.662022] __asan_report_load1_noabort+0x20/0x30 [ 16.662565] kmem_cache_rcu_uaf+0x388/0x468 [ 16.663056] kunit_try_run_case+0x170/0x3f0 [ 16.663218] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.663434] kthread+0x328/0x630 [ 16.663498] ret_from_fork+0x10/0x20 [ 16.663742] [ 16.663961] Allocated by task 213: [ 16.664079] kasan_save_stack+0x3c/0x68 [ 16.664219] kasan_save_track+0x20/0x40 [ 16.664274] kasan_save_alloc_info+0x40/0x58 [ 16.664489] __kasan_slab_alloc+0xa8/0xb0 [ 16.664768] kmem_cache_alloc_noprof+0x10c/0x398 [ 16.665096] kmem_cache_rcu_uaf+0x12c/0x468 [ 16.665612] kunit_try_run_case+0x170/0x3f0 [ 16.665745] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.665992] kthread+0x328/0x630 [ 16.666293] ret_from_fork+0x10/0x20 [ 16.666371] [ 16.666393] Freed by task 0: [ 16.666666] kasan_save_stack+0x3c/0x68 [ 16.666810] kasan_save_track+0x20/0x40 [ 16.666909] kasan_save_free_info+0x4c/0x78 [ 16.667093] __kasan_slab_free+0x6c/0x98 [ 16.667263] slab_free_after_rcu_debug+0xd4/0x2f8 [ 16.667378] rcu_core+0x9f4/0x1e20 [ 16.667473] rcu_core_si+0x18/0x30 [ 16.667614] handle_softirqs+0x374/0xb28 [ 16.667670] __do_softirq+0x1c/0x28 [ 16.668139] [ 16.668249] Last potentially related work creation: [ 16.668289] kasan_save_stack+0x3c/0x68 [ 16.668375] kasan_record_aux_stack+0xb4/0xc8 [ 16.668785] kmem_cache_free+0x120/0x468 [ 16.668895] kmem_cache_rcu_uaf+0x16c/0x468 [ 16.668938] kunit_try_run_case+0x170/0x3f0 [ 16.669000] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.669735] kthread+0x328/0x630 [ 16.669829] ret_from_fork+0x10/0x20 [ 16.669971] [ 16.669992] The buggy address belongs to the object at fff00000c3f9b000 [ 16.669992] which belongs to the cache test_cache of size 200 [ 16.670081] The buggy address is located 0 bytes inside of [ 16.670081] freed 200-byte region [fff00000c3f9b000, fff00000c3f9b0c8) [ 16.670181] [ 16.670215] The buggy address belongs to the physical page: [ 16.670258] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f9b [ 16.670327] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.670382] page_type: f5(slab) [ 16.670427] raw: 0bfffe0000000000 fff00000c3f17500 dead000000000122 0000000000000000 [ 16.670501] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 16.670546] page dumped because: kasan: bad access detected [ 16.670736] [ 16.670873] Memory state around the buggy address: [ 16.670914] fff00000c3f9af00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.670963] fff00000c3f9af80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.671422] >fff00000c3f9b000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 16.671483] ^ [ 16.671760] fff00000c3f9b080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 16.671880] fff00000c3f9b100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.672364] ==================================================================
[ 13.379614] ================================================================== [ 13.380139] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.380495] Read of size 1 at addr ffff8881025da000 by task kunit_try_catch/230 [ 13.380821] [ 13.380932] CPU: 1 UID: 0 PID: 230 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7 #1 PREEMPT(voluntary) [ 13.380979] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.380991] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.381013] Call Trace: [ 13.381374] <TASK> [ 13.381525] dump_stack_lvl+0x73/0xb0 [ 13.381565] print_report+0xd1/0x610 [ 13.381587] ? __virt_addr_valid+0x1db/0x2d0 [ 13.381609] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.381631] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.381652] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.381675] kasan_report+0x141/0x180 [ 13.381697] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.381723] __asan_report_load1_noabort+0x18/0x20 [ 13.381746] kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.381768] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 13.381790] ? finish_task_switch.isra.0+0x153/0x700 [ 13.381827] ? __switch_to+0x47/0xf50 [ 13.381855] ? __pfx_read_tsc+0x10/0x10 [ 13.381874] ? ktime_get_ts64+0x86/0x230 [ 13.381897] kunit_try_run_case+0x1a5/0x480 [ 13.381922] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.381943] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.381966] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.381988] ? __kthread_parkme+0x82/0x180 [ 13.382008] ? preempt_count_sub+0x50/0x80 [ 13.382030] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.382052] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.382074] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.382097] kthread+0x337/0x6f0 [ 13.382115] ? trace_preempt_on+0x20/0xc0 [ 13.382137] ? __pfx_kthread+0x10/0x10 [ 13.382156] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.382177] ? calculate_sigpending+0x7b/0xa0 [ 13.382199] ? __pfx_kthread+0x10/0x10 [ 13.382219] ret_from_fork+0x116/0x1d0 [ 13.382237] ? __pfx_kthread+0x10/0x10 [ 13.382256] ret_from_fork_asm+0x1a/0x30 [ 13.382285] </TASK> [ 13.382296] [ 13.395515] Allocated by task 230: [ 13.395848] kasan_save_stack+0x45/0x70 [ 13.396059] kasan_save_track+0x18/0x40 [ 13.396451] kasan_save_alloc_info+0x3b/0x50 [ 13.396808] __kasan_slab_alloc+0x91/0xa0 [ 13.396974] kmem_cache_alloc_noprof+0x123/0x3f0 [ 13.397215] kmem_cache_rcu_uaf+0x155/0x510 [ 13.397687] kunit_try_run_case+0x1a5/0x480 [ 13.398081] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.398600] kthread+0x337/0x6f0 [ 13.399094] ret_from_fork+0x116/0x1d0 [ 13.399492] ret_from_fork_asm+0x1a/0x30 [ 13.399639] [ 13.399713] Freed by task 0: [ 13.399836] kasan_save_stack+0x45/0x70 [ 13.399974] kasan_save_track+0x18/0x40 [ 13.400142] kasan_save_free_info+0x3f/0x60 [ 13.400579] __kasan_slab_free+0x56/0x70 [ 13.400949] slab_free_after_rcu_debug+0xe4/0x310 [ 13.401484] rcu_core+0x66f/0x1c40 [ 13.401830] rcu_core_si+0x12/0x20 [ 13.402175] handle_softirqs+0x209/0x730 [ 13.402682] __irq_exit_rcu+0xc9/0x110 [ 13.403037] irq_exit_rcu+0x12/0x20 [ 13.403388] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.403895] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.404071] [ 13.404174] Last potentially related work creation: [ 13.404644] kasan_save_stack+0x45/0x70 [ 13.405016] kasan_record_aux_stack+0xb2/0xc0 [ 13.405485] kmem_cache_free+0x131/0x420 [ 13.405805] kmem_cache_rcu_uaf+0x194/0x510 [ 13.405963] kunit_try_run_case+0x1a5/0x480 [ 13.406124] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.406741] kthread+0x337/0x6f0 [ 13.407475] ret_from_fork+0x116/0x1d0 [ 13.407842] ret_from_fork_asm+0x1a/0x30 [ 13.408210] [ 13.408429] The buggy address belongs to the object at ffff8881025da000 [ 13.408429] which belongs to the cache test_cache of size 200 [ 13.408892] The buggy address is located 0 bytes inside of [ 13.408892] freed 200-byte region [ffff8881025da000, ffff8881025da0c8) [ 13.409643] [ 13.409810] The buggy address belongs to the physical page: [ 13.410533] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1025da [ 13.411335] flags: 0x200000000000000(node=0|zone=2) [ 13.411774] page_type: f5(slab) [ 13.412082] raw: 0200000000000000 ffff8881025d4140 dead000000000122 0000000000000000 [ 13.412440] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 13.413093] page dumped because: kasan: bad access detected [ 13.413665] [ 13.413739] Memory state around the buggy address: [ 13.413910] ffff8881025d9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.414154] ffff8881025d9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.414837] >ffff8881025da000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 13.415629] ^ [ 13.415938] ffff8881025da080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 13.416628] ffff8881025da100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.417130] ==================================================================