Hay
Date
July 3, 2025, 11:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.159342] ==================================================================
[   19.159482] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320
[   19.159677] Read of size 1 at addr fff00000c619149f by task kunit_try_catch/138
[   19.159866] 
[   19.160310] CPU: 0 UID: 0 PID: 138 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   19.160795] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.160852] Hardware name: linux,dummy-virt (DT)
[   19.160924] Call trace:
[   19.160974]  show_stack+0x20/0x38 (C)
[   19.161104]  dump_stack_lvl+0x8c/0xd0
[   19.161212]  print_report+0x118/0x608
[   19.161313]  kasan_report+0xdc/0x128
[   19.161905]  __asan_report_load1_noabort+0x20/0x30
[   19.162509]  kmalloc_oob_left+0x2ec/0x320
[   19.162966]  kunit_try_run_case+0x170/0x3f0
[   19.163341]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.163911]  kthread+0x328/0x630
[   19.164092]  ret_from_fork+0x10/0x20
[   19.164220] 
[   19.164261] Allocated by task 10:
[   19.164573]  kasan_save_stack+0x3c/0x68
[   19.165151]  kasan_save_track+0x20/0x40
[   19.165265]  kasan_save_alloc_info+0x40/0x58
[   19.165708]  __kasan_kmalloc+0xd4/0xd8
[   19.165988]  __kmalloc_node_track_caller_noprof+0x194/0x4b8
[   19.166130]  kvasprintf+0xe0/0x180
[   19.166203]  __kthread_create_on_node+0x16c/0x350
[   19.166526]  kthread_create_on_node+0xe4/0x130
[   19.166631]  create_worker+0x380/0x6b8
[   19.166712]  worker_thread+0x808/0xf38
[   19.167097]  kthread+0x328/0x630
[   19.167214]  ret_from_fork+0x10/0x20
[   19.167295] 
[   19.167337] The buggy address belongs to the object at fff00000c6191480
[   19.167337]  which belongs to the cache kmalloc-16 of size 16
[   19.167954] The buggy address is located 19 bytes to the right of
[   19.167954]  allocated 12-byte region [fff00000c6191480, fff00000c619148c)
[   19.168395] 
[   19.168514] The buggy address belongs to the physical page:
[   19.168771] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106191
[   19.168900] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.169098] page_type: f5(slab)
[   19.169192] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   19.169574] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   19.169919] page dumped because: kasan: bad access detected
[   19.170014] 
[   19.170072] Memory state around the buggy address:
[   19.170137]  fff00000c6191380: 00 05 fc fc fa fb fc fc 00 02 fc fc fa fb fc fc
[   19.170217]  fff00000c6191400: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   19.170304] >fff00000c6191480: 00 04 fc fc 00 07 fc fc fc fc fc fc fc fc fc fc
[   19.170911]                             ^
[   19.171093]  fff00000c6191500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.171446]  fff00000c6191580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.171554] ==================================================================

