Date
July 17, 2025, 11:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.662934] ================================================================== [ 16.663405] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 16.663657] Read of size 1 at addr fff00000c7939000 by task kunit_try_catch/214 [ 16.663818] [ 16.664143] CPU: 0 UID: 0 PID: 214 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 16.664572] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.664671] Hardware name: linux,dummy-virt (DT) [ 16.664711] Call trace: [ 16.664734] show_stack+0x20/0x38 (C) [ 16.664826] dump_stack_lvl+0x8c/0xd0 [ 16.665093] print_report+0x118/0x5d0 [ 16.665398] kasan_report+0xdc/0x128 [ 16.665577] __asan_report_load1_noabort+0x20/0x30 [ 16.666518] kmem_cache_rcu_uaf+0x388/0x468 [ 16.666772] kunit_try_run_case+0x170/0x3f0 [ 16.666865] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.667139] kthread+0x328/0x630 [ 16.667489] ret_from_fork+0x10/0x20 [ 16.668045] [ 16.668215] Allocated by task 214: [ 16.668485] kasan_save_stack+0x3c/0x68 [ 16.668558] kasan_save_track+0x20/0x40 [ 16.668597] kasan_save_alloc_info+0x40/0x58 [ 16.668875] __kasan_slab_alloc+0xa8/0xb0 [ 16.669068] kmem_cache_alloc_noprof+0x10c/0x398 [ 16.669122] kmem_cache_rcu_uaf+0x12c/0x468 [ 16.669170] kunit_try_run_case+0x170/0x3f0 [ 16.669208] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.669252] kthread+0x328/0x630 [ 16.669285] ret_from_fork+0x10/0x20 [ 16.669321] [ 16.669339] Freed by task 0: [ 16.669366] kasan_save_stack+0x3c/0x68 [ 16.669405] kasan_save_track+0x20/0x40 [ 16.669441] kasan_save_free_info+0x4c/0x78 [ 16.669480] __kasan_slab_free+0x6c/0x98 [ 16.669519] slab_free_after_rcu_debug+0xd4/0x2f8 [ 16.669561] rcu_core+0x9f4/0x1e20 [ 16.669603] rcu_core_si+0x18/0x30 [ 16.669636] handle_softirqs+0x374/0xb28 [ 16.669674] __do_softirq+0x1c/0x28 [ 16.669705] [ 16.669724] Last potentially related work creation: [ 16.669752] kasan_save_stack+0x3c/0x68 [ 16.669790] kasan_record_aux_stack+0xb4/0xc8 [ 16.669828] kmem_cache_free+0x120/0x468 [ 16.669866] kmem_cache_rcu_uaf+0x16c/0x468 [ 16.669901] kunit_try_run_case+0x170/0x3f0 [ 16.669939] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.669992] kthread+0x328/0x630 [ 16.670488] ret_from_fork+0x10/0x20 [ 16.670540] [ 16.670559] The buggy address belongs to the object at fff00000c7939000 [ 16.670559] which belongs to the cache test_cache of size 200 [ 16.670629] The buggy address is located 0 bytes inside of [ 16.670629] freed 200-byte region [fff00000c7939000, fff00000c79390c8) [ 16.670693] [ 16.670716] The buggy address belongs to the physical page: [ 16.670750] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107939 [ 16.670846] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.670901] page_type: f5(slab) [ 16.670945] raw: 0bfffe0000000000 fff00000c78a1140 dead000000000122 0000000000000000 [ 16.671009] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 16.671061] page dumped because: kasan: bad access detected [ 16.671105] [ 16.671133] Memory state around the buggy address: [ 16.671177] fff00000c7938f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.671221] fff00000c7938f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.671283] >fff00000c7939000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 16.671337] ^ [ 16.671372] fff00000c7939080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 16.671437] fff00000c7939100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.671478] ==================================================================
[ 13.826587] ================================================================== [ 13.827009] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.827295] Read of size 1 at addr ffff888102a1f000 by task kunit_try_catch/230 [ 13.828107] [ 13.828407] CPU: 1 UID: 0 PID: 230 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 13.828481] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.828494] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.828515] Call Trace: [ 13.828527] <TASK> [ 13.828544] dump_stack_lvl+0x73/0xb0 [ 13.828584] print_report+0xd1/0x610 [ 13.828607] ? __virt_addr_valid+0x1db/0x2d0 [ 13.828629] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.828653] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.828676] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.828700] kasan_report+0x141/0x180 [ 13.828721] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.828749] __asan_report_load1_noabort+0x18/0x20 [ 13.828820] kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.828854] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 13.828888] ? finish_task_switch.isra.0+0x153/0x700 [ 13.828912] ? __switch_to+0x47/0xf50 [ 13.829180] ? __pfx_read_tsc+0x10/0x10 [ 13.829202] ? ktime_get_ts64+0x86/0x230 [ 13.829226] kunit_try_run_case+0x1a5/0x480 [ 13.829262] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.829287] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.829313] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.829337] ? __kthread_parkme+0x82/0x180 [ 13.829359] ? preempt_count_sub+0x50/0x80 [ 13.829383] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.829408] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.829433] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.829460] kthread+0x337/0x6f0 [ 13.829479] ? trace_preempt_on+0x20/0xc0 [ 13.829504] ? __pfx_kthread+0x10/0x10 [ 13.829524] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.829547] ? calculate_sigpending+0x7b/0xa0 [ 13.829585] ? __pfx_kthread+0x10/0x10 [ 13.829606] ret_from_fork+0x116/0x1d0 [ 13.829626] ? __pfx_kthread+0x10/0x10 [ 13.829647] ret_from_fork_asm+0x1a/0x30 [ 13.829677] </TASK> [ 13.829689] [ 13.843034] Allocated by task 230: [ 13.843177] kasan_save_stack+0x45/0x70 [ 13.843672] kasan_save_track+0x18/0x40 [ 13.844081] kasan_save_alloc_info+0x3b/0x50 [ 13.844649] __kasan_slab_alloc+0x91/0xa0 [ 13.845090] kmem_cache_alloc_noprof+0x123/0x3f0 [ 13.845754] kmem_cache_rcu_uaf+0x155/0x510 [ 13.845917] kunit_try_run_case+0x1a5/0x480 [ 13.846065] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.846296] kthread+0x337/0x6f0 [ 13.846715] ret_from_fork+0x116/0x1d0 [ 13.847114] ret_from_fork_asm+0x1a/0x30 [ 13.847538] [ 13.847780] Freed by task 0: [ 13.848219] kasan_save_stack+0x45/0x70 [ 13.848765] kasan_save_track+0x18/0x40 [ 13.849107] kasan_save_free_info+0x3f/0x60 [ 13.849398] __kasan_slab_free+0x56/0x70 [ 13.849829] slab_free_after_rcu_debug+0xe4/0x310 [ 13.850350] rcu_core+0x66f/0x1c40 [ 13.850532] rcu_core_si+0x12/0x20 [ 13.850870] handle_softirqs+0x209/0x730 [ 13.851195] __irq_exit_rcu+0xc9/0x110 [ 13.851591] irq_exit_rcu+0x12/0x20 [ 13.851902] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.852079] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.852322] [ 13.852597] Last potentially related work creation: [ 13.853067] kasan_save_stack+0x45/0x70 [ 13.853636] kasan_record_aux_stack+0xb2/0xc0 [ 13.854194] kmem_cache_free+0x131/0x420 [ 13.854534] kmem_cache_rcu_uaf+0x194/0x510 [ 13.854957] kunit_try_run_case+0x1a5/0x480 [ 13.855115] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.855356] kthread+0x337/0x6f0 [ 13.855835] ret_from_fork+0x116/0x1d0 [ 13.856354] ret_from_fork_asm+0x1a/0x30 [ 13.856874] [ 13.857092] The buggy address belongs to the object at ffff888102a1f000 [ 13.857092] which belongs to the cache test_cache of size 200 [ 13.857935] The buggy address is located 0 bytes inside of [ 13.857935] freed 200-byte region [ffff888102a1f000, ffff888102a1f0c8) [ 13.858535] [ 13.858727] The buggy address belongs to the physical page: [ 13.859457] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a1f [ 13.860192] flags: 0x200000000000000(node=0|zone=2) [ 13.860808] page_type: f5(slab) [ 13.861075] raw: 0200000000000000 ffff8881025d5140 dead000000000122 0000000000000000 [ 13.861723] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 13.862150] page dumped because: kasan: bad access detected [ 13.862344] [ 13.862418] Memory state around the buggy address: [ 13.862588] ffff888102a1ef00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 13.862913] ffff888102a1ef80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 13.863241] >ffff888102a1f000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 13.863594] ^ [ 13.863752] ffff888102a1f080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 13.864139] ffff888102a1f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.864566] ==================================================================