Date
July 22, 2025, 5:13 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 32.637694] ================================================================== [ 32.637750] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 32.637805] Read of size 1 at addr fff00000c9227a10 by task kunit_try_catch/290 [ 32.637889] [ 32.637921] CPU: 1 UID: 0 PID: 290 Comm: kunit_try_catch Tainted: G B W N 6.16.0-rc7-next-20250722 #1 PREEMPT [ 32.638018] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 32.638051] Hardware name: linux,dummy-virt (DT) [ 32.638084] Call trace: [ 32.638107] show_stack+0x20/0x38 (C) [ 32.638163] dump_stack_lvl+0x8c/0xd0 [ 32.638210] print_report+0x118/0x5e8 [ 32.638258] kasan_report+0xdc/0x128 [ 32.638314] __asan_report_load1_noabort+0x20/0x30 [ 32.638367] strlen+0xa8/0xb0 [ 32.638412] kasan_strings+0x418/0xb00 [ 32.638460] kunit_try_run_case+0x170/0x3f0 [ 32.638508] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.638570] kthread+0x328/0x630 [ 32.638616] ret_from_fork+0x10/0x20 [ 32.638663] [ 32.638683] Allocated by task 290: [ 32.638719] kasan_save_stack+0x3c/0x68 [ 32.638760] kasan_save_track+0x20/0x40 [ 32.638797] kasan_save_alloc_info+0x40/0x58 [ 32.639465] __kasan_kmalloc+0xd4/0xd8 [ 32.639529] __kmalloc_cache_noprof+0x16c/0x3c0 [ 32.639610] kasan_strings+0xc8/0xb00 [ 32.639658] kunit_try_run_case+0x170/0x3f0 [ 32.639702] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.640113] kthread+0x328/0x630 [ 32.640202] ret_from_fork+0x10/0x20 [ 32.640245] [ 32.640268] Freed by task 290: [ 32.640522] kasan_save_stack+0x3c/0x68 [ 32.640589] kasan_save_track+0x20/0x40 [ 32.640872] kasan_save_free_info+0x4c/0x78 [ 32.640967] __kasan_slab_free+0x6c/0x98 [ 32.641260] kfree+0x214/0x3c8 [ 32.641358] kasan_strings+0x24c/0xb00 [ 32.641607] kunit_try_run_case+0x170/0x3f0 [ 32.641683] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.642016] kthread+0x328/0x630 [ 32.642130] ret_from_fork+0x10/0x20 [ 32.642214] [ 32.642297] The buggy address belongs to the object at fff00000c9227a00 [ 32.642297] which belongs to the cache kmalloc-32 of size 32 [ 32.642382] The buggy address is located 16 bytes inside of [ 32.642382] freed 32-byte region [fff00000c9227a00, fff00000c9227a20) [ 32.642538] [ 32.642608] The buggy address belongs to the physical page: [ 32.642703] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109227 [ 32.642863] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 32.642932] page_type: f5(slab) [ 32.643314] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 32.643440] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 32.643518] page dumped because: kasan: bad access detected [ 32.643633] [ 32.643656] Memory state around the buggy address: [ 32.643689] fff00000c9227900: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 32.644009] fff00000c9227980: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 32.644105] >fff00000c9227a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 32.644205] ^ [ 32.644291] fff00000c9227a80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 32.644572] fff00000c9227b00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 32.644690] ==================================================================
[ 27.035287] ================================================================== [ 27.035820] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 27.036038] Read of size 1 at addr ffff888106006150 by task kunit_try_catch/307 [ 27.036559] [ 27.036673] CPU: 1 UID: 0 PID: 307 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7-next-20250722 #1 PREEMPT(voluntary) [ 27.036719] Tainted: [B]=BAD_PAGE, [N]=TEST [ 27.036731] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 27.036753] Call Trace: [ 27.036767] <TASK> [ 27.036781] dump_stack_lvl+0x73/0xb0 [ 27.036808] print_report+0xd1/0x640 [ 27.036844] ? __virt_addr_valid+0x1db/0x2d0 [ 27.036874] ? strlen+0x8f/0xb0 [ 27.036894] ? kasan_complete_mode_report_info+0x64/0x200 [ 27.036920] ? strlen+0x8f/0xb0 [ 27.036941] kasan_report+0x141/0x180 [ 27.036964] ? strlen+0x8f/0xb0 [ 27.036989] __asan_report_load1_noabort+0x18/0x20 [ 27.037013] strlen+0x8f/0xb0 [ 27.037035] kasan_strings+0x57b/0xe80 [ 27.037056] ? trace_hardirqs_on+0x37/0xe0 [ 27.037080] ? __pfx_kasan_strings+0x10/0x10 [ 27.037101] ? finish_task_switch.isra.0+0x153/0x700 [ 27.037123] ? __switch_to+0x47/0xf80 [ 27.037149] ? __schedule+0x10da/0x2b60 [ 27.037185] ? __pfx_read_tsc+0x10/0x10 [ 27.037207] ? ktime_get_ts64+0x86/0x230 [ 27.037231] kunit_try_run_case+0x1a5/0x480 [ 27.037257] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.037280] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 27.037306] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 27.037332] ? __kthread_parkme+0x82/0x180 [ 27.037353] ? preempt_count_sub+0x50/0x80 [ 27.037376] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.037400] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.037423] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 27.037448] kthread+0x337/0x6f0 [ 27.037510] ? trace_preempt_on+0x20/0xc0 [ 27.037534] ? __pfx_kthread+0x10/0x10 [ 27.037554] ? _raw_spin_unlock_irq+0x47/0x80 [ 27.037578] ? calculate_sigpending+0x7b/0xa0 [ 27.037602] ? __pfx_kthread+0x10/0x10 [ 27.037624] ret_from_fork+0x116/0x1d0 [ 27.037644] ? __pfx_kthread+0x10/0x10 [ 27.037665] ret_from_fork_asm+0x1a/0x30 [ 27.037696] </TASK> [ 27.037707] [ 27.045601] Allocated by task 307: [ 27.045784] kasan_save_stack+0x45/0x70 [ 27.045984] kasan_save_track+0x18/0x40 [ 27.046182] kasan_save_alloc_info+0x3b/0x50 [ 27.046352] __kasan_kmalloc+0xb7/0xc0 [ 27.046697] __kmalloc_cache_noprof+0x189/0x420 [ 27.046954] kasan_strings+0xc0/0xe80 [ 27.047133] kunit_try_run_case+0x1a5/0x480 [ 27.047326] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.047721] kthread+0x337/0x6f0 [ 27.047890] ret_from_fork+0x116/0x1d0 [ 27.048080] ret_from_fork_asm+0x1a/0x30 [ 27.048293] [ 27.048360] Freed by task 307: [ 27.048533] kasan_save_stack+0x45/0x70 [ 27.048733] kasan_save_track+0x18/0x40 [ 27.048948] kasan_save_free_info+0x3f/0x60 [ 27.049125] __kasan_slab_free+0x56/0x70 [ 27.049342] kfree+0x222/0x3f0 [ 27.049574] kasan_strings+0x2aa/0xe80 [ 27.049749] kunit_try_run_case+0x1a5/0x480 [ 27.049958] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.050148] kthread+0x337/0x6f0 [ 27.050322] ret_from_fork+0x116/0x1d0 [ 27.050557] ret_from_fork_asm+0x1a/0x30 [ 27.050706] [ 27.050802] The buggy address belongs to the object at ffff888106006140 [ 27.050802] which belongs to the cache kmalloc-32 of size 32 [ 27.051401] The buggy address is located 16 bytes inside of [ 27.051401] freed 32-byte region [ffff888106006140, ffff888106006160) [ 27.052077] [ 27.052188] The buggy address belongs to the physical page: [ 27.052426] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106006 [ 27.052789] flags: 0x200000000000000(node=0|zone=2) [ 27.053019] page_type: f5(slab) [ 27.053214] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 27.053601] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 27.053889] page dumped because: kasan: bad access detected [ 27.054065] [ 27.054132] Memory state around the buggy address: [ 27.054288] ffff888106006000: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.054506] ffff888106006080: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.054736] >ffff888106006100: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 27.055122] ^ [ 27.055734] ffff888106006180: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.056082] ffff888106006200: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 27.057182] ==================================================================