Date
June 19, 2025, 12:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 33.358722] ================================================================== [ 33.358847] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 33.359001] Read of size 1 at addr fff00000c76d03d0 by task kunit_try_catch/270 [ 33.359151] [ 33.359308] CPU: 0 UID: 0 PID: 270 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250619 #1 PREEMPT [ 33.359589] Tainted: [B]=BAD_PAGE, [N]=TEST [ 33.359680] Hardware name: linux,dummy-virt (DT) [ 33.359777] Call trace: [ 33.359841] show_stack+0x20/0x38 (C) [ 33.359994] dump_stack_lvl+0x8c/0xd0 [ 33.360121] print_report+0x118/0x608 [ 33.360249] kasan_report+0xdc/0x128 [ 33.360371] __asan_report_load1_noabort+0x20/0x30 [ 33.360509] strlen+0xa8/0xb0 [ 33.360620] kasan_strings+0x418/0xb00 [ 33.360744] kunit_try_run_case+0x170/0x3f0 [ 33.360881] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 33.361033] kthread+0x328/0x630 [ 33.361148] ret_from_fork+0x10/0x20 [ 33.361280] [ 33.362002] Allocated by task 270: [ 33.362097] kasan_save_stack+0x3c/0x68 [ 33.362204] kasan_save_track+0x20/0x40 [ 33.362581] kasan_save_alloc_info+0x40/0x58 [ 33.362680] __kasan_kmalloc+0xd4/0xd8 [ 33.362755] __kmalloc_cache_noprof+0x16c/0x3c0 [ 33.362847] kasan_strings+0xc8/0xb00 [ 33.363557] kunit_try_run_case+0x170/0x3f0 [ 33.363701] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 33.363879] kthread+0x328/0x630 [ 33.363988] ret_from_fork+0x10/0x20 [ 33.364101] [ 33.364177] Freed by task 270: [ 33.364301] kasan_save_stack+0x3c/0x68 [ 33.364469] kasan_save_track+0x20/0x40 [ 33.364577] kasan_save_free_info+0x4c/0x78 [ 33.364710] __kasan_slab_free+0x6c/0x98 [ 33.364897] kfree+0x214/0x3c8 [ 33.365036] kasan_strings+0x24c/0xb00 [ 33.365130] kunit_try_run_case+0x170/0x3f0 [ 33.365665] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 33.365810] kthread+0x328/0x630 [ 33.365912] ret_from_fork+0x10/0x20 [ 33.365998] [ 33.366042] The buggy address belongs to the object at fff00000c76d03c0 [ 33.366042] which belongs to the cache kmalloc-32 of size 32 [ 33.366177] The buggy address is located 16 bytes inside of [ 33.366177] freed 32-byte region [fff00000c76d03c0, fff00000c76d03e0) [ 33.366709] [ 33.366898] The buggy address belongs to the physical page: [ 33.367114] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1076d0 [ 33.367528] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 33.367766] page_type: f5(slab) [ 33.368067] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 33.368358] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 33.368489] page dumped because: kasan: bad access detected [ 33.368581] [ 33.368838] Memory state around the buggy address: [ 33.369323] fff00000c76d0280: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 33.369574] fff00000c76d0300: 00 00 00 04 fc fc fc fc 00 00 07 fc fc fc fc fc [ 33.369688] >fff00000c76d0380: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 33.369802] ^ [ 33.369910] fff00000c76d0400: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 33.370024] fff00000c76d0480: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 33.370169] ==================================================================
[ 29.403747] ================================================================== [ 29.404897] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 29.405547] Read of size 1 at addr ffff8881024dbb10 by task kunit_try_catch/288 [ 29.406232] [ 29.406460] CPU: 1 UID: 0 PID: 288 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250619 #1 PREEMPT(voluntary) [ 29.406566] Tainted: [B]=BAD_PAGE, [N]=TEST [ 29.406593] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 29.406640] Call Trace: [ 29.406685] <TASK> [ 29.406727] dump_stack_lvl+0x73/0xb0 [ 29.406799] print_report+0xd1/0x650 [ 29.406846] ? __virt_addr_valid+0x1db/0x2d0 [ 29.406894] ? strlen+0x8f/0xb0 [ 29.406949] ? kasan_complete_mode_report_info+0x64/0x200 [ 29.406998] ? strlen+0x8f/0xb0 [ 29.407038] kasan_report+0x141/0x180 [ 29.407084] ? strlen+0x8f/0xb0 [ 29.407148] __asan_report_load1_noabort+0x18/0x20 [ 29.407200] strlen+0x8f/0xb0 [ 29.407245] kasan_strings+0x57b/0xe80 [ 29.407287] ? trace_hardirqs_on+0x37/0xe0 [ 29.407333] ? __pfx_kasan_strings+0x10/0x10 [ 29.407372] ? finish_task_switch.isra.0+0x153/0x700 [ 29.407417] ? __switch_to+0x47/0xf50 [ 29.407472] ? __schedule+0x10cc/0x2b60 [ 29.407523] ? __pfx_read_tsc+0x10/0x10 [ 29.407568] ? ktime_get_ts64+0x86/0x230 [ 29.407627] kunit_try_run_case+0x1a5/0x480 [ 29.407682] ? __pfx_kunit_try_run_case+0x10/0x10 [ 29.407723] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 29.407769] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 29.407806] ? __kthread_parkme+0x82/0x180 [ 29.407842] ? preempt_count_sub+0x50/0x80 [ 29.407886] ? __pfx_kunit_try_run_case+0x10/0x10 [ 29.407926] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 29.407972] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 29.408018] kthread+0x337/0x6f0 [ 29.408052] ? trace_preempt_on+0x20/0xc0 [ 29.408116] ? __pfx_kthread+0x10/0x10 [ 29.408163] ? _raw_spin_unlock_irq+0x47/0x80 [ 29.408207] ? calculate_sigpending+0x7b/0xa0 [ 29.408254] ? __pfx_kthread+0x10/0x10 [ 29.408297] ret_from_fork+0x116/0x1d0 [ 29.408333] ? __pfx_kthread+0x10/0x10 [ 29.408379] ret_from_fork_asm+0x1a/0x30 [ 29.408445] </TASK> [ 29.408469] [ 29.419436] Allocated by task 288: [ 29.419729] kasan_save_stack+0x45/0x70 [ 29.420860] kasan_save_track+0x18/0x40 [ 29.421079] kasan_save_alloc_info+0x3b/0x50 [ 29.421292] __kasan_kmalloc+0xb7/0xc0 [ 29.421465] __kmalloc_cache_noprof+0x189/0x420 [ 29.421830] kasan_strings+0xc0/0xe80 [ 29.422322] kunit_try_run_case+0x1a5/0x480 [ 29.422667] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 29.423042] kthread+0x337/0x6f0 [ 29.423200] ret_from_fork+0x116/0x1d0 [ 29.423368] ret_from_fork_asm+0x1a/0x30 [ 29.423546] [ 29.423653] Freed by task 288: [ 29.423801] kasan_save_stack+0x45/0x70 [ 29.423976] kasan_save_track+0x18/0x40 [ 29.424249] kasan_save_free_info+0x3f/0x60 [ 29.424576] __kasan_slab_free+0x56/0x70 [ 29.424912] kfree+0x222/0x3f0 [ 29.425326] kasan_strings+0x2aa/0xe80 [ 29.425643] kunit_try_run_case+0x1a5/0x480 [ 29.426113] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 29.426521] kthread+0x337/0x6f0 [ 29.426805] ret_from_fork+0x116/0x1d0 [ 29.427164] ret_from_fork_asm+0x1a/0x30 [ 29.427426] [ 29.427533] The buggy address belongs to the object at ffff8881024dbb00 [ 29.427533] which belongs to the cache kmalloc-32 of size 32 [ 29.427951] The buggy address is located 16 bytes inside of [ 29.427951] freed 32-byte region [ffff8881024dbb00, ffff8881024dbb20) [ 29.428824] [ 29.429118] The buggy address belongs to the physical page: [ 29.429545] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1024db [ 29.430864] flags: 0x200000000000000(node=0|zone=2) [ 29.431402] page_type: f5(slab) [ 29.431581] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 29.431861] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 29.432282] page dumped because: kasan: bad access detected [ 29.432682] [ 29.432835] Memory state around the buggy address: [ 29.433477] ffff8881024dba00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 29.434023] ffff8881024dba80: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 29.434545] >ffff8881024dbb00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 29.434844] ^ [ 29.435226] ffff8881024dbb80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 29.435602] ffff8881024dbc00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 29.435859] ==================================================================