Hay
Date
July 19, 2025, 11:11 a.m.

Environment
qemu-arm64
qemu-x86_64

[   17.520140] ==================================================================
[   17.520240] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   17.520326] Read of size 1 at addr fff00000c77df918 by task kunit_try_catch/258
[   17.520380] 
[   17.520511] CPU: 1 UID: 0 PID: 258 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   17.520617] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.520715] Hardware name: linux,dummy-virt (DT)
[   17.520772] Call trace:
[   17.520798]  show_stack+0x20/0x38 (C)
[   17.520858]  dump_stack_lvl+0x8c/0xd0
[   17.521093]  print_report+0x118/0x5d0
[   17.521290]  kasan_report+0xdc/0x128
[   17.521345]  __asan_report_load1_noabort+0x20/0x30
[   17.521485]  memcmp+0x198/0x1d8
[   17.521557]  kasan_memcmp+0x16c/0x300
[   17.521680]  kunit_try_run_case+0x170/0x3f0
[   17.521756]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.521813]  kthread+0x328/0x630
[   17.521922]  ret_from_fork+0x10/0x20
[   17.521972] 
[   17.521996] Allocated by task 258:
[   17.522032]  kasan_save_stack+0x3c/0x68
[   17.522279]  kasan_save_track+0x20/0x40
[   17.522664]  kasan_save_alloc_info+0x40/0x58
[   17.522751]  __kasan_kmalloc+0xd4/0xd8
[   17.522874]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.522952]  kasan_memcmp+0xbc/0x300
[   17.522991]  kunit_try_run_case+0x170/0x3f0
[   17.523224]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.523298]  kthread+0x328/0x630
[   17.523344]  ret_from_fork+0x10/0x20
[   17.523418] 
[   17.523441] The buggy address belongs to the object at fff00000c77df900
[   17.523441]  which belongs to the cache kmalloc-32 of size 32
[   17.523605] The buggy address is located 0 bytes to the right of
[   17.523605]  allocated 24-byte region [fff00000c77df900, fff00000c77df918)
[   17.523779] 
[   17.523816] The buggy address belongs to the physical page:
[   17.523856] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077df
[   17.523914] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.523965] page_type: f5(slab)
[   17.524006] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   17.524068] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   17.524111] page dumped because: kasan: bad access detected
[   17.524156] 
[   17.524185] Memory state around the buggy address:
[   17.524219]  fff00000c77df800: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   17.524265]  fff00000c77df880: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   17.524321] >fff00000c77df900: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.524370]                             ^
[   17.524402]  fff00000c77df980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.524458]  fff00000c77dfa00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.524513] ==================================================================

[   13.913264] ==================================================================
[   13.913757] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   13.914057] Read of size 1 at addr ffff8881039f8818 by task kunit_try_catch/275
[   13.914438] 
[   13.914579] CPU: 0 UID: 0 PID: 275 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   13.914639] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.914653] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.914682] Call Trace:
[   13.914697]  <TASK>
[   13.914717]  dump_stack_lvl+0x73/0xb0
[   13.914751]  print_report+0xd1/0x610
[   13.914779]  ? __virt_addr_valid+0x1db/0x2d0
[   13.914807]  ? memcmp+0x1b4/0x1d0
[   13.914827]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.914856]  ? memcmp+0x1b4/0x1d0
[   13.914878]  kasan_report+0x141/0x180
[   13.914903]  ? memcmp+0x1b4/0x1d0
[   13.914931]  __asan_report_load1_noabort+0x18/0x20
[   13.914961]  memcmp+0x1b4/0x1d0
[   13.914985]  kasan_memcmp+0x18f/0x390
[   13.915009]  ? trace_hardirqs_on+0x37/0xe0
[   13.915038]  ? __pfx_kasan_memcmp+0x10/0x10
[   13.915062]  ? finish_task_switch.isra.0+0x153/0x700
[   13.915091]  ? __switch_to+0x47/0xf50
[   13.915126]  ? __pfx_read_tsc+0x10/0x10
[   13.915151]  ? ktime_get_ts64+0x86/0x230
[   13.915200]  kunit_try_run_case+0x1a5/0x480
[   13.915231]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.915258]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.915288]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.915317]  ? __kthread_parkme+0x82/0x180
[   13.915344]  ? preempt_count_sub+0x50/0x80
[   13.915374]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.915403]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.915432]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.915463]  kthread+0x337/0x6f0
[   13.915485]  ? trace_preempt_on+0x20/0xc0
[   13.915522]  ? __pfx_kthread+0x10/0x10
[   13.915547]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.915572]  ? calculate_sigpending+0x7b/0xa0
[   13.915601]  ? __pfx_kthread+0x10/0x10
[   13.915627]  ret_from_fork+0x116/0x1d0
[   13.915651]  ? __pfx_kthread+0x10/0x10
[   13.915675]  ret_from_fork_asm+0x1a/0x30
[   13.915714]  </TASK>
[   13.915727] 
[   13.923517] Allocated by task 275:
[   13.923660]  kasan_save_stack+0x45/0x70
[   13.923832]  kasan_save_track+0x18/0x40
[   13.924034]  kasan_save_alloc_info+0x3b/0x50
[   13.924258]  __kasan_kmalloc+0xb7/0xc0
[   13.924459]  __kmalloc_cache_noprof+0x189/0x420
[   13.925152]  kasan_memcmp+0xb7/0x390
[   13.925312]  kunit_try_run_case+0x1a5/0x480
[   13.925639]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.925918]  kthread+0x337/0x6f0
[   13.926207]  ret_from_fork+0x116/0x1d0
[   13.926390]  ret_from_fork_asm+0x1a/0x30
[   13.926556] 
[   13.926637] The buggy address belongs to the object at ffff8881039f8800
[   13.926637]  which belongs to the cache kmalloc-32 of size 32
[   13.927032] The buggy address is located 0 bytes to the right of
[   13.927032]  allocated 24-byte region [ffff8881039f8800, ffff8881039f8818)
[   13.927948] 
[   13.928070] The buggy address belongs to the physical page:
[   13.928647] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039f8
[   13.928921] flags: 0x200000000000000(node=0|zone=2)
[   13.929377] page_type: f5(slab)
[   13.929587] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.929941] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   13.930353] page dumped because: kasan: bad access detected
[   13.930584] 
[   13.930685] Memory state around the buggy address:
[   13.930933]  ffff8881039f8700: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   13.931343]  ffff8881039f8780: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.931597] >ffff8881039f8800: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.931829]                             ^
[   13.931984]  ffff8881039f8880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.932467]  ffff8881039f8900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.932836] ==================================================================