Hay
Date
June 16, 2025, 7:07 a.m.

Environment
qemu-arm64
qemu-x86_64

[   22.215674] ==================================================================
[   22.216170] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   22.216293] Read of size 1 at addr fff00000c63fb198 by task kunit_try_catch/266
[   22.216614] 
[   22.216686] CPU: 0 UID: 0 PID: 266 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250616 #1 PREEMPT 
[   22.217070] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.217128] Hardware name: linux,dummy-virt (DT)
[   22.217302] Call trace:
[   22.217345]  show_stack+0x20/0x38 (C)
[   22.217457]  dump_stack_lvl+0x8c/0xd0
[   22.217678]  print_report+0x118/0x608
[   22.217941]  kasan_report+0xdc/0x128
[   22.218134]  __asan_report_load1_noabort+0x20/0x30
[   22.218215]  memcmp+0x198/0x1d8
[   22.218276]  kasan_memcmp+0x16c/0x300
[   22.218384]  kunit_try_run_case+0x170/0x3f0
[   22.218468]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.218714]  kthread+0x328/0x630
[   22.218798]  ret_from_fork+0x10/0x20
[   22.219204] 
[   22.219241] Allocated by task 266:
[   22.219427]  kasan_save_stack+0x3c/0x68
[   22.219498]  kasan_save_track+0x20/0x40
[   22.219711]  kasan_save_alloc_info+0x40/0x58
[   22.219896]  __kasan_kmalloc+0xd4/0xd8
[   22.219959]  __kmalloc_cache_noprof+0x16c/0x3c0
[   22.220018]  kasan_memcmp+0xbc/0x300
[   22.220063]  kunit_try_run_case+0x170/0x3f0
[   22.220108]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.220160]  kthread+0x328/0x630
[   22.220199]  ret_from_fork+0x10/0x20
[   22.220266] 
[   22.220299] The buggy address belongs to the object at fff00000c63fb180
[   22.220299]  which belongs to the cache kmalloc-32 of size 32
[   22.220392] The buggy address is located 0 bytes to the right of
[   22.220392]  allocated 24-byte region [fff00000c63fb180, fff00000c63fb198)
[   22.220476] 
[   22.220508] The buggy address belongs to the physical page:
[   22.220554] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1063fb
[   22.220624] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   22.220693] page_type: f5(slab)
[   22.220750] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   22.221085] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   22.221481] page dumped because: kasan: bad access detected
[   22.221556] 
[   22.221586] Memory state around the buggy address:
[   22.221873]  fff00000c63fb080: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   22.222013]  fff00000c63fb100: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   22.222082] >fff00000c63fb180: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.222157]                             ^
[   22.222373]  fff00000c63fb200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.222620]  fff00000c63fb280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.222844] ==================================================================

[   13.383756] ==================================================================
[   13.384919] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   13.385609] Read of size 1 at addr ffff888102a33e58 by task kunit_try_catch/282
[   13.386362] 
[   13.386602] CPU: 0 UID: 0 PID: 282 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250616 #1 PREEMPT(voluntary) 
[   13.386654] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.386666] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.386687] Call Trace:
[   13.386700]  <TASK>
[   13.386719]  dump_stack_lvl+0x73/0xb0
[   13.386748]  print_report+0xd1/0x650
[   13.386773]  ? __virt_addr_valid+0x1db/0x2d0
[   13.386796]  ? memcmp+0x1b4/0x1d0
[   13.386816]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.386839]  ? memcmp+0x1b4/0x1d0
[   13.386859]  kasan_report+0x141/0x180
[   13.386880]  ? memcmp+0x1b4/0x1d0
[   13.386905]  __asan_report_load1_noabort+0x18/0x20
[   13.386939]  memcmp+0x1b4/0x1d0
[   13.386962]  kasan_memcmp+0x18f/0x390
[   13.386984]  ? __pfx_kasan_memcmp+0x10/0x10
[   13.387004]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   13.387032]  ? __pfx_kasan_memcmp+0x10/0x10
[   13.387056]  kunit_try_run_case+0x1a5/0x480
[   13.387080]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.387101]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.387123]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.387144]  ? __kthread_parkme+0x82/0x180
[   13.387167]  ? preempt_count_sub+0x50/0x80
[   13.387190]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.387212]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.387234]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.387257]  kthread+0x337/0x6f0
[   13.387276]  ? trace_preempt_on+0x20/0xc0
[   13.387301]  ? __pfx_kthread+0x10/0x10
[   13.387321]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.387341]  ? calculate_sigpending+0x7b/0xa0
[   13.387365]  ? __pfx_kthread+0x10/0x10
[   13.387429]  ret_from_fork+0x116/0x1d0
[   13.387450]  ? __pfx_kthread+0x10/0x10
[   13.387470]  ret_from_fork_asm+0x1a/0x30
[   13.387501]  </TASK>
[   13.387513] 
[   13.398973] Allocated by task 282:
[   13.399177]  kasan_save_stack+0x45/0x70
[   13.399320]  kasan_save_track+0x18/0x40
[   13.399686]  kasan_save_alloc_info+0x3b/0x50
[   13.400094]  __kasan_kmalloc+0xb7/0xc0
[   13.400682]  __kmalloc_cache_noprof+0x189/0x420
[   13.400987]  kasan_memcmp+0xb7/0x390
[   13.401114]  kunit_try_run_case+0x1a5/0x480
[   13.401252]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.401623]  kthread+0x337/0x6f0
[   13.401948]  ret_from_fork+0x116/0x1d0
[   13.402293]  ret_from_fork_asm+0x1a/0x30
[   13.402748] 
[   13.402904] The buggy address belongs to the object at ffff888102a33e40
[   13.402904]  which belongs to the cache kmalloc-32 of size 32
[   13.403750] The buggy address is located 0 bytes to the right of
[   13.403750]  allocated 24-byte region [ffff888102a33e40, ffff888102a33e58)
[   13.404674] 
[   13.404748] The buggy address belongs to the physical page:
[   13.404914] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a33
[   13.405158] flags: 0x200000000000000(node=0|zone=2)
[   13.405314] page_type: f5(slab)
[   13.405623] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.406536] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   13.407200] page dumped because: kasan: bad access detected
[   13.407733] 
[   13.407886] Memory state around the buggy address:
[   13.408322]  ffff888102a33d00: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc
[   13.409005]  ffff888102a33d80: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   13.409512] >ffff888102a33e00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.409855]                                                     ^
[   13.410290]  ffff888102a33e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.410866]  ffff888102a33f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.411365] ==================================================================