Date
May 23, 2025, 11:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 31.045554] ================================================================== [ 31.045774] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 31.045951] Read of size 1 at addr fff00000c77a2dd0 by task kunit_try_catch/261 [ 31.046108] [ 31.046210] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc7 #1 PREEMPT [ 31.046469] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.047332] Hardware name: linux,dummy-virt (DT) [ 31.047491] Call trace: [ 31.047566] show_stack+0x20/0x38 (C) [ 31.047796] dump_stack_lvl+0x8c/0xd0 [ 31.048040] print_report+0x118/0x608 [ 31.048712] kasan_report+0xdc/0x128 [ 31.048893] __asan_report_load1_noabort+0x20/0x30 [ 31.049049] strlen+0xa8/0xb0 [ 31.049185] kasan_strings+0x418/0xb00 [ 31.049329] kunit_try_run_case+0x170/0x3f0 [ 31.049496] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.049925] kthread+0x328/0x630 [ 31.051061] ret_from_fork+0x10/0x20 [ 31.051326] [ 31.051500] Allocated by task 261: [ 31.051604] kasan_save_stack+0x3c/0x68 [ 31.051738] kasan_save_track+0x20/0x40 [ 31.052085] kasan_save_alloc_info+0x40/0x58 [ 31.052607] __kasan_kmalloc+0xd4/0xd8 [ 31.052763] __kmalloc_cache_noprof+0x15c/0x3c0 [ 31.052938] kasan_strings+0xc8/0xb00 [ 31.053397] kunit_try_run_case+0x170/0x3f0 [ 31.053793] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.054269] kthread+0x328/0x630 [ 31.054435] ret_from_fork+0x10/0x20 [ 31.054569] [ 31.054637] Freed by task 261: [ 31.054728] kasan_save_stack+0x3c/0x68 [ 31.055264] kasan_save_track+0x20/0x40 [ 31.055420] kasan_save_free_info+0x4c/0x78 [ 31.056040] __kasan_slab_free+0x6c/0x98 [ 31.056197] kfree+0x214/0x3c8 [ 31.056298] kasan_strings+0x24c/0xb00 [ 31.056394] kunit_try_run_case+0x170/0x3f0 [ 31.056508] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.056630] kthread+0x328/0x630 [ 31.056741] ret_from_fork+0x10/0x20 [ 31.056860] [ 31.056922] The buggy address belongs to the object at fff00000c77a2dc0 [ 31.056922] which belongs to the cache kmalloc-32 of size 32 [ 31.057116] The buggy address is located 16 bytes inside of [ 31.057116] freed 32-byte region [fff00000c77a2dc0, fff00000c77a2de0) [ 31.057314] [ 31.057384] The buggy address belongs to the physical page: [ 31.058770] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077a2 [ 31.059021] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 31.059264] page_type: f5(slab) [ 31.059502] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 31.060288] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000 [ 31.060459] page dumped because: kasan: bad access detected [ 31.060645] [ 31.060706] Memory state around the buggy address: [ 31.060896] fff00000c77a2c80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 31.061406] fff00000c77a2d00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 31.061596] >fff00000c77a2d80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 31.061827] ^ [ 31.062040] fff00000c77a2e00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 31.062267] fff00000c77a2e80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 31.062418] ==================================================================
[ 14.554595] ================================================================== [ 14.554993] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 14.555282] Read of size 1 at addr ffff888102714790 by task kunit_try_catch/278 [ 14.555734] [ 14.555832] CPU: 0 UID: 0 PID: 278 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc7 #1 PREEMPT(voluntary) [ 14.555881] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.555893] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.555915] Call Trace: [ 14.555930] <TASK> [ 14.555945] dump_stack_lvl+0x73/0xb0 [ 14.555973] print_report+0xd1/0x650 [ 14.555996] ? __virt_addr_valid+0x1db/0x2d0 [ 14.556018] ? strlen+0x8f/0xb0 [ 14.556036] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.556059] ? strlen+0x8f/0xb0 [ 14.556076] kasan_report+0x141/0x180 [ 14.556099] ? strlen+0x8f/0xb0 [ 14.556122] __asan_report_load1_noabort+0x18/0x20 [ 14.556143] strlen+0x8f/0xb0 [ 14.556161] kasan_strings+0x57b/0xe80 [ 14.556181] ? trace_hardirqs_on+0x37/0xe0 [ 14.556204] ? __pfx_kasan_strings+0x10/0x10 [ 14.556225] ? finish_task_switch.isra.0+0x153/0x700 [ 14.556248] ? __switch_to+0x5d9/0xf60 [ 14.556269] ? dequeue_task_fair+0x156/0x4e0 [ 14.556293] ? __schedule+0x10cc/0x2b30 [ 14.556331] ? __pfx_read_tsc+0x10/0x10 [ 14.556350] ? ktime_get_ts64+0x86/0x230 [ 14.556376] kunit_try_run_case+0x1a5/0x480 [ 14.556400] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.556442] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.556466] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.556488] ? __kthread_parkme+0x82/0x180 [ 14.556510] ? preempt_count_sub+0x50/0x80 [ 14.556534] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.556557] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.556580] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.556602] kthread+0x337/0x6f0 [ 14.556620] ? trace_preempt_on+0x20/0xc0 [ 14.556642] ? __pfx_kthread+0x10/0x10 [ 14.556660] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.556681] ? calculate_sigpending+0x7b/0xa0 [ 14.556702] ? __pfx_kthread+0x10/0x10 [ 14.556721] ret_from_fork+0x41/0x80 [ 14.556741] ? __pfx_kthread+0x10/0x10 [ 14.556759] ret_from_fork_asm+0x1a/0x30 [ 14.556791] </TASK> [ 14.556802] [ 14.564205] Allocated by task 278: [ 14.564339] kasan_save_stack+0x45/0x70 [ 14.564511] kasan_save_track+0x18/0x40 [ 14.564707] kasan_save_alloc_info+0x3b/0x50 [ 14.564922] __kasan_kmalloc+0xb7/0xc0 [ 14.565117] __kmalloc_cache_noprof+0x189/0x420 [ 14.565349] kasan_strings+0xc0/0xe80 [ 14.565565] kunit_try_run_case+0x1a5/0x480 [ 14.565772] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.566030] kthread+0x337/0x6f0 [ 14.566185] ret_from_fork+0x41/0x80 [ 14.566360] ret_from_fork_asm+0x1a/0x30 [ 14.566584] [ 14.566691] Freed by task 278: [ 14.566834] kasan_save_stack+0x45/0x70 [ 14.567037] kasan_save_track+0x18/0x40 [ 14.567202] kasan_save_free_info+0x3f/0x60 [ 14.567376] __kasan_slab_free+0x56/0x70 [ 14.567592] kfree+0x222/0x3f0 [ 14.567747] kasan_strings+0x2aa/0xe80 [ 14.567920] kunit_try_run_case+0x1a5/0x480 [ 14.568116] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.568334] kthread+0x337/0x6f0 [ 14.568526] ret_from_fork+0x41/0x80 [ 14.568680] ret_from_fork_asm+0x1a/0x30 [ 14.568879] [ 14.568956] The buggy address belongs to the object at ffff888102714780 [ 14.568956] which belongs to the cache kmalloc-32 of size 32 [ 14.569450] The buggy address is located 16 bytes inside of [ 14.569450] freed 32-byte region [ffff888102714780, ffff8881027147a0) [ 14.569916] [ 14.569999] The buggy address belongs to the physical page: [ 14.570239] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102714 [ 14.570590] flags: 0x200000000000000(node=0|zone=2) [ 14.570802] page_type: f5(slab) [ 14.570926] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.571161] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.571401] page dumped because: kasan: bad access detected [ 14.571592] [ 14.571662] Memory state around the buggy address: [ 14.571873] ffff888102714680: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.572191] ffff888102714700: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 14.572544] >ffff888102714780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.572860] ^ [ 14.573040] ffff888102714800: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.573292] ffff888102714880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.573537] ==================================================================