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

Environment
qemu-arm64
qemu-x86_64

[   18.925108] ==================================================================
[   18.925177] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   18.925239] Read of size 1 at addr fff00000c78e3fd8 by task kunit_try_catch/257
[   18.925600] 
[   18.925899] CPU: 0 UID: 0 PID: 257 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   18.926613] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.926652] Hardware name: linux,dummy-virt (DT)
[   18.926686] Call trace:
[   18.926937]  show_stack+0x20/0x38 (C)
[   18.927304]  dump_stack_lvl+0x8c/0xd0
[   18.927563]  print_report+0x118/0x5d0
[   18.927886]  kasan_report+0xdc/0x128
[   18.928289]  __asan_report_load1_noabort+0x20/0x30
[   18.928465]  memcmp+0x198/0x1d8
[   18.928510]  kasan_memcmp+0x16c/0x300
[   18.928691]  kunit_try_run_case+0x170/0x3f0
[   18.928749]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.928805]  kthread+0x328/0x630
[   18.928850]  ret_from_fork+0x10/0x20
[   18.928915] 
[   18.928938] Allocated by task 257:
[   18.928997]  kasan_save_stack+0x3c/0x68
[   18.929109]  kasan_save_track+0x20/0x40
[   18.929186]  kasan_save_alloc_info+0x40/0x58
[   18.929292]  __kasan_kmalloc+0xd4/0xd8
[   18.929363]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.929415]  kasan_memcmp+0xbc/0x300
[   18.929474]  kunit_try_run_case+0x170/0x3f0
[   18.929617]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.929714]  kthread+0x328/0x630
[   18.929768]  ret_from_fork+0x10/0x20
[   18.929911] 
[   18.929978] The buggy address belongs to the object at fff00000c78e3fc0
[   18.929978]  which belongs to the cache kmalloc-32 of size 32
[   18.930046] The buggy address is located 0 bytes to the right of
[   18.930046]  allocated 24-byte region [fff00000c78e3fc0, fff00000c78e3fd8)
[   18.930246] 
[   18.930299] The buggy address belongs to the physical page:
[   18.931279] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078e3
[   18.931342] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.931395] page_type: f5(slab)
[   18.931438] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   18.931494] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   18.931536] page dumped because: kasan: bad access detected
[   18.931571] 
[   18.931590] Memory state around the buggy address:
[   18.931624]  fff00000c78e3e80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   18.952775]  fff00000c79fa100: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   18.960088]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.962801]  strlen+0xa8/0xb0
[   18.964858] The buggy address is located 16 bytes inside of
[   18.964858]  freed 32-byte region [fff00000c79fa180, fff00000c79fa1a0)
[   18.966242] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.966936]  kasan_save_stack+0x3c/0x68
[   18.967307]  ret_from_fork+0x10/0x20
[   18.967546]  kfree+0x214/0x3c8
[   18.967698]  kthread+0x328/0x630
[   18.969419] 
[   18.971485] page dumped because: kasan: bad access detected
[   18.971833] ==================================================================

[   14.214461] ==================================================================
[   14.215212] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   14.215515] Read of size 1 at addr ffff8881026c3cd8 by task kunit_try_catch/274
[   14.215866] 
[   14.215999] CPU: 1 UID: 0 PID: 274 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   14.216059] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.216071] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.216094] Call Trace:
[   14.216107]  <TASK>
[   14.216126]  dump_stack_lvl+0x73/0xb0
[   14.216153]  print_report+0xd1/0x610
[   14.216180]  ? __virt_addr_valid+0x1db/0x2d0
[   14.216205]  ? memcmp+0x1b4/0x1d0
[   14.216222]  ? kasan_complete_mode_report_info+0x2a/0x200
[   14.216245]  ? memcmp+0x1b4/0x1d0
[   14.216262]  kasan_report+0x141/0x180
[   14.216284]  ? memcmp+0x1b4/0x1d0
[   14.216307]  __asan_report_load1_noabort+0x18/0x20
[   14.216331]  memcmp+0x1b4/0x1d0
[   14.216351]  kasan_memcmp+0x18f/0x390
[   14.216370]  ? trace_hardirqs_on+0x37/0xe0
[   14.216395]  ? __pfx_kasan_memcmp+0x10/0x10
[   14.216414]  ? finish_task_switch.isra.0+0x153/0x700
[   14.216439]  ? __switch_to+0x47/0xf50
[   14.216469]  ? __pfx_read_tsc+0x10/0x10
[   14.216493]  ? ktime_get_ts64+0x86/0x230
[   14.216519]  kunit_try_run_case+0x1a5/0x480
[   14.216546]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.216569]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.216593]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.216617]  ? __kthread_parkme+0x82/0x180
[   14.216637]  ? preempt_count_sub+0x50/0x80
[   14.216661]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.216685]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.216708]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.216732]  kthread+0x337/0x6f0
[   14.216750]  ? trace_preempt_on+0x20/0xc0
[   14.216771]  ? __pfx_kthread+0x10/0x10
[   14.216790]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.216811]  ? calculate_sigpending+0x7b/0xa0
[   14.216836]  ? __pfx_kthread+0x10/0x10
[   14.216857]  ret_from_fork+0x116/0x1d0
[   14.216875]  ? __pfx_kthread+0x10/0x10
[   14.216894]  ret_from_fork_asm+0x1a/0x30
[   14.216928]  </TASK>
[   14.216937] 
[   14.224795] Allocated by task 274:
[   14.224986]  kasan_save_stack+0x45/0x70
[   14.225389]  kasan_save_track+0x18/0x40
[   14.225601]  kasan_save_alloc_info+0x3b/0x50
[   14.225751]  __kasan_kmalloc+0xb7/0xc0
[   14.225883]  __kmalloc_cache_noprof+0x189/0x420
[   14.226188]  kasan_memcmp+0xb7/0x390
[   14.226375]  kunit_try_run_case+0x1a5/0x480
[   14.226582]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.227007]  kthread+0x337/0x6f0
[   14.227180]  ret_from_fork+0x116/0x1d0
[   14.227316]  ret_from_fork_asm+0x1a/0x30
[   14.227457] 
[   14.227548] The buggy address belongs to the object at ffff8881026c3cc0
[   14.227548]  which belongs to the cache kmalloc-32 of size 32
[   14.228198] The buggy address is located 0 bytes to the right of
[   14.228198]  allocated 24-byte region [ffff8881026c3cc0, ffff8881026c3cd8)
[   14.228842] 
[   14.228922] The buggy address belongs to the physical page:
[   14.229249] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1026c3
[   14.229627] flags: 0x200000000000000(node=0|zone=2)
[   14.229873] page_type: f5(slab)
[   14.230132] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.230457] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.232022] page dumped because: kasan: bad access detected
[   14.232280] 
[   14.232361] Memory state around the buggy address:
[   14.232572]  ffff8881026c3b80: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc
[   14.233120]  ffff8881026c3c00: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   14.233414] >ffff8881026c3c80: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.233902]                                                     ^
[   14.234272]  ffff8881026c3d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.234580]  ffff8881026c3d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.235027] ==================================================================