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

Environment
qemu-arm64
qemu-x86_64

[   18.236849] ==================================================================
[   18.236914] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   18.237059] Read of size 1 at addr fff00000c6356818 by task kunit_try_catch/257
[   18.237144] 
[   18.237181] CPU: 0 UID: 0 PID: 257 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   18.237401] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.237443] Hardware name: linux,dummy-virt (DT)
[   18.237477] Call trace:
[   18.237582]  show_stack+0x20/0x38 (C)
[   18.237646]  dump_stack_lvl+0x8c/0xd0
[   18.237708]  print_report+0x118/0x608
[   18.237760]  kasan_report+0xdc/0x128
[   18.237930]  __asan_report_load1_noabort+0x20/0x30
[   18.238071]  memcmp+0x198/0x1d8
[   18.238162]  kasan_memcmp+0x16c/0x300
[   18.238283]  kunit_try_run_case+0x170/0x3f0
[   18.238337]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.238400]  kthread+0x328/0x630
[   18.238447]  ret_from_fork+0x10/0x20
[   18.238879] 
[   18.238925] Allocated by task 257:
[   18.238998]  kasan_save_stack+0x3c/0x68
[   18.239132]  kasan_save_track+0x20/0x40
[   18.239199]  kasan_save_alloc_info+0x40/0x58
[   18.239337]  __kasan_kmalloc+0xd4/0xd8
[   18.239405]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.239538]  kasan_memcmp+0xbc/0x300
[   18.239580]  kunit_try_run_case+0x170/0x3f0
[   18.239790]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.239985]  kthread+0x328/0x630
[   18.240065]  ret_from_fork+0x10/0x20
[   18.240212] 
[   18.240273] The buggy address belongs to the object at fff00000c6356800
[   18.240273]  which belongs to the cache kmalloc-32 of size 32
[   18.240438] The buggy address is located 0 bytes to the right of
[   18.240438]  allocated 24-byte region [fff00000c6356800, fff00000c6356818)
[   18.240595] 
[   18.240636] The buggy address belongs to the physical page:
[   18.240672] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106356
[   18.240943] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.241116] page_type: f5(slab)
[   18.241182] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   18.241265] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   18.241378] page dumped because: kasan: bad access detected
[   18.241452] 
[   18.241503] Memory state around the buggy address:
[   18.241628]  fff00000c6356700: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   18.241760]  fff00000c6356780: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   18.241808] >fff00000c6356800: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.241853]                             ^
[   18.241916]  fff00000c6356880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.242101]  fff00000c6356900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.242288] ==================================================================

[   14.572463] ==================================================================
[   14.573492] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   14.573702] Read of size 1 at addr ffff8881039ba618 by task kunit_try_catch/275
[   14.573920] 
[   14.574006] CPU: 1 UID: 0 PID: 275 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   14.574048] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.574060] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.574080] Call Trace:
[   14.574092]  <TASK>
[   14.574106]  dump_stack_lvl+0x73/0xb0
[   14.574133]  print_report+0xd1/0x650
[   14.574156]  ? __virt_addr_valid+0x1db/0x2d0
[   14.574180]  ? memcmp+0x1b4/0x1d0
[   14.574198]  ? kasan_complete_mode_report_info+0x2a/0x200
[   14.574221]  ? memcmp+0x1b4/0x1d0
[   14.574240]  kasan_report+0x141/0x180
[   14.574261]  ? memcmp+0x1b4/0x1d0
[   14.574284]  __asan_report_load1_noabort+0x18/0x20
[   14.574309]  memcmp+0x1b4/0x1d0
[   14.574328]  kasan_memcmp+0x18f/0x390
[   14.574373]  ? trace_hardirqs_on+0x37/0xe0
[   14.574406]  ? __pfx_kasan_memcmp+0x10/0x10
[   14.574427]  ? finish_task_switch.isra.0+0x153/0x700
[   14.574450]  ? __switch_to+0x47/0xf50
[   14.574477]  ? __pfx_read_tsc+0x10/0x10
[   14.574498]  ? ktime_get_ts64+0x86/0x230
[   14.574529]  kunit_try_run_case+0x1a5/0x480
[   14.574554]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.574577]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.574602]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.574626]  ? __kthread_parkme+0x82/0x180
[   14.574647]  ? preempt_count_sub+0x50/0x80
[   14.574670]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.574695]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.574720]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.574752]  kthread+0x337/0x6f0
[   14.574770]  ? trace_preempt_on+0x20/0xc0
[   14.574792]  ? __pfx_kthread+0x10/0x10
[   14.574813]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.574836]  ? calculate_sigpending+0x7b/0xa0
[   14.574860]  ? __pfx_kthread+0x10/0x10
[   14.574881]  ret_from_fork+0x116/0x1d0
[   14.574899]  ? __pfx_kthread+0x10/0x10
[   14.574920]  ret_from_fork_asm+0x1a/0x30
[   14.574950]  </TASK>
[   14.574960] 
[   14.588827] Allocated by task 275:
[   14.589146]  kasan_save_stack+0x45/0x70
[   14.589592]  kasan_save_track+0x18/0x40
[   14.589858]  kasan_save_alloc_info+0x3b/0x50
[   14.590007]  __kasan_kmalloc+0xb7/0xc0
[   14.590138]  __kmalloc_cache_noprof+0x189/0x420
[   14.590294]  kasan_memcmp+0xb7/0x390
[   14.590447]  kunit_try_run_case+0x1a5/0x480
[   14.590691]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.591133]  kthread+0x337/0x6f0
[   14.591264]  ret_from_fork+0x116/0x1d0
[   14.591470]  ret_from_fork_asm+0x1a/0x30
[   14.591768] 
[   14.591842] The buggy address belongs to the object at ffff8881039ba600
[   14.591842]  which belongs to the cache kmalloc-32 of size 32
[   14.592339] The buggy address is located 0 bytes to the right of
[   14.592339]  allocated 24-byte region [ffff8881039ba600, ffff8881039ba618)
[   14.592862] 
[   14.592939] The buggy address belongs to the physical page:
[   14.593191] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039ba
[   14.593552] flags: 0x200000000000000(node=0|zone=2)
[   14.593826] page_type: f5(slab)
[   14.593993] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.594224] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.594646] page dumped because: kasan: bad access detected
[   14.595009] 
[   14.595097] Memory state around the buggy address:
[   14.595258]  ffff8881039ba500: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.595701]  ffff8881039ba580: 00 00 00 04 fc fc fc fc 00 00 07 fc fc fc fc fc
[   14.596069] >ffff8881039ba600: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.596377]                             ^
[   14.596650]  ffff8881039ba680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.596951]  ffff8881039ba700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.597231] ==================================================================