Hay
Date
July 12, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.721047] ==================================================================
[   18.721474] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   18.721543] Read of size 1 at addr fff00000c66feb18 by task kunit_try_catch/257
[   18.721595] 
[   18.721631] CPU: 1 UID: 0 PID: 257 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   18.721728] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.721756] Hardware name: linux,dummy-virt (DT)
[   18.721790] Call trace:
[   18.721813]  show_stack+0x20/0x38 (C)
[   18.721866]  dump_stack_lvl+0x8c/0xd0
[   18.721957]  print_report+0x118/0x5d0
[   18.722045]  kasan_report+0xdc/0x128
[   18.722094]  __asan_report_load1_noabort+0x20/0x30
[   18.722386]  memcmp+0x198/0x1d8
[   18.722476]  kasan_memcmp+0x16c/0x300
[   18.722527]  kunit_try_run_case+0x170/0x3f0
[   18.722580]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.722637]  kthread+0x328/0x630
[   18.722689]  ret_from_fork+0x10/0x20
[   18.722741] 
[   18.722761] Allocated by task 257:
[   18.722851]  kasan_save_stack+0x3c/0x68
[   18.722902]  kasan_save_track+0x20/0x40
[   18.722943]  kasan_save_alloc_info+0x40/0x58
[   18.722985]  __kasan_kmalloc+0xd4/0xd8
[   18.723024]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.723098]  kasan_memcmp+0xbc/0x300
[   18.723277]  kunit_try_run_case+0x170/0x3f0
[   18.723529]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.723577]  kthread+0x328/0x630
[   18.723613]  ret_from_fork+0x10/0x20
[   18.723909] 
[   18.723937] The buggy address belongs to the object at fff00000c66feb00
[   18.723937]  which belongs to the cache kmalloc-32 of size 32
[   18.724378] The buggy address is located 0 bytes to the right of
[   18.724378]  allocated 24-byte region [fff00000c66feb00, fff00000c66feb18)
[   18.724456] 
[   18.724480] The buggy address belongs to the physical page:
[   18.724514] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1066fe
[   18.725373] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.725949] page_type: f5(slab)
[   18.726204] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   18.726265] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   18.726310] page dumped because: kasan: bad access detected
[   18.726684] 
[   18.726850] Memory state around the buggy address:
[   18.726885]  fff00000c66fea00: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   18.727144]  fff00000c66fea80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   18.727205] >fff00000c66feb00: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.727693]                             ^
[   18.727736]  fff00000c66feb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.727833]  fff00000c66fec00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.727875] ==================================================================

[   14.901216] ==================================================================
[   14.901980] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   14.902446] Read of size 1 at addr ffff888102a085d8 by task kunit_try_catch/274
[   14.902780] 
[   14.902877] CPU: 1 UID: 0 PID: 274 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   14.902920] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.902958] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.902980] Call Trace:
[   14.902991]  <TASK>
[   14.903005]  dump_stack_lvl+0x73/0xb0
[   14.903033]  print_report+0xd1/0x610
[   14.903055]  ? __virt_addr_valid+0x1db/0x2d0
[   14.903078]  ? memcmp+0x1b4/0x1d0
[   14.903094]  ? kasan_complete_mode_report_info+0x2a/0x200
[   14.903119]  ? memcmp+0x1b4/0x1d0
[   14.903136]  kasan_report+0x141/0x180
[   14.903157]  ? memcmp+0x1b4/0x1d0
[   14.903180]  __asan_report_load1_noabort+0x18/0x20
[   14.903206]  memcmp+0x1b4/0x1d0
[   14.903225]  kasan_memcmp+0x18f/0x390
[   14.903245]  ? trace_hardirqs_on+0x37/0xe0
[   14.903279]  ? __pfx_kasan_memcmp+0x10/0x10
[   14.903299]  ? finish_task_switch.isra.0+0x153/0x700
[   14.903323]  ? __switch_to+0x47/0xf50
[   14.903351]  ? __pfx_read_tsc+0x10/0x10
[   14.903373]  ? ktime_get_ts64+0x86/0x230
[   14.903719]  kunit_try_run_case+0x1a5/0x480
[   14.903749]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.903774]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.903797]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.903823]  ? __kthread_parkme+0x82/0x180
[   14.903845]  ? preempt_count_sub+0x50/0x80
[   14.903869]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.903894]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.903919]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.903946]  kthread+0x337/0x6f0
[   14.903965]  ? trace_preempt_on+0x20/0xc0
[   14.904053]  ? __pfx_kthread+0x10/0x10
[   14.904076]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.904099]  ? calculate_sigpending+0x7b/0xa0
[   14.904123]  ? __pfx_kthread+0x10/0x10
[   14.904145]  ret_from_fork+0x116/0x1d0
[   14.904164]  ? __pfx_kthread+0x10/0x10
[   14.904185]  ret_from_fork_asm+0x1a/0x30
[   14.904215]  </TASK>
[   14.904225] 
[   14.915625] Allocated by task 274:
[   14.915799]  kasan_save_stack+0x45/0x70
[   14.916339]  kasan_save_track+0x18/0x40
[   14.916509]  kasan_save_alloc_info+0x3b/0x50
[   14.916856]  __kasan_kmalloc+0xb7/0xc0
[   14.917063]  __kmalloc_cache_noprof+0x189/0x420
[   14.917628]  kasan_memcmp+0xb7/0x390
[   14.917897]  kunit_try_run_case+0x1a5/0x480
[   14.918258]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.918516]  kthread+0x337/0x6f0
[   14.918665]  ret_from_fork+0x116/0x1d0
[   14.918858]  ret_from_fork_asm+0x1a/0x30
[   14.919047] 
[   14.919134] The buggy address belongs to the object at ffff888102a085c0
[   14.919134]  which belongs to the cache kmalloc-32 of size 32
[   14.919641] The buggy address is located 0 bytes to the right of
[   14.919641]  allocated 24-byte region [ffff888102a085c0, ffff888102a085d8)
[   14.920140] 
[   14.920234] The buggy address belongs to the physical page:
[   14.921122] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a08
[   14.921605] flags: 0x200000000000000(node=0|zone=2)
[   14.921914] page_type: f5(slab)
[   14.922234] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.922670] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.923153] page dumped because: kasan: bad access detected
[   14.923523] 
[   14.923759] Memory state around the buggy address:
[   14.923973]  ffff888102a08480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.924389]  ffff888102a08500: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   14.924705] >ffff888102a08580: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.925004]                                                     ^
[   14.925423]  ffff888102a08600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.925679]  ffff888102a08680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.926051] ==================================================================