Hay
Date
June 2, 2025, 2:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.037414] ==================================================================
[   19.038054] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x308/0x340
[   19.038757] Read of size 1 at addr fff00000c64513bf by task kunit_try_catch/127
[   19.039311] 
[   19.039628] CPU: 1 UID: 0 PID: 127 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   19.039841] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.039910] Hardware name: linux,dummy-virt (DT)
[   19.039986] Call trace:
[   19.040045]  dump_backtrace+0x9c/0x128
[   19.040159]  show_stack+0x20/0x38
[   19.040264]  dump_stack_lvl+0x8c/0xd0
[   19.040357]  print_report+0x118/0x5f0
[   19.040445]  kasan_report+0xdc/0x128
[   19.040535]  __asan_report_load1_noabort+0x20/0x30
[   19.040644]  kmalloc_oob_left+0x308/0x340
[   19.040748]  kunit_try_run_case+0x170/0x3f0
[   19.040828]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.040881]  kthread+0x24c/0x2d0
[   19.040925]  ret_from_fork+0x10/0x20
[   19.040973] 
[   19.046341] Allocated by task 1:
[   19.046829]  kasan_save_stack+0x3c/0x68
[   19.047367]  kasan_save_track+0x20/0x40
[   19.047995]  kasan_save_alloc_info+0x40/0x58
[   19.048661]  __kasan_kmalloc+0xd4/0xd8
[   19.049113]  __kmalloc_node_track_caller_noprof+0x194/0x438
[   19.049648]  kvasprintf+0xe0/0x180
[   19.050090]  __kthread_create_on_node+0x16c/0x348
[   19.050573]  kthread_create_on_node+0xe4/0x130
[   19.050973]  create_worker+0x380/0x6b8
[   19.051807]  alloc_unbound_pwq+0x62c/0x778
[   19.052456]  apply_wqattrs_prepare+0x1a0/0x6e0
[   19.052912]  apply_workqueue_attrs_locked+0x58/0xb8
[   19.053591]  alloc_workqueue+0x9ac/0x1440
[   19.054160]  latency_fsnotify_init+0x28/0x60
[   19.054774]  do_one_initcall+0xd0/0x608
[   19.055623]  kernel_init_freeable+0x3e0/0x8a0
[   19.056010]  kernel_init+0x2c/0x1f8
[   19.056387]  ret_from_fork+0x10/0x20
[   19.057002] 
[   19.057289] The buggy address belongs to the object at fff00000c64513a0
[   19.057289]  which belongs to the cache kmalloc-16 of size 16
[   19.058216] The buggy address is located 18 bytes to the right of
[   19.058216]  allocated 13-byte region [fff00000c64513a0, fff00000c64513ad)
[   19.059138] 
[   19.059475] The buggy address belongs to the physical page:
[   19.060026] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106451
[   19.060600] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.061099] page_type: f5(slab)
[   19.062854] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   19.063387] raw: 0000000000000000 0000000080800080 00000001f5000000 0000000000000000
[   19.064141] page dumped because: kasan: bad access detected
[   19.064596] 
[   19.064877] Memory state around the buggy address:
[   19.065404]  fff00000c6451280: 00 00 fc fc 00 06 fc fc 00 06 fc fc 00 00 fc fc
[   19.066504]  fff00000c6451300: 00 02 fc fc 00 02 fc fc 00 06 fc fc 00 06 fc fc
[   19.066911] >fff00000c6451380: fa fb fc fc 00 05 fc fc 00 07 fc fc fc fc fc fc
[   19.067304]                                         ^
[   19.067629]  fff00000c6451400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.067993]  fff00000c6451480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.069118] ==================================================================

