Hay
Date
July 23, 2025, 2:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   15.071775] ==================================================================
[   15.071884] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320
[   15.071935] Read of size 1 at addr fff00000c3ec409f by task kunit_try_catch/138
[   15.072058] 
[   15.072094] CPU: 1 UID: 0 PID: 138 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7 #1 PREEMPT 
[   15.072175] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.072201] Hardware name: linux,dummy-virt (DT)
[   15.072447] Call trace:
[   15.072544]  show_stack+0x20/0x38 (C)
[   15.072599]  dump_stack_lvl+0x8c/0xd0
[   15.072914]  print_report+0x118/0x5d0
[   15.073063]  kasan_report+0xdc/0x128
[   15.073140]  __asan_report_load1_noabort+0x20/0x30
[   15.073268]  kmalloc_oob_left+0x2ec/0x320
[   15.073314]  kunit_try_run_case+0x170/0x3f0
[   15.073385]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.073448]  kthread+0x328/0x630
[   15.073516]  ret_from_fork+0x10/0x20
[   15.073582] 
[   15.073615] Allocated by task 26:
[   15.073739]  kasan_save_stack+0x3c/0x68
[   15.073896]  kasan_save_track+0x20/0x40
[   15.073964]  kasan_save_alloc_info+0x40/0x58
[   15.074029]  __kasan_kmalloc+0xd4/0xd8
[   15.074066]  __kmalloc_node_track_caller_noprof+0x194/0x4b8
[   15.074110]  kstrdup+0x54/0xc8
[   15.074153]  devtmpfs_work_loop+0x6f8/0xa58
[   15.074194]  devtmpfsd+0x50/0x58
[   15.074228]  kthread+0x328/0x630
[   15.074260]  ret_from_fork+0x10/0x20
[   15.074295] 
[   15.074327] Freed by task 26:
[   15.074365]  kasan_save_stack+0x3c/0x68
[   15.074412]  kasan_save_track+0x20/0x40
[   15.074457]  kasan_save_free_info+0x4c/0x78
[   15.074495]  __kasan_slab_free+0x6c/0x98
[   15.074531]  kfree+0x214/0x3c8
[   15.074564]  devtmpfs_work_loop+0x804/0xa58
[   15.074600]  devtmpfsd+0x50/0x58
[   15.074631]  kthread+0x328/0x630
[   15.074662]  ret_from_fork+0x10/0x20
[   15.075082] 
[   15.075116] The buggy address belongs to the object at fff00000c3ec4080
[   15.075116]  which belongs to the cache kmalloc-16 of size 16
[   15.075234] The buggy address is located 15 bytes to the right of
[   15.075234]  allocated 16-byte region [fff00000c3ec4080, fff00000c3ec4090)
[   15.075394] 
[   15.075474] The buggy address belongs to the physical page:
[   15.075577] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103ec4
[   15.075652] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.075844] page_type: f5(slab)
[   15.075955] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   15.076007] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   15.076176] page dumped because: kasan: bad access detected
[   15.076207] 
[   15.076224] Memory state around the buggy address:
[   15.076264]  fff00000c3ec3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.076307]  fff00000c3ec4000: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   15.076349] >fff00000c3ec4080: fa fb fc fc 00 07 fc fc fc fc fc fc fc fc fc fc
[   15.076524]                             ^
[   15.076634]  fff00000c3ec4100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.076678]  fff00000c3ec4180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.076763] ==================================================================

