Hay
Date
July 4, 2025, 11:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.705776] ==================================================================
[   17.705897] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320
[   17.706368] Read of size 1 at addr fff00000c617375f by task kunit_try_catch/138
[   17.706495] 
[   17.706548] CPU: 0 UID: 0 PID: 138 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   17.706631] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.706656] Hardware name: linux,dummy-virt (DT)
[   17.706842] Call trace:
[   17.706910]  show_stack+0x20/0x38 (C)
[   17.707042]  dump_stack_lvl+0x8c/0xd0
[   17.707092]  print_report+0x118/0x608
[   17.707137]  kasan_report+0xdc/0x128
[   17.707182]  __asan_report_load1_noabort+0x20/0x30
[   17.707231]  kmalloc_oob_left+0x2ec/0x320
[   17.707737]  kunit_try_run_case+0x170/0x3f0
[   17.707936]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.708110]  kthread+0x328/0x630
[   17.708189]  ret_from_fork+0x10/0x20
[   17.708276] 
[   17.708714] Allocated by task 11:
[   17.708852]  kasan_save_stack+0x3c/0x68
[   17.709021]  kasan_save_track+0x20/0x40
[   17.709144]  kasan_save_alloc_info+0x40/0x58
[   17.709185]  __kasan_kmalloc+0xd4/0xd8
[   17.709750]  __kmalloc_node_track_caller_noprof+0x194/0x4b8
[   17.710213]  kvasprintf+0xe0/0x180
[   17.710784]  __kthread_create_on_node+0x16c/0x350
[   17.710957]  kthread_create_on_node+0xe4/0x130
[   17.711002]  create_worker+0x380/0x6b8
[   17.711037]  worker_thread+0x808/0xf38
[   17.711095]  kthread+0x328/0x630
[   17.711349]  ret_from_fork+0x10/0x20
[   17.711499] 
[   17.711638] The buggy address belongs to the object at fff00000c6173740
[   17.711638]  which belongs to the cache kmalloc-16 of size 16
[   17.712056] The buggy address is located 19 bytes to the right of
[   17.712056]  allocated 12-byte region [fff00000c6173740, fff00000c617374c)
[   17.712502] 
[   17.712670] The buggy address belongs to the physical page:
[   17.712746] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106173
[   17.712877] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.712939] page_type: f5(slab)
[   17.712986] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   17.713065] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   17.713104] page dumped because: kasan: bad access detected
[   17.713134] 
[   17.713180] Memory state around the buggy address:
[   17.713232]  fff00000c6173600: 00 02 fc fc 00 02 fc fc 00 05 fc fc fa fb fc fc
[   17.713284]  fff00000c6173680: 00 02 fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   17.713326] >fff00000c6173700: fa fb fc fc fa fb fc fc 00 04 fc fc 00 07 fc fc
[   17.713371]                                                     ^
[   17.713412]  fff00000c6173780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.713463]  fff00000c6173800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.713509] ==================================================================

[   11.177030] ==================================================================
[   11.177811] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0
[   11.178330] Read of size 1 at addr ffff88810298e07f by task kunit_try_catch/155
[   11.179130] 
[   11.179396] CPU: 1 UID: 0 PID: 155 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.179450] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.179462] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.179485] Call Trace:
[   11.179503]  <TASK>
[   11.179527]  dump_stack_lvl+0x73/0xb0
[   11.179563]  print_report+0xd1/0x650
[   11.179587]  ? __virt_addr_valid+0x1db/0x2d0
[   11.179610]  ? kmalloc_oob_left+0x361/0x3c0
[   11.179630]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.179651]  ? kmalloc_oob_left+0x361/0x3c0
[   11.179672]  kasan_report+0x141/0x180
[   11.179693]  ? kmalloc_oob_left+0x361/0x3c0
[   11.179717]  __asan_report_load1_noabort+0x18/0x20
[   11.179740]  kmalloc_oob_left+0x361/0x3c0
[   11.179760]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   11.179781]  ? __schedule+0x10cc/0x2b60
[   11.179801]  ? __pfx_read_tsc+0x10/0x10
[   11.179822]  ? ktime_get_ts64+0x86/0x230
[   11.179846]  kunit_try_run_case+0x1a5/0x480
[   11.179871]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.179891]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.179914]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.179935]  ? __kthread_parkme+0x82/0x180
[   11.179955]  ? preempt_count_sub+0x50/0x80
[   11.179977]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.179999]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.180019]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.180040]  kthread+0x337/0x6f0
[   11.180059]  ? trace_preempt_on+0x20/0xc0
[   11.180082]  ? __pfx_kthread+0x10/0x10
[   11.180100]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.180120]  ? calculate_sigpending+0x7b/0xa0
[   11.180143]  ? __pfx_kthread+0x10/0x10
[   11.180162]  ret_from_fork+0x116/0x1d0
[   11.180179]  ? __pfx_kthread+0x10/0x10
[   11.180230]  ret_from_fork_asm+0x1a/0x30
[   11.180261]  </TASK>
[   11.180273] 
[   11.191160] Allocated by task 1:
[   11.191832]  kasan_save_stack+0x45/0x70
[   11.192443]  kasan_save_track+0x18/0x40
[   11.192952]  kasan_save_alloc_info+0x3b/0x50
[   11.193683]  __kasan_kmalloc+0xb7/0xc0
[   11.194175]  __kmalloc_node_track_caller_noprof+0x1cb/0x500
[   11.194869]  kstrdup+0x3e/0xa0
[   11.195380]  kstrdup_const+0x2c/0x40
[   11.195872]  __kernfs_new_node+0xa7/0x6d0
[   11.196028]  kernfs_new_node+0x140/0x1e0
[   11.196166]  kernfs_create_dir_ns+0x30/0x140
[   11.196744]  sysfs_create_dir_ns+0x130/0x290
[   11.197423]  kobject_add_internal+0x222/0x9b0
[   11.198097]  kobject_init_and_add+0xf1/0x160
[   11.198629]  sysfs_slab_add+0x19a/0x1f0
[   11.199156]  slab_sysfs_init+0x76/0x110
[   11.199732]  do_one_initcall+0xd8/0x370
[   11.199885]  kernel_init_freeable+0x420/0x6f0
[   11.200040]  kernel_init+0x23/0x1e0
[   11.200166]  ret_from_fork+0x116/0x1d0
[   11.200905]  ret_from_fork_asm+0x1a/0x30
[   11.201418] 
[   11.201725] The buggy address belongs to the object at ffff88810298e060
[   11.201725]  which belongs to the cache kmalloc-16 of size 16
[   11.203195] The buggy address is located 19 bytes to the right of
[   11.203195]  allocated 12-byte region [ffff88810298e060, ffff88810298e06c)
[   11.203826] 
[   11.203916] The buggy address belongs to the physical page:
[   11.204096] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10298e
[   11.204701] flags: 0x200000000000000(node=0|zone=2)
[   11.205066] page_type: f5(slab)
[   11.205711] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   11.206046] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   11.206767] page dumped because: kasan: bad access detected
[   11.207153] 
[   11.207332] Memory state around the buggy address:
[   11.207546]  ffff88810298df00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc
[   11.207840]  ffff88810298df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.208124] >ffff88810298e000: 00 01 fc fc 00 01 fc fc 00 04 fc fc 00 04 fc fc
[   11.209082]                                                                 ^
[   11.209789]  ffff88810298e080: 00 07 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.210502]  ffff88810298e100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.211170] ==================================================================