[   11.370701] ==================================================================
[   11.371145] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x363/0x3c0
[   11.371668] Read of size 1 at addr ffff8881024e40ff by task kunit_try_catch/145
[   11.371963] 
[   11.372245] CPU: 0 UID: 0 PID: 145 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   11.372333] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.372358] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.372398] Call Trace:
[   11.372426]  <TASK>
[   11.372461]  dump_stack_lvl+0x73/0xb0
[   11.372522]  print_report+0xd1/0x640
[   11.372568]  ? __virt_addr_valid+0x1db/0x2d0
[   11.372614]  ? kmalloc_oob_left+0x363/0x3c0
[   11.372649]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.372698]  ? kmalloc_oob_left+0x363/0x3c0
[   11.372735]  kasan_report+0x140/0x180
[   11.372776]  ? kmalloc_oob_left+0x363/0x3c0
[   11.373290]  __asan_report_load1_noabort+0x18/0x20
[   11.373345]  kmalloc_oob_left+0x363/0x3c0
[   11.373369]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   11.373391]  ? __schedule+0xc49/0x27a0
[   11.373413]  ? __pfx_read_tsc+0x10/0x10
[   11.373432]  ? ktime_get_ts64+0x84/0x230
[   11.373458]  kunit_try_run_case+0x1a6/0x480
[   11.373480]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.373498]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   11.373518]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.373542]  ? __kthread_parkme+0x82/0x160
[   11.373561]  ? preempt_count_sub+0x50/0x80
[   11.373583]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.373602]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.373627]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.373651]  kthread+0x257/0x310
[   11.373691]  ? __pfx_kthread+0x10/0x10
[   11.373709]  ret_from_fork+0x41/0x80
[   11.373728]  ? __pfx_kthread+0x10/0x10
[   11.373746]  ret_from_fork_asm+0x1a/0x30
[   11.373775]  </TASK>
[   11.373788] 
[   11.382772] Allocated by task 1:
[   11.383015]  kasan_save_stack+0x45/0x70
[   11.383480]  kasan_save_track+0x18/0x40
[   11.383649]  kasan_save_alloc_info+0x3b/0x50
[   11.383820]  __kasan_kmalloc+0xb7/0xc0
[   11.383970]  __kmalloc_node_track_caller_noprof+0x1ee/0x460
[   11.384731]  kvasprintf+0xc6/0x150
[   11.385144]  __kthread_create_on_node+0x18c/0x3a0
[   11.385725]  kthread_create_on_node+0xac/0xe0
[   11.386822]  create_worker+0x3e7/0x7b0
[   11.388067]  alloc_unbound_pwq+0x8ea/0xdb0
[   11.388261]  apply_wqattrs_prepare+0x332/0xd20
[   11.388411]  apply_workqueue_attrs_locked+0x4d/0xa0
[   11.388575]  alloc_workqueue+0xcc8/0x1ad0
[   11.389382]  latency_fsnotify_init+0x1b/0x50
[   11.390322]  do_one_initcall+0xd9/0x370
[   11.390704]  kernel_init_freeable+0x425/0x6f0
[   11.391410]  kernel_init+0x23/0x1e0
[   11.391703]  ret_from_fork+0x41/0x80
[   11.391974]  ret_from_fork_asm+0x1a/0x30
[   11.392261] 
[   11.392400] The buggy address belongs to the object at ffff8881024e40e0
[   11.392400]  which belongs to the cache kmalloc-16 of size 16
[   11.393473] The buggy address is located 18 bytes to the right of
[   11.393473]  allocated 13-byte region [ffff8881024e40e0, ffff8881024e40ed)
[   11.394548] 
[   11.394760] The buggy address belongs to the physical page:
[   11.394975] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1024e4
[   11.395797] flags: 0x200000000000000(node=0|zone=2)
[   11.396308] page_type: f5(slab)
[   11.396492] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   11.396927] raw: 0000000000000000 0000000080800080 00000001f5000000 0000000000000000
[   11.397557] page dumped because: kasan: bad access detected
[   11.397871] 
[   11.398043] Memory state around the buggy address:
[   11.398528]  ffff8881024e3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.399375]  ffff8881024e4000: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   11.399764] >ffff8881024e4080: fa fb fc fc 00 03 fc fc 00 03 fc fc 00 05 fc fc
[   11.400315]                                                                 ^
[   11.400688]  ffff8881024e4100: 00 07 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.401313]  ffff8881024e4180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.401700] ==================================================================