Date
July 9, 2025, 11:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.864053] ================================================================== [ 18.864129] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 18.864178] Read of size 1 at addr fff00000c6460590 by task kunit_try_catch/259 [ 18.864547] [ 18.864638] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 18.865100] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.865180] Hardware name: linux,dummy-virt (DT) [ 18.865319] Call trace: [ 18.865367] show_stack+0x20/0x38 (C) [ 18.865421] dump_stack_lvl+0x8c/0xd0 [ 18.865555] print_report+0x118/0x608 [ 18.865629] kasan_report+0xdc/0x128 [ 18.865983] __asan_report_load1_noabort+0x20/0x30 [ 18.866059] strnlen+0x80/0x88 [ 18.866123] kasan_strings+0x478/0xb00 [ 18.866168] kunit_try_run_case+0x170/0x3f0 [ 18.866625] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.866705] kthread+0x328/0x630 [ 18.866796] ret_from_fork+0x10/0x20 [ 18.866850] [ 18.866908] Allocated by task 259: [ 18.866978] kasan_save_stack+0x3c/0x68 [ 18.867072] kasan_save_track+0x20/0x40 [ 18.867312] kasan_save_alloc_info+0x40/0x58 [ 18.867485] __kasan_kmalloc+0xd4/0xd8 [ 18.867602] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.867663] kasan_strings+0xc8/0xb00 [ 18.867752] kunit_try_run_case+0x170/0x3f0 [ 18.868105] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.868292] kthread+0x328/0x630 [ 18.868478] ret_from_fork+0x10/0x20 [ 18.868561] [ 18.868585] Freed by task 259: [ 18.868933] kasan_save_stack+0x3c/0x68 [ 18.869171] kasan_save_track+0x20/0x40 [ 18.869321] kasan_save_free_info+0x4c/0x78 [ 18.869424] __kasan_slab_free+0x6c/0x98 [ 18.869847] kfree+0x214/0x3c8 [ 18.870010] kasan_strings+0x24c/0xb00 [ 18.870158] kunit_try_run_case+0x170/0x3f0 [ 18.870268] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.870344] kthread+0x328/0x630 [ 18.870379] ret_from_fork+0x10/0x20 [ 18.870538] [ 18.870732] The buggy address belongs to the object at fff00000c6460580 [ 18.870732] which belongs to the cache kmalloc-32 of size 32 [ 18.870894] The buggy address is located 16 bytes inside of [ 18.870894] freed 32-byte region [fff00000c6460580, fff00000c64605a0) [ 18.871095] [ 18.871150] The buggy address belongs to the physical page: [ 18.871565] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106460 [ 18.871649] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.871812] page_type: f5(slab) [ 18.872019] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 18.872190] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 18.872277] page dumped because: kasan: bad access detected [ 18.872332] [ 18.872352] Memory state around the buggy address: [ 18.872388] fff00000c6460480: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 18.872801] fff00000c6460500: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 18.873003] >fff00000c6460580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 18.873136] ^ [ 18.873182] fff00000c6460600: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 18.873399] fff00000c6460680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 18.873690] ==================================================================
[ 14.525193] ================================================================== [ 14.525492] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 14.525777] Read of size 1 at addr ffff8881032060d0 by task kunit_try_catch/276 [ 14.526664] [ 14.526790] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 14.526833] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.526845] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.526866] Call Trace: [ 14.526881] <TASK> [ 14.526898] dump_stack_lvl+0x73/0xb0 [ 14.526929] print_report+0xd1/0x650 [ 14.526951] ? __virt_addr_valid+0x1db/0x2d0 [ 14.527126] ? strnlen+0x73/0x80 [ 14.527146] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.527170] ? strnlen+0x73/0x80 [ 14.527191] kasan_report+0x141/0x180 [ 14.527215] ? strnlen+0x73/0x80 [ 14.527237] __asan_report_load1_noabort+0x18/0x20 [ 14.527262] strnlen+0x73/0x80 [ 14.527281] kasan_strings+0x615/0xe80 [ 14.527300] ? trace_hardirqs_on+0x37/0xe0 [ 14.527323] ? __pfx_kasan_strings+0x10/0x10 [ 14.527344] ? finish_task_switch.isra.0+0x153/0x700 [ 14.527367] ? __switch_to+0x47/0xf50 [ 14.527392] ? __schedule+0x10cc/0x2b60 [ 14.527414] ? __pfx_read_tsc+0x10/0x10 [ 14.527435] ? ktime_get_ts64+0x86/0x230 [ 14.527458] kunit_try_run_case+0x1a5/0x480 [ 14.527482] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.527506] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.527530] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.527555] ? __kthread_parkme+0x82/0x180 [ 14.527575] ? preempt_count_sub+0x50/0x80 [ 14.527599] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.527623] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.527648] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.527674] kthread+0x337/0x6f0 [ 14.527693] ? trace_preempt_on+0x20/0xc0 [ 14.527727] ? __pfx_kthread+0x10/0x10 [ 14.527747] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.527770] ? calculate_sigpending+0x7b/0xa0 [ 14.527793] ? __pfx_kthread+0x10/0x10 [ 14.527815] ret_from_fork+0x116/0x1d0 [ 14.527833] ? __pfx_kthread+0x10/0x10 [ 14.527854] ret_from_fork_asm+0x1a/0x30 [ 14.527884] </TASK> [ 14.527895] [ 14.539047] Allocated by task 276: [ 14.539212] kasan_save_stack+0x45/0x70 [ 14.539414] kasan_save_track+0x18/0x40 [ 14.539604] kasan_save_alloc_info+0x3b/0x50 [ 14.539828] __kasan_kmalloc+0xb7/0xc0 [ 14.540010] __kmalloc_cache_noprof+0x189/0x420 [ 14.540621] kasan_strings+0xc0/0xe80 [ 14.540812] kunit_try_run_case+0x1a5/0x480 [ 14.541228] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.541603] kthread+0x337/0x6f0 [ 14.541891] ret_from_fork+0x116/0x1d0 [ 14.542210] ret_from_fork_asm+0x1a/0x30 [ 14.542541] [ 14.542643] Freed by task 276: [ 14.542947] kasan_save_stack+0x45/0x70 [ 14.543274] kasan_save_track+0x18/0x40 [ 14.543788] kasan_save_free_info+0x3f/0x60 [ 14.544003] __kasan_slab_free+0x56/0x70 [ 14.544402] kfree+0x222/0x3f0 [ 14.544569] kasan_strings+0x2aa/0xe80 [ 14.544775] kunit_try_run_case+0x1a5/0x480 [ 14.544979] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.545482] kthread+0x337/0x6f0 [ 14.545613] ret_from_fork+0x116/0x1d0 [ 14.545985] ret_from_fork_asm+0x1a/0x30 [ 14.546325] [ 14.546430] The buggy address belongs to the object at ffff8881032060c0 [ 14.546430] which belongs to the cache kmalloc-32 of size 32 [ 14.547268] The buggy address is located 16 bytes inside of [ 14.547268] freed 32-byte region [ffff8881032060c0, ffff8881032060e0) [ 14.547854] [ 14.547937] The buggy address belongs to the physical page: [ 14.548605] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103206 [ 14.548976] flags: 0x200000000000000(node=0|zone=2) [ 14.549436] page_type: f5(slab) [ 14.549685] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.550099] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.550566] page dumped because: kasan: bad access detected [ 14.550875] [ 14.550975] Memory state around the buggy address: [ 14.551294] ffff888103205f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 14.551597] ffff888103206000: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.551909] >ffff888103206080: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.552505] ^ [ 14.552741] ffff888103206100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.553361] ffff888103206180: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.553786] ==================================================================