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

Environment
qemu-arm64
qemu-x86_64

[   20.434624] ==================================================================
[   20.434684] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   20.434739] Read of size 1 at addr fff00000c78cc498 by task kunit_try_catch/257
[   20.434791] 
[   20.434823] CPU: 0 UID: 0 PID: 257 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   20.434906] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.434935] Hardware name: linux,dummy-virt (DT)
[   20.434968] Call trace:
[   20.434998]  show_stack+0x20/0x38 (C)
[   20.435050]  dump_stack_lvl+0x8c/0xd0
[   20.435099]  print_report+0x118/0x608
[   20.435148]  kasan_report+0xdc/0x128
[   20.435208]  __asan_report_load1_noabort+0x20/0x30
[   20.435261]  memcmp+0x198/0x1d8
[   20.435305]  kasan_memcmp+0x16c/0x300
[   20.435349]  kunit_try_run_case+0x170/0x3f0
[   20.435414]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.435472]  kthread+0x328/0x630
[   20.435563]  ret_from_fork+0x10/0x20
[   20.435615] 
[   20.435637] Allocated by task 257:
[   20.435703]  kasan_save_stack+0x3c/0x68
[   20.435748]  kasan_save_track+0x20/0x40
[   20.435788]  kasan_save_alloc_info+0x40/0x58
[   20.435837]  __kasan_kmalloc+0xd4/0xd8
[   20.435952]  __kmalloc_cache_noprof+0x16c/0x3c0
[   20.436031]  kasan_memcmp+0xbc/0x300
[   20.436067]  kunit_try_run_case+0x170/0x3f0
[   20.436230]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.436298]  kthread+0x328/0x630
[   20.436339]  ret_from_fork+0x10/0x20
[   20.436376] 
[   20.436423] The buggy address belongs to the object at fff00000c78cc480
[   20.436423]  which belongs to the cache kmalloc-32 of size 32
[   20.436483] The buggy address is located 0 bytes to the right of
[   20.436483]  allocated 24-byte region [fff00000c78cc480, fff00000c78cc498)
[   20.436585] 
[   20.436608] The buggy address belongs to the physical page:
[   20.436643] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078cc
[   20.436698] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.436821] page_type: f5(slab)
[   20.436899] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   20.437009] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   20.437102] page dumped because: kasan: bad access detected
[   20.437271] 
[   20.437336] Memory state around the buggy address:
[   20.437376]  fff00000c78cc380: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   20.437556]  fff00000c78cc400: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.437632] >fff00000c78cc480: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.437711]                             ^
[   20.437744]  fff00000c78cc500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.437885]  fff00000c78cc580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.437943] ==================================================================

[   15.677994] ==================================================================
[   15.678596] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   15.678873] Read of size 1 at addr ffff888102a0d658 by task kunit_try_catch/275
[   15.679266] 
[   15.679374] CPU: 1 UID: 0 PID: 275 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   15.679428] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.679444] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   15.679470] Call Trace:
[   15.679487]  <TASK>
[   15.679525]  dump_stack_lvl+0x73/0xb0
[   15.679560]  print_report+0xd1/0x650
[   15.679592]  ? __virt_addr_valid+0x1db/0x2d0
[   15.679621]  ? memcmp+0x1b4/0x1d0
[   15.679642]  ? kasan_complete_mode_report_info+0x2a/0x200
[   15.679667]  ? memcmp+0x1b4/0x1d0
[   15.679689]  kasan_report+0x141/0x180
[   15.679714]  ? memcmp+0x1b4/0x1d0
[   15.679740]  __asan_report_load1_noabort+0x18/0x20
[   15.679768]  memcmp+0x1b4/0x1d0
[   15.679802]  kasan_memcmp+0x18f/0x390
[   15.679828]  ? trace_hardirqs_on+0x37/0xe0
[   15.679855]  ? __pfx_kasan_memcmp+0x10/0x10
[   15.679878]  ? finish_task_switch.isra.0+0x153/0x700
[   15.679905]  ? __switch_to+0x47/0xf50
[   15.679938]  ? __pfx_read_tsc+0x10/0x10
[   15.679964]  ? ktime_get_ts64+0x86/0x230
[   15.679992]  kunit_try_run_case+0x1a5/0x480
[   15.680023]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.680048]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   15.680076]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   15.680102]  ? __kthread_parkme+0x82/0x180
[   15.680127]  ? preempt_count_sub+0x50/0x80
[   15.680163]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.680191]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.680217]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   15.680244]  kthread+0x337/0x6f0
[   15.680267]  ? trace_preempt_on+0x20/0xc0
[   15.680292]  ? __pfx_kthread+0x10/0x10
[   15.680315]  ? _raw_spin_unlock_irq+0x47/0x80
[   15.680340]  ? calculate_sigpending+0x7b/0xa0
[   15.680368]  ? __pfx_kthread+0x10/0x10
[   15.680392]  ret_from_fork+0x116/0x1d0
[   15.680414]  ? __pfx_kthread+0x10/0x10
[   15.680437]  ret_from_fork_asm+0x1a/0x30
[   15.680474]  </TASK>
[   15.680489] 
[   15.691711] Allocated by task 275:
[   15.691935]  kasan_save_stack+0x45/0x70
[   15.692126]  kasan_save_track+0x18/0x40
[   15.692428]  kasan_save_alloc_info+0x3b/0x50
[   15.692649]  __kasan_kmalloc+0xb7/0xc0
[   15.692814]  __kmalloc_cache_noprof+0x189/0x420
[   15.693045]  kasan_memcmp+0xb7/0x390
[   15.693392]  kunit_try_run_case+0x1a5/0x480
[   15.693648]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.693971]  kthread+0x337/0x6f0
[   15.694160]  ret_from_fork+0x116/0x1d0
[   15.694536]  ret_from_fork_asm+0x1a/0x30
[   15.694705] 
[   15.694803] The buggy address belongs to the object at ffff888102a0d640
[   15.694803]  which belongs to the cache kmalloc-32 of size 32
[   15.695388] The buggy address is located 0 bytes to the right of
[   15.695388]  allocated 24-byte region [ffff888102a0d640, ffff888102a0d658)
[   15.696376] 
[   15.696518] The buggy address belongs to the physical page:
[   15.696732] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a0d
[   15.697031] flags: 0x200000000000000(node=0|zone=2)
[   15.697824] page_type: f5(slab)
[   15.698130] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   15.698834] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   15.699695] page dumped because: kasan: bad access detected
[   15.700001] 
[   15.700351] Memory state around the buggy address:
[   15.700681]  ffff888102a0d500: 00 00 07 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   15.701219]  ffff888102a0d580: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   15.702030] >ffff888102a0d600: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   15.702909]                                                     ^
[   15.703602]  ffff888102a0d680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.703987]  ffff888102a0d700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.704869] ==================================================================