Hay
Date
May 23, 2025, 11:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   26.731314] ==================================================================
[   26.732356] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320
[   26.732568] Read of size 1 at addr fff00000c5a2a65f by task kunit_try_catch/140
[   26.732716] 
[   26.732809] CPU: 0 UID: 0 PID: 140 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7 #1 PREEMPT 
[   26.733027] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.733395] Hardware name: linux,dummy-virt (DT)
[   26.733725] Call trace:
[   26.733962]  show_stack+0x20/0x38 (C)
[   26.734466]  dump_stack_lvl+0x8c/0xd0
[   26.734746]  print_report+0x118/0x608
[   26.735470]  kasan_report+0xdc/0x128
[   26.735640]  __asan_report_load1_noabort+0x20/0x30
[   26.735790]  kmalloc_oob_left+0x2ec/0x320
[   26.735983]  kunit_try_run_case+0x170/0x3f0
[   26.736478]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.737035]  kthread+0x328/0x630
[   26.737192]  ret_from_fork+0x10/0x20
[   26.737516] 
[   26.737716] Allocated by task 26:
[   26.737802]  kasan_save_stack+0x3c/0x68
[   26.738230]  kasan_save_track+0x20/0x40
[   26.738494]  kasan_save_alloc_info+0x40/0x58
[   26.738786]  __kasan_kmalloc+0xd4/0xd8
[   26.739039]  __kmalloc_node_track_caller_noprof+0x18c/0x4c0
[   26.739258]  kstrdup+0x54/0xc8
[   26.739500]  devtmpfs_work_loop+0x6f8/0xa58
[   26.739906]  devtmpfsd+0x50/0x58
[   26.740182]  kthread+0x328/0x630
[   26.740546]  ret_from_fork+0x10/0x20
[   26.740932] 
[   26.741063] Freed by task 26:
[   26.741272]  kasan_save_stack+0x3c/0x68
[   26.741567]  kasan_save_track+0x20/0x40
[   26.741703]  kasan_save_free_info+0x4c/0x78
[   26.741819]  __kasan_slab_free+0x6c/0x98
[   26.741923]  kfree+0x214/0x3c8
[   26.742025]  devtmpfs_work_loop+0x804/0xa58
[   26.742140]  devtmpfsd+0x50/0x58
[   26.742236]  kthread+0x328/0x630
[   26.742341]  ret_from_fork+0x10/0x20
[   26.742864] 
[   26.743132] The buggy address belongs to the object at fff00000c5a2a640
[   26.743132]  which belongs to the cache kmalloc-16 of size 16
[   26.743715] The buggy address is located 15 bytes to the right of
[   26.743715]  allocated 16-byte region [fff00000c5a2a640, fff00000c5a2a650)
[   26.744318] 
[   26.744412] The buggy address belongs to the physical page:
[   26.744567] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a2a
[   26.744939] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   26.745091] page_type: f5(slab)
[   26.745177] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   26.745625] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   26.745993] page dumped because: kasan: bad access detected
[   26.746290] 
[   26.746416] Memory state around the buggy address:
[   26.746620]  fff00000c5a2a500: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   26.746906]  fff00000c5a2a580: fa fb fc fc fa fb fc fc fa fb fc fc 00 01 fc fc
[   26.747290] >fff00000c5a2a600: 00 01 fc fc fa fb fc fc fa fb fc fc 00 07 fc fc
[   26.747826]                                                     ^
[   26.748222]  fff00000c5a2a680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.748722]  fff00000c5a2a700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.748827] ==================================================================

