Date
July 17, 2025, 10:12 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 29.954379] ================================================================== [ 29.954515] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 29.954587] Read of size 4 at addr fff00000c9ab5900 by task swapper/1/0 [ 29.954634] [ 29.954672] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc6-next-20250717 #1 PREEMPT [ 29.954757] Tainted: [B]=BAD_PAGE, [N]=TEST [ 29.955049] Hardware name: linux,dummy-virt (DT) [ 29.955474] Call trace: [ 29.955557] show_stack+0x20/0x38 (C) [ 29.956643] dump_stack_lvl+0x8c/0xd0 [ 29.956796] print_report+0x118/0x5d0 [ 29.956846] kasan_report+0xdc/0x128 [ 29.956898] __asan_report_load4_noabort+0x20/0x30 [ 29.956950] rcu_uaf_reclaim+0x64/0x70 [ 29.956995] rcu_core+0x9f4/0x1e58 [ 29.957043] rcu_core_si+0x18/0x30 [ 29.957100] handle_softirqs+0x374/0xb28 [ 29.957148] __do_softirq+0x1c/0x28 [ 29.957190] ____do_softirq+0x18/0x30 [ 29.957233] call_on_irq_stack+0x24/0x30 [ 29.957281] do_softirq_own_stack+0x24/0x38 [ 29.957326] __irq_exit_rcu+0x1fc/0x318 [ 29.957371] irq_exit_rcu+0x1c/0x80 [ 29.957415] el1_interrupt+0x38/0x58 [ 29.957460] el1h_64_irq_handler+0x18/0x28 [ 29.957506] el1h_64_irq+0x6c/0x70 [ 29.957606] arch_local_irq_enable+0x4/0x8 (P) [ 29.957658] do_idle+0x384/0x4e8 [ 29.957703] cpu_startup_entry+0x64/0x80 [ 29.957749] secondary_start_kernel+0x28c/0x340 [ 29.957796] __secondary_switched+0xc0/0xc8 [ 29.957849] [ 29.957868] Allocated by task 229: [ 29.961012] kasan_save_stack+0x3c/0x68 [ 29.961097] kasan_save_track+0x20/0x40 [ 29.961134] kasan_save_alloc_info+0x40/0x58 [ 29.961181] __kasan_kmalloc+0xd4/0xd8 [ 29.961216] __kmalloc_cache_noprof+0x16c/0x3c0 [ 29.961262] rcu_uaf+0xb0/0x2d8 [ 29.961300] kunit_try_run_case+0x170/0x3f0 [ 29.961343] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.961386] kthread+0x328/0x630 [ 29.961421] ret_from_fork+0x10/0x20 [ 29.961456] [ 29.961476] Freed by task 0: [ 29.961503] kasan_save_stack+0x3c/0x68 [ 29.961540] kasan_save_track+0x20/0x40 [ 29.961575] kasan_save_free_info+0x4c/0x78 [ 29.961611] __kasan_slab_free+0x6c/0x98 [ 29.961648] kfree+0x214/0x3c8 [ 29.961681] rcu_uaf_reclaim+0x28/0x70 [ 29.961719] rcu_core+0x9f4/0x1e58 [ 29.961753] rcu_core_si+0x18/0x30 [ 29.961788] handle_softirqs+0x374/0xb28 [ 29.961823] __do_softirq+0x1c/0x28 [ 29.961857] [ 29.961891] Last potentially related work creation: [ 29.961924] kasan_save_stack+0x3c/0x68 [ 29.961963] kasan_record_aux_stack+0xb4/0xc8 [ 29.962000] __call_rcu_common.constprop.0+0x74/0x8c8 [ 29.962042] call_rcu+0x18/0x30 [ 29.963200] rcu_uaf+0x14c/0x2d8 [ 29.963447] kunit_try_run_case+0x170/0x3f0 [ 29.963604] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.964125] kthread+0x328/0x630 [ 29.964168] ret_from_fork+0x10/0x20 [ 29.965016] [ 29.965072] The buggy address belongs to the object at fff00000c9ab5900 [ 29.965072] which belongs to the cache kmalloc-32 of size 32 [ 29.966014] The buggy address is located 0 bytes inside of [ 29.966014] freed 32-byte region [fff00000c9ab5900, fff00000c9ab5920) [ 29.966439] [ 29.966472] The buggy address belongs to the physical page: [ 29.966711] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109ab5 [ 29.967653] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 29.967860] page_type: f5(slab) [ 29.968089] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 29.968700] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 29.968787] page dumped because: kasan: bad access detected [ 29.968819] [ 29.969431] Memory state around the buggy address: [ 29.969632] fff00000c9ab5800: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 29.969680] fff00000c9ab5880: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 29.970417] >fff00000c9ab5900: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 29.970691] ^ [ 29.971228] fff00000c9ab5980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.971334] fff00000c9ab5a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.971404] ==================================================================
[ 26.203370] ================================================================== [ 26.204003] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 26.204463] Read of size 4 at addr ffff888106000840 by task swapper/1/0 [ 26.204783] [ 26.204888] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc6-next-20250717 #1 PREEMPT(voluntary) [ 26.204939] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.204951] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 26.204971] Call Trace: [ 26.204999] <IRQ> [ 26.205015] dump_stack_lvl+0x73/0xb0 [ 26.205045] print_report+0xd1/0x610 [ 26.205067] ? __virt_addr_valid+0x1db/0x2d0 [ 26.205105] ? rcu_uaf_reclaim+0x50/0x60 [ 26.205124] ? kasan_complete_mode_report_info+0x64/0x200 [ 26.205149] ? rcu_uaf_reclaim+0x50/0x60 [ 26.205169] kasan_report+0x141/0x180 [ 26.205191] ? rcu_uaf_reclaim+0x50/0x60 [ 26.205215] __asan_report_load4_noabort+0x18/0x20 [ 26.205238] rcu_uaf_reclaim+0x50/0x60 [ 26.205294] rcu_core+0x66f/0x1c40 [ 26.205324] ? __pfx_rcu_core+0x10/0x10 [ 26.205345] ? ktime_get+0x6b/0x150 [ 26.205370] rcu_core_si+0x12/0x20 [ 26.205389] handle_softirqs+0x209/0x730 [ 26.205409] ? hrtimer_interrupt+0x2fe/0x780 [ 26.205436] ? __pfx_handle_softirqs+0x10/0x10 [ 26.205460] __irq_exit_rcu+0xc9/0x110 [ 26.205479] irq_exit_rcu+0x12/0x20 [ 26.205498] sysvec_apic_timer_interrupt+0x81/0x90 [ 26.205522] </IRQ> [ 26.205549] <TASK> [ 26.205560] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 26.205682] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 26.205890] Code: 1f 84 00 00 00 00 00 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa eb 07 0f 00 2d 83 f3 16 00 fb f4 <c3> cc cc cc cc 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 [ 26.205977] RSP: 0000:ffff88810087fdc8 EFLAGS: 00010206 [ 26.206090] RAX: ffff8881c3113000 RBX: ffff88810085b000 RCX: ffffffff95b1c985 [ 26.206139] RDX: ffffed102b626193 RSI: 0000000000000004 RDI: 00000000000199f4 [ 26.206182] RBP: ffff88810087fdd0 R08: 0000000000000001 R09: ffffed102b626192 [ 26.206224] R10: ffff88815b130c93 R11: ffff88815b1363c8 R12: 0000000000000001 [ 26.206317] R13: ffffed102010b600 R14: ffffffff977fadd0 R15: 0000000000000000 [ 26.206380] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 26.206435] ? default_idle+0xd/0x20 [ 26.206453] arch_cpu_idle+0xd/0x20 [ 26.206471] default_idle_call+0x48/0x80 [ 26.206489] do_idle+0x379/0x4f0 [ 26.206515] ? __pfx_do_idle+0x10/0x10 [ 26.206535] ? _raw_spin_unlock_irqrestore+0x49/0x90 [ 26.206557] ? complete+0x15b/0x1d0 [ 26.206583] cpu_startup_entry+0x5c/0x70 [ 26.206605] start_secondary+0x211/0x290 [ 26.206627] ? __pfx_start_secondary+0x10/0x10 [ 26.206653] common_startup_64+0x13e/0x148 [ 26.206686] </TASK> [ 26.206696] [ 26.221747] Allocated by task 247: [ 26.222018] kasan_save_stack+0x45/0x70 [ 26.222375] kasan_save_track+0x18/0x40 [ 26.222576] kasan_save_alloc_info+0x3b/0x50 [ 26.222772] __kasan_kmalloc+0xb7/0xc0 [ 26.222945] __kmalloc_cache_noprof+0x189/0x420 [ 26.223159] rcu_uaf+0xb0/0x330 [ 26.223301] kunit_try_run_case+0x1a5/0x480 [ 26.223922] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.224314] kthread+0x337/0x6f0 [ 26.224584] ret_from_fork+0x116/0x1d0 [ 26.224880] ret_from_fork_asm+0x1a/0x30 [ 26.225193] [ 26.225387] Freed by task 0: [ 26.225696] kasan_save_stack+0x45/0x70 [ 26.225864] kasan_save_track+0x18/0x40 [ 26.226041] kasan_save_free_info+0x3f/0x60 [ 26.226241] __kasan_slab_free+0x56/0x70 [ 26.226720] kfree+0x222/0x3f0 [ 26.226838] rcu_uaf_reclaim+0x1f/0x60 [ 26.227217] rcu_core+0x66f/0x1c40 [ 26.227489] rcu_core_si+0x12/0x20 [ 26.227990] handle_softirqs+0x209/0x730 [ 26.228147] __irq_exit_rcu+0xc9/0x110 [ 26.228621] irq_exit_rcu+0x12/0x20 [ 26.228870] sysvec_apic_timer_interrupt+0x81/0x90 [ 26.229175] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 26.229813] [ 26.230142] Last potentially related work creation: [ 26.230749] kasan_save_stack+0x45/0x70 [ 26.231327] kasan_record_aux_stack+0xb2/0xc0 [ 26.231969] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 26.232157] call_rcu+0x12/0x20 [ 26.232289] rcu_uaf+0x168/0x330 [ 26.232828] kunit_try_run_case+0x1a5/0x480 [ 26.233340] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.234011] kthread+0x337/0x6f0 [ 26.234187] ret_from_fork+0x116/0x1d0 [ 26.234636] ret_from_fork_asm+0x1a/0x30 [ 26.235017] [ 26.235230] The buggy address belongs to the object at ffff888106000840 [ 26.235230] which belongs to the cache kmalloc-32 of size 32 [ 26.236171] The buggy address is located 0 bytes inside of [ 26.236171] freed 32-byte region [ffff888106000840, ffff888106000860) [ 26.236825] [ 26.236898] The buggy address belongs to the physical page: [ 26.237060] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106000 [ 26.237620] flags: 0x200000000000000(node=0|zone=2) [ 26.238248] page_type: f5(slab) [ 26.238667] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 26.239390] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 26.240151] page dumped because: kasan: bad access detected [ 26.240800] [ 26.240955] Memory state around the buggy address: [ 26.241368] ffff888106000700: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 26.241892] ffff888106000780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 26.242129] >ffff888106000800: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 26.242374] ^ [ 26.242698] ffff888106000880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.243050] ffff888106000900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.243652] ==================================================================