Date
June 7, 2025, 10:40 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 24.010061] ================================================================== [ 24.011361] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x390/0x468 [ 24.012378] Read of size 1 at addr fff00000c64cf000 by task kunit_try_catch/202 [ 24.013471] [ 24.013976] CPU: 1 UID: 0 PID: 202 Comm: kunit_try_catch Tainted: G B N 6.14.11-rc1 #1 [ 24.014237] Tainted: [B]=BAD_PAGE, [N]=TEST [ 24.014313] Hardware name: linux,dummy-virt (DT) [ 24.014358] Call trace: [ 24.014388] show_stack+0x20/0x38 (C) [ 24.014457] dump_stack_lvl+0x8c/0xd0 [ 24.014523] print_report+0x118/0x608 [ 24.014581] kasan_report+0xdc/0x128 [ 24.014639] __asan_report_load1_noabort+0x20/0x30 [ 24.014698] kmem_cache_rcu_uaf+0x390/0x468 [ 24.014754] kunit_try_run_case+0x170/0x3f0 [ 24.014815] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 24.014901] kthread+0x318/0x620 [ 24.014977] ret_from_fork+0x10/0x20 [ 24.015038] [ 24.020900] Allocated by task 202: [ 24.021366] kasan_save_stack+0x3c/0x68 [ 24.022051] kasan_save_track+0x20/0x40 [ 24.022696] kasan_save_alloc_info+0x40/0x58 [ 24.023324] __kasan_slab_alloc+0xa8/0xb0 [ 24.024501] kmem_cache_alloc_noprof+0x10c/0x398 [ 24.025136] kmem_cache_rcu_uaf+0x12c/0x468 [ 24.026123] kunit_try_run_case+0x170/0x3f0 [ 24.026653] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 24.027293] kthread+0x318/0x620 [ 24.027748] ret_from_fork+0x10/0x20 [ 24.028241] [ 24.028557] Freed by task 0: [ 24.029021] kasan_save_stack+0x3c/0x68 [ 24.029516] kasan_save_track+0x20/0x40 [ 24.030055] kasan_save_free_info+0x4c/0x78 [ 24.030650] __kasan_slab_free+0x6c/0x98 [ 24.031193] slab_free_after_rcu_debug+0xd4/0x2f8 [ 24.031813] rcu_core+0x9f4/0x1e20 [ 24.032332] rcu_core_si+0x18/0x30 [ 24.032838] handle_softirqs+0x374/0xb28 [ 24.033393] __do_softirq+0x1c/0x28 [ 24.033854] [ 24.034203] Last potentially related work creation: [ 24.034722] kasan_save_stack+0x3c/0x68 [ 24.035239] kasan_record_aux_stack+0xb4/0xc8 [ 24.035809] kmem_cache_free+0x120/0x468 [ 24.036373] kmem_cache_rcu_uaf+0x16c/0x468 [ 24.036903] kunit_try_run_case+0x170/0x3f0 [ 24.037433] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 24.038046] kthread+0x318/0x620 [ 24.038563] ret_from_fork+0x10/0x20 [ 24.039106] [ 24.039419] The buggy address belongs to the object at fff00000c64cf000 [ 24.039419] which belongs to the cache test_cache of size 200 [ 24.040582] The buggy address is located 0 bytes inside of [ 24.040582] freed 200-byte region [fff00000c64cf000, fff00000c64cf0c8) [ 24.041684] [ 24.042022] The buggy address belongs to the physical page: [ 24.042597] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1064cf [ 24.043475] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 24.044204] page_type: f5(slab) [ 24.044643] raw: 0bfffe0000000000 fff00000c1bcac80 dead000000000122 0000000000000000 [ 24.045431] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 24.046106] page dumped because: kasan: bad access detected [ 24.046783] [ 24.047123] Memory state around the buggy address: [ 24.047653] fff00000c64cef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.048488] fff00000c64cef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.049220] >fff00000c64cf000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.049932] ^ [ 24.050355] fff00000c64cf080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 24.051048] fff00000c64cf100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.051748] ==================================================================
[ 18.754817] ================================================================== [ 18.755828] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e5/0x510 [ 18.756576] Read of size 1 at addr ffff888102cae000 by task kunit_try_catch/221 [ 18.757003] [ 18.757189] CPU: 0 UID: 0 PID: 221 Comm: kunit_try_catch Tainted: G B N 6.14.11-rc1 #1 [ 18.757296] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.757328] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 18.757371] Call Trace: [ 18.757406] <TASK> [ 18.757447] dump_stack_lvl+0x73/0xb0 [ 18.757528] print_report+0xd1/0x650 [ 18.757583] ? __virt_addr_valid+0x1db/0x2d0 [ 18.757642] ? kmem_cache_rcu_uaf+0x3e5/0x510 [ 18.757698] ? kasan_complete_mode_report_info+0x64/0x200 [ 18.757753] ? kmem_cache_rcu_uaf+0x3e5/0x510 [ 18.757798] kasan_report+0x140/0x180 [ 18.757847] ? kmem_cache_rcu_uaf+0x3e5/0x510 [ 18.758022] __asan_report_load1_noabort+0x18/0x20 [ 18.758078] kmem_cache_rcu_uaf+0x3e5/0x510 [ 18.758133] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 18.758187] ? sysvec_apic_timer_interrupt+0x50/0x90 [ 18.758265] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 18.758344] kunit_try_run_case+0x1a6/0x480 [ 18.758410] ? __pfx_kunit_try_run_case+0x10/0x10 [ 18.758465] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 18.758527] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 18.758587] ? __kthread_parkme+0x82/0x160 [ 18.758648] ? preempt_count_sub+0x50/0x80 [ 18.758711] ? __pfx_kunit_try_run_case+0x10/0x10 [ 18.758760] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 18.758816] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 18.758876] kthread+0x324/0x6e0 [ 18.758909] ? trace_preempt_on+0x20/0xc0 [ 18.758942] ? __pfx_kthread+0x10/0x10 [ 18.758970] ? _raw_spin_unlock_irq+0x47/0x80 [ 18.758998] ? calculate_sigpending+0x7b/0xa0 [ 18.759026] ? __pfx_kthread+0x10/0x10 [ 18.759054] ret_from_fork+0x41/0x80 [ 18.759079] ? __pfx_kthread+0x10/0x10 [ 18.759106] ret_from_fork_asm+0x1a/0x30 [ 18.759147] </TASK> [ 18.759162] [ 18.772978] Allocated by task 221: [ 18.773292] kasan_save_stack+0x45/0x70 [ 18.773564] kasan_save_track+0x18/0x40 [ 18.773965] kasan_save_alloc_info+0x3b/0x50 [ 18.774302] __kasan_slab_alloc+0x91/0xa0 [ 18.774592] kmem_cache_alloc_noprof+0x124/0x400 [ 18.775038] kmem_cache_rcu_uaf+0x156/0x510 [ 18.775339] kunit_try_run_case+0x1a6/0x480 [ 18.776007] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 18.777568] kthread+0x324/0x6e0 [ 18.777964] ret_from_fork+0x41/0x80 [ 18.778227] ret_from_fork_asm+0x1a/0x30 [ 18.778750] [ 18.778923] Freed by task 0: [ 18.779115] kasan_save_stack+0x45/0x70 [ 18.779647] kasan_save_track+0x18/0x40 [ 18.780057] kasan_save_free_info+0x3f/0x60 [ 18.780573] __kasan_slab_free+0x56/0x70 [ 18.780900] slab_free_after_rcu_debug+0xe4/0x310 [ 18.781356] rcu_core+0x680/0x1d70 [ 18.782497] rcu_core_si+0x12/0x20 [ 18.782786] handle_softirqs+0x209/0x730 [ 18.783282] __irq_exit_rcu+0xc9/0x110 [ 18.783842] irq_exit_rcu+0x12/0x20 [ 18.784230] sysvec_apic_timer_interrupt+0x81/0x90 [ 18.784739] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 18.785209] [ 18.785584] Last potentially related work creation: [ 18.785965] kasan_save_stack+0x45/0x70 [ 18.786356] kasan_record_aux_stack+0xb2/0xc0 [ 18.786631] kmem_cache_free+0x132/0x420 [ 18.787046] kmem_cache_rcu_uaf+0x195/0x510 [ 18.787440] kunit_try_run_case+0x1a6/0x480 [ 18.787710] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 18.788214] kthread+0x324/0x6e0 [ 18.788553] ret_from_fork+0x41/0x80 [ 18.789970] ret_from_fork_asm+0x1a/0x30 [ 18.790188] [ 18.790386] The buggy address belongs to the object at ffff888102cae000 [ 18.790386] which belongs to the cache test_cache of size 200 [ 18.791596] The buggy address is located 0 bytes inside of [ 18.791596] freed 200-byte region [ffff888102cae000, ffff888102cae0c8) [ 18.792407] [ 18.792762] The buggy address belongs to the physical page: [ 18.793143] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102cae [ 18.794378] flags: 0x200000000000000(node=0|zone=2) [ 18.794810] page_type: f5(slab) [ 18.795346] raw: 0200000000000000 ffff8881003b1280 dead000000000122 0000000000000000 [ 18.795819] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 18.796412] page dumped because: kasan: bad access detected [ 18.796791] [ 18.797146] Memory state around the buggy address: [ 18.797711] ffff888102cadf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.798219] ffff888102cadf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.798873] >ffff888102cae000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.799276] ^ [ 18.800395] ffff888102cae080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 18.800775] ffff888102cae100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.801222] ==================================================================