Date
July 17, 2025, 10:12 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 27.633022] ================================================================== [ 27.633774] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 27.634536] Read of size 1 at addr ffff88810618c690 by task kunit_try_catch/308 [ 27.635222] [ 27.635369] CPU: 0 UID: 0 PID: 308 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250717 #1 PREEMPT(voluntary) [ 27.635429] Tainted: [B]=BAD_PAGE, [N]=TEST [ 27.635441] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 27.635463] Call Trace: [ 27.635478] <TASK> [ 27.635494] dump_stack_lvl+0x73/0xb0 [ 27.635523] print_report+0xd1/0x610 [ 27.635545] ? __virt_addr_valid+0x1db/0x2d0 [ 27.635567] ? strnlen+0x73/0x80 [ 27.635585] ? kasan_complete_mode_report_info+0x64/0x200 [ 27.635610] ? strnlen+0x73/0x80 [ 27.635627] kasan_report+0x141/0x180 [ 27.635649] ? strnlen+0x73/0x80 [ 27.635671] __asan_report_load1_noabort+0x18/0x20 [ 27.635694] strnlen+0x73/0x80 [ 27.635713] kasan_strings+0x615/0xe80 [ 27.635731] ? trace_hardirqs_on+0x37/0xe0 [ 27.635755] ? __pfx_kasan_strings+0x10/0x10 [ 27.635775] ? finish_task_switch.isra.0+0x153/0x700 [ 27.635795] ? __switch_to+0x47/0xf80 [ 27.635820] ? __schedule+0x10c6/0x2b60 [ 27.635842] ? __pfx_read_tsc+0x10/0x10 [ 27.635862] ? ktime_get_ts64+0x86/0x230 [ 27.635886] kunit_try_run_case+0x1a5/0x480 [ 27.635909] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.635932] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 27.635954] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 27.635976] ? __kthread_parkme+0x82/0x180 [ 27.635999] ? preempt_count_sub+0x50/0x80 [ 27.636021] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.636044] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.636066] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 27.636100] kthread+0x337/0x6f0 [ 27.636119] ? trace_preempt_on+0x20/0xc0 [ 27.636141] ? __pfx_kthread+0x10/0x10 [ 27.636160] ? _raw_spin_unlock_irq+0x47/0x80 [ 27.636181] ? calculate_sigpending+0x7b/0xa0 [ 27.636204] ? __pfx_kthread+0x10/0x10 [ 27.636225] ret_from_fork+0x116/0x1d0 [ 27.636269] ? __pfx_kthread+0x10/0x10 [ 27.636300] ret_from_fork_asm+0x1a/0x30 [ 27.636355] </TASK> [ 27.636366] [ 27.646621] Allocated by task 308: [ 27.646934] kasan_save_stack+0x45/0x70 [ 27.647383] kasan_save_track+0x18/0x40 [ 27.647757] kasan_save_alloc_info+0x3b/0x50 [ 27.648153] __kasan_kmalloc+0xb7/0xc0 [ 27.648511] __kmalloc_cache_noprof+0x189/0x420 [ 27.648810] kasan_strings+0xc0/0xe80 [ 27.648936] kunit_try_run_case+0x1a5/0x480 [ 27.649069] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.649245] kthread+0x337/0x6f0 [ 27.649649] ret_from_fork+0x116/0x1d0 [ 27.650010] ret_from_fork_asm+0x1a/0x30 [ 27.650470] [ 27.650644] Freed by task 308: [ 27.650935] kasan_save_stack+0x45/0x70 [ 27.651351] kasan_save_track+0x18/0x40 [ 27.651845] kasan_save_free_info+0x3f/0x60 [ 27.652261] __kasan_slab_free+0x56/0x70 [ 27.652735] kfree+0x222/0x3f0 [ 27.652851] kasan_strings+0x2aa/0xe80 [ 27.652972] kunit_try_run_case+0x1a5/0x480 [ 27.653117] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.653647] kthread+0x337/0x6f0 [ 27.654010] ret_from_fork+0x116/0x1d0 [ 27.654473] ret_from_fork_asm+0x1a/0x30 [ 27.654848] [ 27.654999] The buggy address belongs to the object at ffff88810618c680 [ 27.654999] which belongs to the cache kmalloc-32 of size 32 [ 27.656200] The buggy address is located 16 bytes inside of [ 27.656200] freed 32-byte region [ffff88810618c680, ffff88810618c6a0) [ 27.657185] [ 27.657400] The buggy address belongs to the physical page: [ 27.657565] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10618c [ 27.657801] flags: 0x200000000000000(node=0|zone=2) [ 27.657962] page_type: f5(slab) [ 27.658075] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 27.658353] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 27.658857] page dumped because: kasan: bad access detected [ 27.659089] [ 27.659155] Memory state around the buggy address: [ 27.659298] ffff88810618c580: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.659503] ffff88810618c600: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.659701] >ffff88810618c680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.659901] ^ [ 27.660018] ffff88810618c700: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.660226] ffff88810618c780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.660423] ==================================================================