[   12.001886] ==================================================================
[   12.003022] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0
[   12.003791] Read of size 1 at addr ffff8881020cbdff by task kunit_try_catch/157
[   12.004799] 
[   12.005050] CPU: 0 UID: 0 PID: 157 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7 #1 PREEMPT(voluntary) 
[   12.005108] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.005121] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.005143] Call Trace:
[   12.005157]  <TASK>
[   12.005176]  dump_stack_lvl+0x73/0xb0
[   12.005215]  print_report+0xd1/0x650
[   12.005237]  ? __virt_addr_valid+0x1db/0x2d0
[   12.005260]  ? kmalloc_oob_left+0x361/0x3c0
[   12.005281]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.005442]  ? kmalloc_oob_left+0x361/0x3c0
[   12.005472]  kasan_report+0x141/0x180
[   12.005496]  ? kmalloc_oob_left+0x361/0x3c0
[   12.005522]  __asan_report_load1_noabort+0x18/0x20
[   12.005542]  kmalloc_oob_left+0x361/0x3c0
[   12.005564]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   12.005587]  ? __schedule+0x10cc/0x2b30
[   12.005609]  ? __pfx_read_tsc+0x10/0x10
[   12.005629]  ? ktime_get_ts64+0x86/0x230
[   12.005656]  kunit_try_run_case+0x1a5/0x480
[   12.005681]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.005703]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.005726]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.005747]  ? __kthread_parkme+0x82/0x180
[   12.005769]  ? preempt_count_sub+0x50/0x80
[   12.005795]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.005817]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.005839]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.005861]  kthread+0x337/0x6f0
[   12.005893]  ? trace_preempt_on+0x20/0xc0
[   12.005917]  ? __pfx_kthread+0x10/0x10
[   12.005935]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.005954]  ? calculate_sigpending+0x7b/0xa0
[   12.005976]  ? __pfx_kthread+0x10/0x10
[   12.005995]  ret_from_fork+0x41/0x80
[   12.006015]  ? __pfx_kthread+0x10/0x10
[   12.006032]  ret_from_fork_asm+0x1a/0x30
[   12.006063]  </TASK>
[   12.006074] 
[   12.019645] Allocated by task 1:
[   12.019879]  kasan_save_stack+0x45/0x70
[   12.020212]  kasan_save_track+0x18/0x40
[   12.020444]  kasan_save_alloc_info+0x3b/0x50
[   12.020764]  __kasan_kmalloc+0xb7/0xc0
[   12.021259]  __kmalloc_node_track_caller_noprof+0x1cb/0x500
[   12.022110]  kvasprintf+0xc5/0x150
[   12.022268]  __kthread_create_on_node+0x18b/0x3a0
[   12.022455]  kthread_create_on_node+0xab/0xe0
[   12.022850]  create_worker+0x3e5/0x7b0
[   12.023348]  alloc_unbound_pwq+0x8ea/0xdb0
[   12.023787]  apply_wqattrs_prepare+0x332/0xd20
[   12.024161]  apply_workqueue_attrs_locked+0x4d/0xa0
[   12.024344]  alloc_workqueue+0xcc7/0x1ad0
[   12.024602]  latency_fsnotify_init+0x1b/0x50
[   12.024983]  do_one_initcall+0xd8/0x370
[   12.025443]  kernel_init_freeable+0x420/0x6f0
[   12.025837]  kernel_init+0x23/0x1e0
[   12.026285]  ret_from_fork+0x41/0x80
[   12.026579]  ret_from_fork_asm+0x1a/0x30
[   12.026729] 
[   12.026803] The buggy address belongs to the object at ffff8881020cbde0
[   12.026803]  which belongs to the cache kmalloc-16 of size 16
[   12.027927] The buggy address is located 18 bytes to the right of
[   12.027927]  allocated 13-byte region [ffff8881020cbde0, ffff8881020cbded)
[   12.029206] 
[   12.029302] The buggy address belongs to the physical page:
[   12.029532] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1020cb
[   12.030410] flags: 0x200000000000000(node=0|zone=2)
[   12.030876] page_type: f5(slab)
[   12.031275] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   12.031711] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   12.032089] page dumped because: kasan: bad access detected
[   12.032666] 
[   12.032868] Memory state around the buggy address:
[   12.033347]  ffff8881020cbc80: 00 03 fc fc fa fb fc fc 00 02 fc fc 00 05 fc fc
[   12.034074]  ffff8881020cbd00: 00 02 fc fc 00 02 fc fc 00 02 fc fc 00 02 fc fc
[   12.034356] >ffff8881020cbd80: fa fb fc fc fa fb fc fc fa fb fc fc 00 05 fc fc
[   12.034850]                                                                 ^
[   12.035597]  ffff8881020cbe00: 00 07 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.036414]  ffff8881020cbe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.036678] ==================================================================