[   10.873451] ==================================================================
[   10.873990] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0
[   10.874552] Read of size 1 at addr ffff8881019d1a7f by task kunit_try_catch/155
[   10.874823] 
[   10.874964] CPU: 1 UID: 0 PID: 155 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   10.875023] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.875034] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.875067] Call Trace:
[   10.875079]  <TASK>
[   10.875112]  dump_stack_lvl+0x73/0xb0
[   10.875166]  print_report+0xd1/0x650
[   10.875465]  ? __virt_addr_valid+0x1db/0x2d0
[   10.875491]  ? kmalloc_oob_left+0x361/0x3c0
[   10.875511]  ? kasan_complete_mode_report_info+0x2a/0x200
[   10.875531]  ? kmalloc_oob_left+0x361/0x3c0
[   10.875551]  kasan_report+0x141/0x180
[   10.875571]  ? kmalloc_oob_left+0x361/0x3c0
[   10.875595]  __asan_report_load1_noabort+0x18/0x20
[   10.875618]  kmalloc_oob_left+0x361/0x3c0
[   10.875638]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   10.875659]  ? __schedule+0x10cc/0x2b60
[   10.875680]  ? __pfx_read_tsc+0x10/0x10
[   10.875700]  ? ktime_get_ts64+0x86/0x230
[   10.875724]  kunit_try_run_case+0x1a5/0x480
[   10.875748]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.875768]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.875789]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.875810]  ? __kthread_parkme+0x82/0x180
[   10.875830]  ? preempt_count_sub+0x50/0x80
[   10.875852]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.875874]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.875895]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.875916]  kthread+0x337/0x6f0
[   10.875934]  ? trace_preempt_on+0x20/0xc0
[   10.875956]  ? __pfx_kthread+0x10/0x10
[   10.875975]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.875994]  ? calculate_sigpending+0x7b/0xa0
[   10.876016]  ? __pfx_kthread+0x10/0x10
[   10.876036]  ret_from_fork+0x116/0x1d0
[   10.876053]  ? __pfx_kthread+0x10/0x10
[   10.876072]  ret_from_fork_asm+0x1a/0x30
[   10.876100]  </TASK>
[   10.876111] 
[   10.886808] Allocated by task 1:
[   10.886963]  kasan_save_stack+0x45/0x70
[   10.887138]  kasan_save_track+0x18/0x40
[   10.887676]  kasan_save_alloc_info+0x3b/0x50
[   10.887965]  __kasan_kmalloc+0xb7/0xc0
[   10.888157]  __kmalloc_node_track_caller_noprof+0x1cb/0x500
[   10.888632]  kvasprintf+0xc5/0x150
[   10.888897]  __kthread_create_on_node+0x18b/0x3a0
[   10.889100]  kthread_create_on_node+0xab/0xe0
[   10.889484]  create_worker+0x3e5/0x7b0
[   10.889681]  alloc_unbound_pwq+0x8ea/0xdb0
[   10.890115]  apply_wqattrs_prepare+0x332/0xd20
[   10.890380]  apply_workqueue_attrs_locked+0x4d/0xa0
[   10.891004]  alloc_workqueue+0xcc7/0x1ad0
[   10.891517]  latency_fsnotify_init+0x1b/0x50
[   10.891854]  do_one_initcall+0xd8/0x370
[   10.891994]  kernel_init_freeable+0x420/0x6f0
[   10.892162]  kernel_init+0x23/0x1e0
[   10.892374]  ret_from_fork+0x116/0x1d0
[   10.892781]  ret_from_fork_asm+0x1a/0x30
[   10.893305] 
[   10.893490] The buggy address belongs to the object at ffff8881019d1a60
[   10.893490]  which belongs to the cache kmalloc-16 of size 16
[   10.894762] The buggy address is located 18 bytes to the right of
[   10.894762]  allocated 13-byte region [ffff8881019d1a60, ffff8881019d1a6d)
[   10.895902] 
[   10.895980] The buggy address belongs to the physical page:
[   10.896187] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1019d1
[   10.897041] flags: 0x200000000000000(node=0|zone=2)
[   10.897620] page_type: f5(slab)
[   10.897987] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   10.898817] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   10.899478] page dumped because: kasan: bad access detected
[   10.899658] 
[   10.899729] Memory state around the buggy address:
[   10.899886]  ffff8881019d1900: 00 03 fc fc fa fb fc fc 00 02 fc fc 00 05 fc fc
[   10.900105]  ffff8881019d1980: 00 02 fc fc 00 02 fc fc 00 02 fc fc 00 02 fc fc
[   10.900423] >ffff8881019d1a00: fa fb fc fc fa fb fc fc fa fb fc fc 00 05 fc fc
[   10.900767]                                                                 ^
[   10.901002]  ffff8881019d1a80: 00 07 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.901454]  ffff8881019d1b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.901998] ==================================================================