Hay
Date
May 29, 2025, 7:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   20.930285] ==================================================================
[   20.930532] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320
[   20.930723] Read of size 1 at addr fff00000c66b0fff by task kunit_try_catch/138
[   20.930923] 
[   20.931040] CPU: 1 UID: 0 PID: 138 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT 
[   20.931249] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.931305] Hardware name: linux,dummy-virt (DT)
[   20.931368] Call trace:
[   20.931501]  show_stack+0x20/0x38 (C)
[   20.932424]  dump_stack_lvl+0x8c/0xd0
[   20.932571]  print_report+0x118/0x608
[   20.932678]  kasan_report+0xdc/0x128
[   20.933272]  __asan_report_load1_noabort+0x20/0x30
[   20.933793]  kmalloc_oob_left+0x2ec/0x320
[   20.934265]  kunit_try_run_case+0x170/0x3f0
[   20.934493]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.934682]  kthread+0x328/0x630
[   20.934970]  ret_from_fork+0x10/0x20
[   20.935372] 
[   20.935451] The buggy address belongs to the object at fff00000c66b0f00
[   20.935451]  which belongs to the cache cred of size 184
[   20.935588] The buggy address is located 71 bytes to the right of
[   20.935588]  allocated 184-byte region [fff00000c66b0f00, fff00000c66b0fb8)
[   20.935741] 
[   20.935800] The buggy address belongs to the physical page:
[   20.935876] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1066b0
[   20.936006] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.936127] page_type: f5(slab)
[   20.936228] raw: 0bfffe0000000000 fff00000c002db40 dead000000000122 0000000000000000
[   20.936354] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   20.936462] page dumped because: kasan: bad access detected
[   20.936539] 
[   20.936581] Memory state around the buggy address:
[   20.937144]  fff00000c66b0e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.937571]  fff00000c66b0f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.937984] >fff00000c66b0f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.938091]                                                                 ^
[   20.938197]  fff00000c66b1000: 00 07 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.938784]  fff00000c66b1080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.939078] ==================================================================


[   10.255229] ==================================================================
[   10.256871] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0
[   10.257104] Read of size 1 at addr ffff888101c55f3f by task kunit_try_catch/155
[   10.257326] 
[   10.257412] CPU: 0 UID: 0 PID: 155 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT(voluntary) 
[   10.257456] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.257469] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.257490] Call Trace:
[   10.257501]  <TASK>
[   10.257516]  dump_stack_lvl+0x73/0xb0
[   10.257541]  print_report+0xd1/0x650
[   10.257563]  ? __virt_addr_valid+0x1db/0x2d0
[   10.257585]  ? kmalloc_oob_left+0x361/0x3c0
[   10.257605]  ? kasan_complete_mode_report_info+0x2a/0x200
[   10.257643]  ? kmalloc_oob_left+0x361/0x3c0
[   10.257665]  kasan_report+0x141/0x180
[   10.257687]  ? kmalloc_oob_left+0x361/0x3c0
[   10.257713]  __asan_report_load1_noabort+0x18/0x20
[   10.257733]  kmalloc_oob_left+0x361/0x3c0
[   10.257756]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   10.257778]  ? __schedule+0x10cc/0x2b60
[   10.257801]  ? __pfx_read_tsc+0x10/0x10
[   10.257821]  ? ktime_get_ts64+0x86/0x230
[   10.257844]  kunit_try_run_case+0x1a5/0x480
[   10.257866]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.257885]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.257908]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.257999]  ? __kthread_parkme+0x82/0x180
[   10.258019]  ? preempt_count_sub+0x50/0x80
[   10.258042]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.258062]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.258086]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.258110]  kthread+0x337/0x6f0
[   10.258129]  ? trace_preempt_on+0x20/0xc0
[   10.258151]  ? __pfx_kthread+0x10/0x10
[   10.258172]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.258194]  ? calculate_sigpending+0x7b/0xa0
[   10.258217]  ? __pfx_kthread+0x10/0x10
[   10.258238]  ret_from_fork+0x116/0x1d0
[   10.258256]  ? __pfx_kthread+0x10/0x10
[   10.258276]  ret_from_fork_asm+0x1a/0x30
[   10.258305]  </TASK>
[   10.258315] 
[   10.267156] Allocated by task 1:
[   10.267296]  kasan_save_stack+0x45/0x70
[   10.267505]  kasan_save_track+0x18/0x40
[   10.267819]  kasan_save_alloc_info+0x3b/0x50
[   10.268089]  __kasan_kmalloc+0xb7/0xc0
[   10.268269]  __kmalloc_node_track_caller_noprof+0x1cb/0x500
[   10.268462]  kvasprintf+0xc5/0x150
[   10.268682]  __kthread_create_on_node+0x18b/0x3a0
[   10.269035]  kthread_create_on_node+0xab/0xe0
[   10.269262]  create_worker+0x3e5/0x7b0
[   10.269458]  alloc_unbound_pwq+0x8ea/0xdb0
[   10.269694]  apply_wqattrs_prepare+0x332/0xd20
[   10.270102]  apply_workqueue_attrs_locked+0x4d/0xa0
[   10.270363]  alloc_workqueue+0xcc7/0x1ad0
[   10.270573]  latency_fsnotify_init+0x1b/0x50
[   10.270764]  do_one_initcall+0xd8/0x370
[   10.270920]  kernel_init_freeable+0x420/0x6f0
[   10.271139]  kernel_init+0x23/0x1e0
[   10.271321]  ret_from_fork+0x116/0x1d0
[   10.271483]  ret_from_fork_asm+0x1a/0x30
[   10.271864] 
[   10.271962] The buggy address belongs to the object at ffff888101c55f20
[   10.271962]  which belongs to the cache kmalloc-16 of size 16
[   10.272448] The buggy address is located 18 bytes to the right of
[   10.272448]  allocated 13-byte region [ffff888101c55f20, ffff888101c55f2d)
[   10.273015] 
[   10.273138] The buggy address belongs to the physical page:
[   10.273441] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101c55
[   10.273927] flags: 0x200000000000000(node=0|zone=2)
[   10.274189] page_type: f5(slab)
[   10.274354] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   10.274726] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   10.275251] page dumped because: kasan: bad access detected
[   10.275498] 
[   10.275571] Memory state around the buggy address:
[   10.275877]  ffff888101c55e00: 00 05 fc fc 00 00 fc fc 00 06 fc fc 00 06 fc fc
[   10.276243]  ffff888101c55e80: 00 00 fc fc 00 02 fc fc 00 02 fc fc 00 06 fc fc
[   10.276520] >ffff888101c55f00: 00 06 fc fc 00 05 fc fc 00 07 fc fc fc fc fc fc
[   10.276929]                                         ^
[   10.277200]  ffff888101c55f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.277521]  ffff888101c56000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.277918] ==================================================================