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

Environment
qemu-arm64
qemu-x86_64

[   15.045228] ==================================================================
[   15.046186] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320
[   15.046417] Read of size 1 at addr fff00000c3ef7d5f by task kunit_try_catch/138
[   15.046477] 
[   15.046511] CPU: 1 UID: 0 PID: 138 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.046598] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.046625] Hardware name: linux,dummy-virt (DT)
[   15.046658] Call trace:
[   15.046681]  show_stack+0x20/0x38 (C)
[   15.046733]  dump_stack_lvl+0x8c/0xd0
[   15.046971]  print_report+0x118/0x5d0
[   15.047067]  kasan_report+0xdc/0x128
[   15.047240]  __asan_report_load1_noabort+0x20/0x30
[   15.047405]  kmalloc_oob_left+0x2ec/0x320
[   15.047522]  kunit_try_run_case+0x170/0x3f0
[   15.047609]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.047945]  kthread+0x328/0x630
[   15.048028]  ret_from_fork+0x10/0x20
[   15.048128] 
[   15.048259] Allocated by task 26:
[   15.048633]  kasan_save_stack+0x3c/0x68
[   15.048695]  kasan_save_track+0x20/0x40
[   15.048758]  kasan_save_alloc_info+0x40/0x58
[   15.048999]  __kasan_kmalloc+0xd4/0xd8
[   15.049202]  __kmalloc_node_track_caller_noprof+0x194/0x4b8
[   15.049395]  kstrdup+0x54/0xc8
[   15.049541]  devtmpfs_work_loop+0x6f8/0xa58
[   15.049591]  devtmpfsd+0x50/0x58
[   15.049915]  kthread+0x328/0x630
[   15.050044]  ret_from_fork+0x10/0x20
[   15.050206] 
[   15.050294] Freed by task 26:
[   15.050518]  kasan_save_stack+0x3c/0x68
[   15.050978]  kasan_save_track+0x20/0x40
[   15.051050]  kasan_save_free_info+0x4c/0x78
[   15.051208]  __kasan_slab_free+0x6c/0x98
[   15.051380]  kfree+0x214/0x3c8
[   15.051458]  devtmpfs_work_loop+0x804/0xa58
[   15.051833]  devtmpfsd+0x50/0x58
[   15.051918]  kthread+0x328/0x630
[   15.052022]  ret_from_fork+0x10/0x20
[   15.052134] 
[   15.052507] The buggy address belongs to the object at fff00000c3ef7d40
[   15.052507]  which belongs to the cache kmalloc-16 of size 16
[   15.052614] The buggy address is located 15 bytes to the right of
[   15.052614]  allocated 16-byte region [fff00000c3ef7d40, fff00000c3ef7d50)
[   15.052757] 
[   15.052855] The buggy address belongs to the physical page:
[   15.052973] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103ef7
[   15.053047] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.053441] page_type: f5(slab)
[   15.053518] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   15.053670] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   15.053765] page dumped because: kasan: bad access detected
[   15.053893] 
[   15.053961] Memory state around the buggy address:
[   15.054071]  fff00000c3ef7c00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   15.054114]  fff00000c3ef7c80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   15.054477] >fff00000c3ef7d00: fa fb fc fc fa fb fc fc fa fb fc fc 00 07 fc fc
[   15.054621]                                                     ^
[   15.054669]  fff00000c3ef7d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.054750]  fff00000c3ef7e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.054892] ==================================================================

