Date
July 24, 2025, 4:41 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 28.892457] ================================================================== [ 28.892788] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 28.893259] Read of size 1 at addr ffff888106048f50 by task kunit_try_catch/307 [ 28.893482] [ 28.893567] CPU: 1 UID: 0 PID: 307 Comm: kunit_try_catch Tainted: G B W N 6.16.0-rc7-next-20250724 #1 PREEMPT(voluntary) [ 28.893629] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 28.893642] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 28.893665] Call Trace: [ 28.893684] <TASK> [ 28.893703] dump_stack_lvl+0x73/0xb0 [ 28.893731] print_report+0xd1/0x640 [ 28.893754] ? __virt_addr_valid+0x1db/0x2d0 [ 28.893779] ? strnlen+0x73/0x80 [ 28.893798] ? kasan_complete_mode_report_info+0x64/0x200 [ 28.893824] ? strnlen+0x73/0x80 [ 28.893843] kasan_report+0x141/0x180 [ 28.893866] ? strnlen+0x73/0x80 [ 28.893889] __asan_report_load1_noabort+0x18/0x20 [ 28.893913] strnlen+0x73/0x80 [ 28.893934] kasan_strings+0x615/0xe80 [ 28.893953] ? trace_hardirqs_on+0x37/0xe0 [ 28.893977] ? __pfx_kasan_strings+0x10/0x10 [ 28.893997] ? finish_task_switch.isra.0+0x153/0x700 [ 28.894019] ? __switch_to+0x47/0xf80 [ 28.894044] ? __schedule+0x10da/0x2b60 [ 28.894069] ? __pfx_read_tsc+0x10/0x10 [ 28.894090] ? ktime_get_ts64+0x86/0x230 [ 28.894114] kunit_try_run_case+0x1a5/0x480 [ 28.894139] ? __pfx_kunit_try_run_case+0x10/0x10 [ 28.894161] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 28.894186] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 28.894210] ? __kthread_parkme+0x82/0x180 [ 28.894230] ? preempt_count_sub+0x50/0x80 [ 28.894252] ? __pfx_kunit_try_run_case+0x10/0x10 [ 28.894275] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 28.894298] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 28.894321] kthread+0x337/0x6f0 [ 28.894340] ? trace_preempt_on+0x20/0xc0 [ 28.894361] ? __pfx_kthread+0x10/0x10 [ 28.894381] ? _raw_spin_unlock_irq+0x47/0x80 [ 28.894440] ? calculate_sigpending+0x7b/0xa0 [ 28.894463] ? __pfx_kthread+0x10/0x10 [ 28.894484] ret_from_fork+0x116/0x1d0 [ 28.894562] ? __pfx_kthread+0x10/0x10 [ 28.894594] ret_from_fork_asm+0x1a/0x30 [ 28.894627] </TASK> [ 28.894638] [ 28.903121] Allocated by task 307: [ 28.903315] kasan_save_stack+0x45/0x70 [ 28.903740] kasan_save_track+0x18/0x40 [ 28.903926] kasan_save_alloc_info+0x3b/0x50 [ 28.904128] __kasan_kmalloc+0xb7/0xc0 [ 28.904308] __kmalloc_cache_noprof+0x189/0x420 [ 28.904469] kasan_strings+0xc0/0xe80 [ 28.904603] kunit_try_run_case+0x1a5/0x480 [ 28.904745] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 28.904913] kthread+0x337/0x6f0 [ 28.905389] ret_from_fork+0x116/0x1d0 [ 28.906745] ret_from_fork_asm+0x1a/0x30 [ 28.907418] [ 28.907518] Freed by task 307: [ 28.907688] kasan_save_stack+0x45/0x70 [ 28.908259] kasan_save_track+0x18/0x40 [ 28.908449] kasan_save_free_info+0x3f/0x60 [ 28.908664] __kasan_slab_free+0x56/0x70 [ 28.909480] kfree+0x222/0x3f0 [ 28.909648] kasan_strings+0x2aa/0xe80 [ 28.910109] kunit_try_run_case+0x1a5/0x480 [ 28.910745] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 28.911485] kthread+0x337/0x6f0 [ 28.912245] ret_from_fork+0x116/0x1d0 [ 28.912496] ret_from_fork_asm+0x1a/0x30 [ 28.913089] [ 28.913478] The buggy address belongs to the object at ffff888106048f40 [ 28.913478] which belongs to the cache kmalloc-32 of size 32 [ 28.914454] The buggy address is located 16 bytes inside of [ 28.914454] freed 32-byte region [ffff888106048f40, ffff888106048f60) [ 28.915066] [ 28.915236] The buggy address belongs to the physical page: [ 28.915478] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106048 [ 28.915874] flags: 0x200000000000000(node=0|zone=2) [ 28.916582] page_type: f5(slab) [ 28.916908] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 28.917435] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000 [ 28.918130] page dumped because: kasan: bad access detected [ 28.918542] [ 28.918653] Memory state around the buggy address: [ 28.919199] ffff888106048e00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 28.919507] ffff888106048e80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 28.920080] >ffff888106048f00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 28.920384] ^ [ 28.920774] ffff888106048f80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 28.921184] ffff888106049000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.921494] ==================================================================