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

Environment
qemu-arm64
qemu-x86_64

[   19.184795] ==================================================================
[   19.184867] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   19.185338] Read of size 1 at addr fff00000c57eaa18 by task kunit_try_catch/258
[   19.185424] 
[   19.185606] CPU: 0 UID: 0 PID: 258 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   19.185848] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.186039] Hardware name: linux,dummy-virt (DT)
[   19.186185] Call trace:
[   19.186256]  show_stack+0x20/0x38 (C)
[   19.186596]  dump_stack_lvl+0x8c/0xd0
[   19.186752]  print_report+0x118/0x608
[   19.186847]  kasan_report+0xdc/0x128
[   19.187037]  __asan_report_load1_noabort+0x20/0x30
[   19.187115]  memcmp+0x198/0x1d8
[   19.187441]  kasan_memcmp+0x16c/0x300
[   19.187509]  kunit_try_run_case+0x170/0x3f0
[   19.187562]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.187629]  kthread+0x328/0x630
[   19.187738]  ret_from_fork+0x10/0x20
[   19.187803] 
[   19.187834] Allocated by task 258:
[   19.187866]  kasan_save_stack+0x3c/0x68
[   19.187911]  kasan_save_track+0x20/0x40
[   19.187951]  kasan_save_alloc_info+0x40/0x58
[   19.187993]  __kasan_kmalloc+0xd4/0xd8
[   19.188031]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.188083]  kasan_memcmp+0xbc/0x300
[   19.188120]  kunit_try_run_case+0x170/0x3f0
[   19.188159]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.188212]  kthread+0x328/0x630
[   19.188256]  ret_from_fork+0x10/0x20
[   19.188300] 
[   19.188329] The buggy address belongs to the object at fff00000c57eaa00
[   19.188329]  which belongs to the cache kmalloc-32 of size 32
[   19.188392] The buggy address is located 0 bytes to the right of
[   19.188392]  allocated 24-byte region [fff00000c57eaa00, fff00000c57eaa18)
[   19.188461] 
[   19.188495] The buggy address belongs to the physical page:
[   19.188529] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1057ea
[   19.188607] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.188673] page_type: f5(slab)
[   19.188717] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   19.188779] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   19.188825] page dumped because: kasan: bad access detected
[   19.188875] 
[   19.188910] Memory state around the buggy address:
[   19.188953]  fff00000c57ea900: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   19.189008]  fff00000c57ea980: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   19.189055] >fff00000c57eaa00: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.189097]                             ^
[   19.189128]  fff00000c57eaa80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.189173]  fff00000c57eab00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.189231] ==================================================================

[   13.522583] ==================================================================
[   13.523489] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   13.524301] Read of size 1 at addr ffff8881027e5058 by task kunit_try_catch/274
[   13.524643] 
[   13.524746] CPU: 1 UID: 0 PID: 274 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   13.524796] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.524808] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.524831] Call Trace:
[   13.524845]  <TASK>
[   13.524864]  dump_stack_lvl+0x73/0xb0
[   13.524934]  print_report+0xd1/0x650
[   13.524964]  ? __virt_addr_valid+0x1db/0x2d0
[   13.524989]  ? memcmp+0x1b4/0x1d0
[   13.525007]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.525041]  ? memcmp+0x1b4/0x1d0
[   13.525059]  kasan_report+0x141/0x180
[   13.525080]  ? memcmp+0x1b4/0x1d0
[   13.525101]  __asan_report_load1_noabort+0x18/0x20
[   13.525154]  memcmp+0x1b4/0x1d0
[   13.525198]  kasan_memcmp+0x18f/0x390
[   13.525219]  ? trace_hardirqs_on+0x37/0xe0
[   13.525244]  ? __pfx_kasan_memcmp+0x10/0x10
[   13.525264]  ? finish_task_switch.isra.0+0x153/0x700
[   13.525287]  ? __switch_to+0x47/0xf50
[   13.525315]  ? __pfx_read_tsc+0x10/0x10
[   13.525337]  ? ktime_get_ts64+0x86/0x230
[   13.525361]  kunit_try_run_case+0x1a5/0x480
[   13.525386]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.525408]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.525431]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.525453]  ? __kthread_parkme+0x82/0x180
[   13.525474]  ? preempt_count_sub+0x50/0x80
[   13.525495]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.525519]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.525540]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.525562]  kthread+0x337/0x6f0
[   13.525581]  ? trace_preempt_on+0x20/0xc0
[   13.525601]  ? __pfx_kthread+0x10/0x10
[   13.525621]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.525809]  ? calculate_sigpending+0x7b/0xa0
[   13.525843]  ? __pfx_kthread+0x10/0x10
[   13.525865]  ret_from_fork+0x116/0x1d0
[   13.525885]  ? __pfx_kthread+0x10/0x10
[   13.525907]  ret_from_fork_asm+0x1a/0x30
[   13.525937]  </TASK>
[   13.525950] 
[   13.540591] Allocated by task 274:
[   13.540978]  kasan_save_stack+0x45/0x70
[   13.541483]  kasan_save_track+0x18/0x40
[   13.541623]  kasan_save_alloc_info+0x3b/0x50
[   13.542277]  __kasan_kmalloc+0xb7/0xc0
[   13.542687]  __kmalloc_cache_noprof+0x189/0x420
[   13.543247]  kasan_memcmp+0xb7/0x390
[   13.543692]  kunit_try_run_case+0x1a5/0x480
[   13.543889]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.544450]  kthread+0x337/0x6f0
[   13.544829]  ret_from_fork+0x116/0x1d0
[   13.545155]  ret_from_fork_asm+0x1a/0x30
[   13.545297] 
[   13.545370] The buggy address belongs to the object at ffff8881027e5040
[   13.545370]  which belongs to the cache kmalloc-32 of size 32
[   13.545879] The buggy address is located 0 bytes to the right of
[   13.545879]  allocated 24-byte region [ffff8881027e5040, ffff8881027e5058)
[   13.547195] 
[   13.547364] The buggy address belongs to the physical page:
[   13.547930] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027e5
[   13.548633] flags: 0x200000000000000(node=0|zone=2)
[   13.549156] page_type: f5(slab)
[   13.549469] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.549928] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   13.550624] page dumped because: kasan: bad access detected
[   13.551046] 
[   13.551124] Memory state around the buggy address:
[   13.551283]  ffff8881027e4f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.551500]  ffff8881027e4f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.551847] >ffff8881027e5000: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.552580]                                                     ^
[   13.553221]  ffff8881027e5080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.553446]  ffff8881027e5100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.553676] ==================================================================