Hay
Date
July 3, 2025, 6:13 p.m.

Environment
qemu-x86_64

[   10.817101] ==================================================================
[   10.817619] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0
[   10.818291] Read of size 1 at addr ffff888101745dff by task kunit_try_catch/156
[   10.819304] 
[   10.819524] CPU: 1 UID: 0 PID: 156 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   10.819572] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.819583] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.819606] Call Trace:
[   10.819619]  <TASK>
[   10.819636]  dump_stack_lvl+0x73/0xb0
[   10.819667]  print_report+0xd1/0x650
[   10.819689]  ? __virt_addr_valid+0x1db/0x2d0
[   10.819712]  ? kmalloc_oob_left+0x361/0x3c0
[   10.819732]  ? kasan_complete_mode_report_info+0x2a/0x200
[   10.819752]  ? kmalloc_oob_left+0x361/0x3c0
[   10.819773]  kasan_report+0x141/0x180
[   10.819793]  ? kmalloc_oob_left+0x361/0x3c0
[   10.819818]  __asan_report_load1_noabort+0x18/0x20
[   10.819841]  kmalloc_oob_left+0x361/0x3c0
[   10.819862]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   10.819883]  ? __schedule+0x10cc/0x2b60
[   10.819904]  ? __pfx_read_tsc+0x10/0x10
[   10.819925]  ? ktime_get_ts64+0x86/0x230
[   10.819950]  kunit_try_run_case+0x1a5/0x480
[   10.819974]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.819994]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.820017]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.820038]  ? __kthread_parkme+0x82/0x180
[   10.820058]  ? preempt_count_sub+0x50/0x80
[   10.820081]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.820103]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.820140]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.820162]  kthread+0x337/0x6f0
[   10.820181]  ? trace_preempt_on+0x20/0xc0
[   10.820204]  ? __pfx_kthread+0x10/0x10
[   10.820223]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.820243]  ? calculate_sigpending+0x7b/0xa0
[   10.820266]  ? __pfx_kthread+0x10/0x10
[   10.820286]  ret_from_fork+0x116/0x1d0
[   10.820303]  ? __pfx_kthread+0x10/0x10
[   10.820322]  ret_from_fork_asm+0x1a/0x30
[   10.820352]  </TASK>
[   10.820363] 
[   10.831564] Allocated by task 1:
[   10.831885]  kasan_save_stack+0x45/0x70
[   10.832293]  kasan_save_track+0x18/0x40
[   10.832793]  kasan_save_alloc_info+0x3b/0x50
[   10.833224]  __kasan_kmalloc+0xb7/0xc0
[   10.833689]  __kmalloc_node_track_caller_noprof+0x1cb/0x500
[   10.833918]  kvasprintf+0xc5/0x150
[   10.834045]  __kthread_create_on_node+0x18b/0x3a0
[   10.834375]  kthread_create_on_node+0xab/0xe0
[   10.834815]  create_worker+0x3e5/0x7b0
[   10.835263]  alloc_unbound_pwq+0x8ea/0xdb0
[   10.835688]  apply_wqattrs_prepare+0x332/0xd20
[   10.836131]  apply_workqueue_attrs_locked+0x4d/0xa0
[   10.836702]  alloc_workqueue+0xcc7/0x1ad0
[   10.836854]  latency_fsnotify_init+0x1b/0x50
[   10.837006]  do_one_initcall+0xd8/0x370
[   10.837205]  kernel_init_freeable+0x420/0x6f0
[   10.837595]  kernel_init+0x23/0x1e0
[   10.837979]  ret_from_fork+0x116/0x1d0
[   10.838423]  ret_from_fork_asm+0x1a/0x30
[   10.838794] 
[   10.838953] The buggy address belongs to the object at ffff888101745de0
[   10.838953]  which belongs to the cache kmalloc-16 of size 16
[   10.840056] The buggy address is located 18 bytes to the right of
[   10.840056]  allocated 13-byte region [ffff888101745de0, ffff888101745ded)
[   10.841056] 
[   10.841239] The buggy address belongs to the physical page:
[   10.841749] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101745
[   10.842004] flags: 0x200000000000000(node=0|zone=2)
[   10.842206] page_type: f5(slab)
[   10.842570] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   10.843374] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   10.844054] page dumped because: kasan: bad access detected
[   10.844781] 
[   10.844916] Memory state around the buggy address:
[   10.845076]  ffff888101745c80: fa fb fc fc fa fb fc fc 00 00 fc fc fa fb fc fc
[   10.845691]  ffff888101745d00: fa fb fc fc 00 04 fc fc 00 04 fc fc 00 01 fc fc
[   10.846341] >ffff888101745d80: 00 01 fc fc 00 04 fc fc 00 04 fc fc 00 05 fc fc
[   10.846925]                                                                 ^
[   10.847167]  ffff888101745e00: 00 07 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.847885]  ffff888101745e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.848646] ==================================================================