Hay
Date
July 6, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   20.457492] ==================================================================
[   20.457723] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   20.457937] Read of size 1 at addr fff00000c5707ed8 by task kunit_try_catch/257
[   20.457999] 
[   20.458106] CPU: 1 UID: 0 PID: 257 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   20.458384] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.458579] Hardware name: linux,dummy-virt (DT)
[   20.458616] Call trace:
[   20.458688]  show_stack+0x20/0x38 (C)
[   20.459158]  dump_stack_lvl+0x8c/0xd0
[   20.459314]  print_report+0x118/0x608
[   20.459368]  kasan_report+0xdc/0x128
[   20.459748]  __asan_report_load1_noabort+0x20/0x30
[   20.459833]  memcmp+0x198/0x1d8
[   20.460215]  kasan_memcmp+0x16c/0x300
[   20.460380]  kunit_try_run_case+0x170/0x3f0
[   20.460612]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.460844]  kthread+0x328/0x630
[   20.461257]  ret_from_fork+0x10/0x20
[   20.461434] 
[   20.461459] Allocated by task 257:
[   20.461819]  kasan_save_stack+0x3c/0x68
[   20.461886]  kasan_save_track+0x20/0x40
[   20.462019]  kasan_save_alloc_info+0x40/0x58
[   20.462221]  __kasan_kmalloc+0xd4/0xd8
[   20.462295]  __kmalloc_cache_noprof+0x16c/0x3c0
[   20.462472]  kasan_memcmp+0xbc/0x300
[   20.462512]  kunit_try_run_case+0x170/0x3f0
[   20.462811]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.462969]  kthread+0x328/0x630
[   20.463075]  ret_from_fork+0x10/0x20
[   20.463151] 
[   20.463340] The buggy address belongs to the object at fff00000c5707ec0
[   20.463340]  which belongs to the cache kmalloc-32 of size 32
[   20.463433] The buggy address is located 0 bytes to the right of
[   20.463433]  allocated 24-byte region [fff00000c5707ec0, fff00000c5707ed8)
[   20.463836] 
[   20.463984] The buggy address belongs to the physical page:
[   20.464150] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105707
[   20.464280] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.464388] page_type: f5(slab)
[   20.464508] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   20.464605] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   20.465262] page dumped because: kasan: bad access detected
[   20.465324] 
[   20.465368] Memory state around the buggy address:
[   20.466043]  fff00000c5707d80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.466105]  fff00000c5707e00: 00 00 00 04 fc fc fc fc 00 00 07 fc fc fc fc fc
[   20.466508] >fff00000c5707e80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.466673]                                                     ^
[   20.466849]  fff00000c5707f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.466936]  fff00000c5707f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.466994] ==================================================================

[   13.501319] ==================================================================
[   13.502038] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   13.502310] Read of size 1 at addr ffff8881027a7c98 by task kunit_try_catch/274
[   13.502717] 
[   13.502812] CPU: 1 UID: 0 PID: 274 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   13.502858] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.502870] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.502892] Call Trace:
[   13.502905]  <TASK>
[   13.502920]  dump_stack_lvl+0x73/0xb0
[   13.502961]  print_report+0xd1/0x650
[   13.502986]  ? __virt_addr_valid+0x1db/0x2d0
[   13.503010]  ? memcmp+0x1b4/0x1d0
[   13.503028]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.503051]  ? memcmp+0x1b4/0x1d0
[   13.503069]  kasan_report+0x141/0x180
[   13.503091]  ? memcmp+0x1b4/0x1d0
[   13.503119]  __asan_report_load1_noabort+0x18/0x20
[   13.503144]  memcmp+0x1b4/0x1d0
[   13.503165]  kasan_memcmp+0x18f/0x390
[   13.503186]  ? trace_hardirqs_on+0x37/0xe0
[   13.503209]  ? __pfx_kasan_memcmp+0x10/0x10
[   13.503230]  ? finish_task_switch.isra.0+0x153/0x700
[   13.503252]  ? __switch_to+0x47/0xf50
[   13.503282]  ? __pfx_read_tsc+0x10/0x10
[   13.503303]  ? ktime_get_ts64+0x86/0x230
[   13.503326]  kunit_try_run_case+0x1a5/0x480
[   13.503349]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.503373]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.503396]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.503421]  ? __kthread_parkme+0x82/0x180
[   13.503442]  ? preempt_count_sub+0x50/0x80
[   13.503518]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.503545]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.503570]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.503593]  kthread+0x337/0x6f0
[   13.503614]  ? trace_preempt_on+0x20/0xc0
[   13.503636]  ? __pfx_kthread+0x10/0x10
[   13.503657]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.503678]  ? calculate_sigpending+0x7b/0xa0
[   13.503702]  ? __pfx_kthread+0x10/0x10
[   13.503724]  ret_from_fork+0x116/0x1d0
[   13.503743]  ? __pfx_kthread+0x10/0x10
[   13.503764]  ret_from_fork_asm+0x1a/0x30
[   13.503795]  </TASK>
[   13.503808] 
[   13.512084] Allocated by task 274:
[   13.512283]  kasan_save_stack+0x45/0x70
[   13.512491]  kasan_save_track+0x18/0x40
[   13.512664]  kasan_save_alloc_info+0x3b/0x50
[   13.512865]  __kasan_kmalloc+0xb7/0xc0
[   13.513050]  __kmalloc_cache_noprof+0x189/0x420
[   13.513279]  kasan_memcmp+0xb7/0x390
[   13.513440]  kunit_try_run_case+0x1a5/0x480
[   13.513621]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.513823]  kthread+0x337/0x6f0
[   13.514000]  ret_from_fork+0x116/0x1d0
[   13.514190]  ret_from_fork_asm+0x1a/0x30
[   13.514606] 
[   13.514709] The buggy address belongs to the object at ffff8881027a7c80
[   13.514709]  which belongs to the cache kmalloc-32 of size 32
[   13.515232] The buggy address is located 0 bytes to the right of
[   13.515232]  allocated 24-byte region [ffff8881027a7c80, ffff8881027a7c98)
[   13.515767] 
[   13.515846] The buggy address belongs to the physical page:
[   13.516033] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027a7
[   13.516275] flags: 0x200000000000000(node=0|zone=2)
[   13.516514] page_type: f5(slab)
[   13.516767] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.517163] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   13.517397] page dumped because: kasan: bad access detected
[   13.517570] 
[   13.517641] Memory state around the buggy address:
[   13.517796]  ffff8881027a7b80: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.518638]  ffff8881027a7c00: 00 00 00 04 fc fc fc fc 00 00 07 fc fc fc fc fc
[   13.518994] >ffff8881027a7c80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.519350]                             ^
[   13.519548]  ffff8881027a7d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.519930]  ffff8881027a7d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.520245] ==================================================================