Date
June 25, 2025, 8:08 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 23.788598] ================================================================== [ 23.789250] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 23.789521] Read of size 1 at addr ffff888102596f90 by task kunit_try_catch/288 [ 23.789814] [ 23.789900] CPU: 0 UID: 0 PID: 288 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250625 #1 PREEMPT(voluntary) [ 23.789965] Tainted: [B]=BAD_PAGE, [N]=TEST [ 23.789978] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 23.790000] Call Trace: [ 23.790020] <TASK> [ 23.790040] dump_stack_lvl+0x73/0xb0 [ 23.790066] print_report+0xd1/0x650 [ 23.790087] ? __virt_addr_valid+0x1db/0x2d0 [ 23.790110] ? strlen+0x8f/0xb0 [ 23.790128] ? kasan_complete_mode_report_info+0x64/0x200 [ 23.790153] ? strlen+0x8f/0xb0 [ 23.790172] kasan_report+0x141/0x180 [ 23.790191] ? strlen+0x8f/0xb0 [ 23.790214] __asan_report_load1_noabort+0x18/0x20 [ 23.790236] strlen+0x8f/0xb0 [ 23.790255] kasan_strings+0x57b/0xe80 [ 23.790274] ? trace_hardirqs_on+0x37/0xe0 [ 23.790296] ? __pfx_kasan_strings+0x10/0x10 [ 23.790314] ? finish_task_switch.isra.0+0x153/0x700 [ 23.790335] ? __switch_to+0x47/0xf50 [ 23.790359] ? __schedule+0x10cc/0x2b60 [ 23.790436] ? __pfx_read_tsc+0x10/0x10 [ 23.790458] ? ktime_get_ts64+0x86/0x230 [ 23.790483] kunit_try_run_case+0x1a5/0x480 [ 23.790509] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.790532] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 23.790553] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 23.790577] ? __kthread_parkme+0x82/0x180 [ 23.790596] ? preempt_count_sub+0x50/0x80 [ 23.790620] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.790643] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.790665] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 23.790688] kthread+0x337/0x6f0 [ 23.790706] ? trace_preempt_on+0x20/0xc0 [ 23.790728] ? __pfx_kthread+0x10/0x10 [ 23.790746] ? _raw_spin_unlock_irq+0x47/0x80 [ 23.790768] ? calculate_sigpending+0x7b/0xa0 [ 23.790791] ? __pfx_kthread+0x10/0x10 [ 23.790843] ret_from_fork+0x116/0x1d0 [ 23.790862] ? __pfx_kthread+0x10/0x10 [ 23.790882] ret_from_fork_asm+0x1a/0x30 [ 23.790911] </TASK> [ 23.790921] [ 23.798884] Allocated by task 288: [ 23.799031] kasan_save_stack+0x45/0x70 [ 23.799236] kasan_save_track+0x18/0x40 [ 23.799427] kasan_save_alloc_info+0x3b/0x50 [ 23.799628] __kasan_kmalloc+0xb7/0xc0 [ 23.799790] __kmalloc_cache_noprof+0x189/0x420 [ 23.799983] kasan_strings+0xc0/0xe80 [ 23.800184] kunit_try_run_case+0x1a5/0x480 [ 23.800345] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.800513] kthread+0x337/0x6f0 [ 23.800626] ret_from_fork+0x116/0x1d0 [ 23.800794] ret_from_fork_asm+0x1a/0x30 [ 23.800988] [ 23.801408] Freed by task 288: [ 23.801646] kasan_save_stack+0x45/0x70 [ 23.801903] kasan_save_track+0x18/0x40 [ 23.802114] kasan_save_free_info+0x3f/0x60 [ 23.802259] __kasan_slab_free+0x56/0x70 [ 23.802385] kfree+0x222/0x3f0 [ 23.802495] kasan_strings+0x2aa/0xe80 [ 23.802618] kunit_try_run_case+0x1a5/0x480 [ 23.802782] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.803090] kthread+0x337/0x6f0 [ 23.803254] ret_from_fork+0x116/0x1d0 [ 23.803478] ret_from_fork_asm+0x1a/0x30 [ 23.803669] [ 23.803759] The buggy address belongs to the object at ffff888102596f80 [ 23.803759] which belongs to the cache kmalloc-32 of size 32 [ 23.804347] The buggy address is located 16 bytes inside of [ 23.804347] freed 32-byte region [ffff888102596f80, ffff888102596fa0) [ 23.804795] [ 23.804957] The buggy address belongs to the physical page: [ 23.805125] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102596 [ 23.805654] flags: 0x200000000000000(node=0|zone=2) [ 23.805919] page_type: f5(slab) [ 23.806094] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 23.806353] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000 [ 23.806569] page dumped because: kasan: bad access detected [ 23.806727] [ 23.807230] Memory state around the buggy address: [ 23.807463] ffff888102596e80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 23.807806] ffff888102596f00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 23.808025] >ffff888102596f80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 23.808767] ^ [ 23.809043] ffff888102597000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.809316] ffff888102597080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.809538] ==================================================================