[   11.427598] ==================================================================
[   11.428159] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0
[   11.428468] Read of size 1 at addr ffff8881025c747f by task kunit_try_catch/157
[   11.428766] 
[   11.428880] CPU: 1 UID: 0 PID: 157 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   11.428930] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.428941] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.428963] Call Trace:
[   11.428975]  <TASK>
[   11.428993]  dump_stack_lvl+0x73/0xb0
[   11.429023]  print_report+0xd1/0x610
[   11.429044]  ? __virt_addr_valid+0x1db/0x2d0
[   11.429067]  ? kmalloc_oob_left+0x361/0x3c0
[   11.429088]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.429110]  ? kmalloc_oob_left+0x361/0x3c0
[   11.429131]  kasan_report+0x141/0x180
[   11.429152]  ? kmalloc_oob_left+0x361/0x3c0
[   11.429177]  __asan_report_load1_noabort+0x18/0x20
[   11.429201]  kmalloc_oob_left+0x361/0x3c0
[   11.429222]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   11.429243]  ? __schedule+0x10cc/0x2b60
[   11.429490]  ? __pfx_read_tsc+0x10/0x10
[   11.429533]  ? ktime_get_ts64+0x86/0x230
[   11.429558]  kunit_try_run_case+0x1a5/0x480
[   11.429585]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.429618]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.429642]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.429665]  ? __kthread_parkme+0x82/0x180
[   11.429684]  ? preempt_count_sub+0x50/0x80
[   11.429708]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.429730]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.429753]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.429777]  kthread+0x337/0x6f0
[   11.429795]  ? trace_preempt_on+0x20/0xc0
[   11.429818]  ? __pfx_kthread+0x10/0x10
[   11.429837]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.429858]  ? calculate_sigpending+0x7b/0xa0
[   11.429882]  ? __pfx_kthread+0x10/0x10
[   11.429902]  ret_from_fork+0x116/0x1d0
[   11.429921]  ? __pfx_kthread+0x10/0x10
[   11.429940]  ret_from_fork_asm+0x1a/0x30
[   11.429970]  </TASK>
[   11.429980] 
[   11.437864] Allocated by task 1:
[   11.438036]  kasan_save_stack+0x45/0x70
[   11.438337]  kasan_save_track+0x18/0x40
[   11.438502]  kasan_save_alloc_info+0x3b/0x50
[   11.438652]  __kasan_kmalloc+0xb7/0xc0
[   11.438783]  __kmalloc_node_track_caller_noprof+0x1cb/0x500
[   11.439130]  kstrdup+0x3e/0xa0
[   11.439306]  kstrdup_const+0x2c/0x40
[   11.439512]  __kernfs_new_node+0xa7/0x6d0
[   11.439715]  kernfs_new_node+0x140/0x1e0
[   11.439885]  kernfs_create_dir_ns+0x30/0x140
[   11.440254]  sysfs_create_dir_ns+0x130/0x290
[   11.440480]  kobject_add_internal+0x222/0x9b0
[   11.440710]  kobject_init_and_add+0xf1/0x160
[   11.440921]  sysfs_slab_add+0x19a/0x1f0
[   11.441115]  slab_sysfs_init+0x76/0x110
[   11.441396]  do_one_initcall+0xd8/0x370
[   11.441613]  kernel_init_freeable+0x420/0x6f0
[   11.441806]  kernel_init+0x23/0x1e0
[   11.442062]  ret_from_fork+0x116/0x1d0
[   11.442246]  ret_from_fork_asm+0x1a/0x30
[   11.442452] 
[   11.442572] The buggy address belongs to the object at ffff8881025c7460
[   11.442572]  which belongs to the cache kmalloc-16 of size 16
[   11.442942] The buggy address is located 19 bytes to the right of
[   11.442942]  allocated 12-byte region [ffff8881025c7460, ffff8881025c746c)
[   11.443518] 
[   11.443632] The buggy address belongs to the physical page:
[   11.443885] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1025c7
[   11.444426] flags: 0x200000000000000(node=0|zone=2)
[   11.444677] page_type: f5(slab)
[   11.444844] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   11.445145] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   11.445426] page dumped because: kasan: bad access detected
[   11.445640] 
[   11.445731] Memory state around the buggy address:
[   11.445957]  ffff8881025c7300: 00 06 fc fc 00 00 fc fc 00 02 fc fc 00 02 fc fc
[   11.446356]  ffff8881025c7380: 00 06 fc fc 00 06 fc fc 00 04 fc fc 00 04 fc fc
[   11.446703] >ffff8881025c7400: 00 01 fc fc 00 01 fc fc 00 04 fc fc 00 04 fc fc
[   11.447065]                                                                 ^
[   11.447385]  ffff8881025c7480: 00 07 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.447706]  ffff8881025c7500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.448174] ==================================================================