Hay
Date
July 9, 2025, 1:08 p.m.

Environment
qemu-arm64
qemu-x86_64

[   31.606624] ==================================================================
[   31.606696] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   31.607129] Read of size 1 at addr fff00000c9c23858 by task kunit_try_catch/289
[   31.607240] 
[   31.607298] CPU: 1 UID: 0 PID: 289 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250709 #1 PREEMPT 
[   31.607547] Tainted: [B]=BAD_PAGE, [N]=TEST
[   31.607593] Hardware name: linux,dummy-virt (DT)
[   31.607632] Call trace:
[   31.607932]  show_stack+0x20/0x38 (C)
[   31.608165]  dump_stack_lvl+0x8c/0xd0
[   31.608341]  print_report+0x118/0x5d0
[   31.608580]  kasan_report+0xdc/0x128
[   31.608906]  __asan_report_load1_noabort+0x20/0x30
[   31.609020]  memcmp+0x198/0x1d8
[   31.609250]  kasan_memcmp+0x16c/0x300
[   31.609475]  kunit_try_run_case+0x170/0x3f0
[   31.609576]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.609637]  kthread+0x328/0x630
[   31.610028]  ret_from_fork+0x10/0x20
[   31.610224] 
[   31.610466] Allocated by task 289:
[   31.610662]  kasan_save_stack+0x3c/0x68
[   31.610808]  kasan_save_track+0x20/0x40
[   31.610849]  kasan_save_alloc_info+0x40/0x58
[   31.610896]  __kasan_kmalloc+0xd4/0xd8
[   31.610937]  __kmalloc_cache_noprof+0x16c/0x3c0
[   31.611029]  kasan_memcmp+0xbc/0x300
[   31.611086]  kunit_try_run_case+0x170/0x3f0
[   31.611139]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.611195]  kthread+0x328/0x630
[   31.611240]  ret_from_fork+0x10/0x20
[   31.611286] 
[   31.611308] The buggy address belongs to the object at fff00000c9c23840
[   31.611308]  which belongs to the cache kmalloc-32 of size 32
[   31.611382] The buggy address is located 0 bytes to the right of
[   31.611382]  allocated 24-byte region [fff00000c9c23840, fff00000c9c23858)
[   31.611450] 
[   31.611475] The buggy address belongs to the physical page:
[   31.611509] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109c23
[   31.611575] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   31.612042] page_type: f5(slab)
[   31.612300] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   31.612385] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   31.612616] page dumped because: kasan: bad access detected
[   31.612822] 
[   31.612890] Memory state around the buggy address:
[   31.612926]  fff00000c9c23700: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   31.613375]  fff00000c9c23780: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   31.613451] >fff00000c9c23800: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   31.613796]                                                     ^
[   31.613870]  fff00000c9c23880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.614206]  fff00000c9c23900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.614543] ==================================================================

[   25.999676] ==================================================================
[   26.001545] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   26.002243] Read of size 1 at addr ffff8881058d4918 by task kunit_try_catch/307
[   26.002481] 
[   26.002574] CPU: 0 UID: 0 PID: 307 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc5-next-20250709 #1 PREEMPT(voluntary) 
[   26.002631] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   26.002646] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.002679] Call Trace:
[   26.002706]  <TASK>
[   26.002729]  dump_stack_lvl+0x73/0xb0
[   26.002791]  print_report+0xd1/0x610
[   26.002820]  ? __virt_addr_valid+0x1db/0x2d0
[   26.002847]  ? memcmp+0x1b4/0x1d0
[   26.003004]  ? kasan_complete_mode_report_info+0x2a/0x200
[   26.003039]  ? memcmp+0x1b4/0x1d0
[   26.003073]  kasan_report+0x141/0x180
[   26.003096]  ? memcmp+0x1b4/0x1d0
[   26.003121]  __asan_report_load1_noabort+0x18/0x20
[   26.003145]  memcmp+0x1b4/0x1d0
[   26.003165]  kasan_memcmp+0x18f/0x390
[   26.003186]  ? trace_hardirqs_on+0x37/0xe0
[   26.003211]  ? __pfx_kasan_memcmp+0x10/0x10
[   26.003230]  ? finish_task_switch.isra.0+0x153/0x700
[   26.003255]  ? __switch_to+0x47/0xf80
[   26.003284]  ? __pfx_read_tsc+0x10/0x10
[   26.003343]  ? ktime_get_ts64+0x86/0x230
[   26.003403]  kunit_try_run_case+0x1a5/0x480
[   26.003427]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.003448]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   26.003473]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   26.003497]  ? __kthread_parkme+0x82/0x180
[   26.003520]  ? preempt_count_sub+0x50/0x80
[   26.003542]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.003566]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.003590]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   26.003616]  kthread+0x337/0x6f0
[   26.003635]  ? trace_preempt_on+0x20/0xc0
[   26.003657]  ? __pfx_kthread+0x10/0x10
[   26.003677]  ? _raw_spin_unlock_irq+0x47/0x80
[   26.003711]  ? calculate_sigpending+0x7b/0xa0
[   26.003736]  ? __pfx_kthread+0x10/0x10
[   26.003759]  ret_from_fork+0x116/0x1d0
[   26.003797]  ? __pfx_kthread+0x10/0x10
[   26.003823]  ret_from_fork_asm+0x1a/0x30
[   26.003853]  </TASK>
[   26.003866] 
[   26.018510] Allocated by task 307:
[   26.018961]  kasan_save_stack+0x45/0x70
[   26.019372]  kasan_save_track+0x18/0x40
[   26.019513]  kasan_save_alloc_info+0x3b/0x50
[   26.019659]  __kasan_kmalloc+0xb7/0xc0
[   26.020095]  __kmalloc_cache_noprof+0x189/0x420
[   26.020519]  kasan_memcmp+0xb7/0x390
[   26.021049]  kunit_try_run_case+0x1a5/0x480
[   26.021374]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.021542]  kthread+0x337/0x6f0
[   26.021656]  ret_from_fork+0x116/0x1d0
[   26.021791]  ret_from_fork_asm+0x1a/0x30
[   26.022033] 
[   26.022211] The buggy address belongs to the object at ffff8881058d4900
[   26.022211]  which belongs to the cache kmalloc-32 of size 32
[   26.023335] The buggy address is located 0 bytes to the right of
[   26.023335]  allocated 24-byte region [ffff8881058d4900, ffff8881058d4918)
[   26.024515] 
[   26.024591] The buggy address belongs to the physical page:
[   26.024793] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058d4
[   26.025541] flags: 0x200000000000000(node=0|zone=2)
[   26.026048] page_type: f5(slab)
[   26.026210] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   26.026649] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   26.027384] page dumped because: kasan: bad access detected
[   26.027712] 
[   26.027848] Memory state around the buggy address:
[   26.028333]  ffff8881058d4800: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   26.028800]  ffff8881058d4880: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   26.029079] >ffff8881058d4900: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.029286]                             ^
[   26.029416]  ffff8881058d4980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.029620]  ffff8881058d4a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.030602] ==================================================================