[   12.046313] ==================================================================
[   12.046757] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0
[   12.047073] Read of size 1 at addr ffff888102261f5f by task kunit_try_catch/155
[   12.047358] 
[   12.047457] CPU: 0 UID: 0 PID: 155 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7 #1 PREEMPT(voluntary) 
[   12.047504] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.047517] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.047539] Call Trace:
[   12.047552]  <TASK>
[   12.047571]  dump_stack_lvl+0x73/0xb0
[   12.047600]  print_report+0xd1/0x610
[   12.047621]  ? __virt_addr_valid+0x1db/0x2d0
[   12.047643]  ? kmalloc_oob_left+0x361/0x3c0
[   12.047663]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.047684]  ? kmalloc_oob_left+0x361/0x3c0
[   12.047705]  kasan_report+0x141/0x180
[   12.047725]  ? kmalloc_oob_left+0x361/0x3c0
[   12.047750]  __asan_report_load1_noabort+0x18/0x20
[   12.047773]  kmalloc_oob_left+0x361/0x3c0
[   12.047794]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   12.047853]  ? __schedule+0x10c6/0x2b60
[   12.047878]  ? __pfx_read_tsc+0x10/0x10
[   12.047898]  ? ktime_get_ts64+0x86/0x230
[   12.047922]  kunit_try_run_case+0x1a5/0x480
[   12.047948]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.047970]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.047993]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.048015]  ? __kthread_parkme+0x82/0x180
[   12.048035]  ? preempt_count_sub+0x50/0x80
[   12.048058]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.048099]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.048122]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.048159]  kthread+0x337/0x6f0
[   12.048179]  ? trace_preempt_on+0x20/0xc0
[   12.048217]  ? __pfx_kthread+0x10/0x10
[   12.048237]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.048257]  ? calculate_sigpending+0x7b/0xa0
[   12.048281]  ? __pfx_kthread+0x10/0x10
[   12.048302]  ret_from_fork+0x116/0x1d0
[   12.048320]  ? __pfx_kthread+0x10/0x10
[   12.048340]  ret_from_fork_asm+0x1a/0x30
[   12.048370]  </TASK>
[   12.048381] 
[   12.055469] Allocated by task 1:
[   12.055617]  kasan_save_stack+0x45/0x70
[   12.055825]  kasan_save_track+0x18/0x40
[   12.056006]  kasan_save_alloc_info+0x3b/0x50
[   12.056311]  __kasan_kmalloc+0xb7/0xc0
[   12.056451]  __kmalloc_node_track_caller_noprof+0x1cb/0x500
[   12.056632]  kvasprintf+0xc5/0x150
[   12.056773]  __kthread_create_on_node+0x18b/0x3a0
[   12.057013]  kthread_create_on_node+0xab/0xe0
[   12.057319]  create_worker+0x3e5/0x7b0
[   12.057513]  alloc_unbound_pwq+0x8ea/0xdb0
[   12.057694]  apply_wqattrs_prepare+0x332/0xd20
[   12.057887]  apply_workqueue_attrs_locked+0x4d/0xa0
[   12.058138]  alloc_workqueue+0xcc7/0x1ad0
[   12.058382]  latency_fsnotify_init+0x1b/0x50
[   12.058585]  do_one_initcall+0xd8/0x370
[   12.058759]  kernel_init_freeable+0x420/0x6f0
[   12.058955]  kernel_init+0x23/0x1e0
[   12.059147]  ret_from_fork+0x116/0x1d0
[   12.059367]  ret_from_fork_asm+0x1a/0x30
[   12.059514] 
[   12.059588] The buggy address belongs to the object at ffff888102261f40
[   12.059588]  which belongs to the cache kmalloc-16 of size 16
[   12.060116] The buggy address is located 18 bytes to the right of
[   12.060116]  allocated 13-byte region [ffff888102261f40, ffff888102261f4d)
[   12.060761] 
[   12.060878] The buggy address belongs to the physical page:
[   12.061148] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102261
[   12.061460] flags: 0x200000000000000(node=0|zone=2)
[   12.061704] page_type: f5(slab)
[   12.061889] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   12.062325] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   12.062661] page dumped because: kasan: bad access detected
[   12.062890] 
[   12.062985] Memory state around the buggy address:
[   12.063302]  ffff888102261e00: fa fb fc fc 00 02 fc fc 00 05 fc fc 00 02 fc fc
[   12.063570]  ffff888102261e80: 00 02 fc fc 00 02 fc fc 00 02 fc fc fa fb fc fc
[   12.063871] >ffff888102261f00: fa fb fc fc fa fb fc fc 00 05 fc fc 00 07 fc fc
[   12.064253]                                                     ^
[   12.064519]  ffff888102261f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.064780]  ffff888102262000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.065078] ==================================================================