Hay
Date
July 20, 2025, 11:12 a.m.

Environment
qemu-arm64
qemu-x86_64

[   17.570195] ==================================================================
[   17.570276] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   17.570347] Read of size 1 at addr fff00000c78bb458 by task kunit_try_catch/257
[   17.570402] 
[   17.570446] CPU: 0 UID: 0 PID: 257 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   17.570531] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.570561] Hardware name: linux,dummy-virt (DT)
[   17.570597] Call trace:
[   17.570624]  show_stack+0x20/0x38 (C)
[   17.570689]  dump_stack_lvl+0x8c/0xd0
[   17.570739]  print_report+0x118/0x5d0
[   17.570791]  kasan_report+0xdc/0x128
[   17.570839]  __asan_report_load1_noabort+0x20/0x30
[   17.570893]  memcmp+0x198/0x1d8
[   17.570935]  kasan_memcmp+0x16c/0x300
[   17.570981]  kunit_try_run_case+0x170/0x3f0
[   17.572106]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.572177]  kthread+0x328/0x630
[   17.572400]  ret_from_fork+0x10/0x20
[   17.572459] 
[   17.572483] Allocated by task 257:
[   17.572514]  kasan_save_stack+0x3c/0x68
[   17.572935]  kasan_save_track+0x20/0x40
[   17.573191]  kasan_save_alloc_info+0x40/0x58
[   17.573244]  __kasan_kmalloc+0xd4/0xd8
[   17.573583]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.573953]  kasan_memcmp+0xbc/0x300
[   17.574019]  kunit_try_run_case+0x170/0x3f0
[   17.574393]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.574444]  kthread+0x328/0x630
[   17.574937]  ret_from_fork+0x10/0x20
[   17.575395] 
[   17.575639] The buggy address belongs to the object at fff00000c78bb440
[   17.575639]  which belongs to the cache kmalloc-32 of size 32
[   17.575905] The buggy address is located 0 bytes to the right of
[   17.575905]  allocated 24-byte region [fff00000c78bb440, fff00000c78bb458)
[   17.576187] 
[   17.576269] The buggy address belongs to the physical page:
[   17.576501] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078bb
[   17.576970] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.577035] page_type: f5(slab)
[   17.577372] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   17.577431] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   17.577476] page dumped because: kasan: bad access detected
[   17.577918] 
[   17.578218] Memory state around the buggy address:
[   17.578309]  fff00000c78bb300: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   17.578358]  fff00000c78bb380: 00 00 00 04 fc fc fc fc 00 00 07 fc fc fc fc fc
[   17.578533] >fff00000c78bb400: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   17.578765]                                                     ^
[   17.578827]  fff00000c78bb480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.578874]  fff00000c78bb500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.579080] ==================================================================

[   14.180709] ==================================================================
[   14.181218] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   14.181464] Read of size 1 at addr ffff888102746a58 by task kunit_try_catch/274
[   14.181915] 
[   14.182019] CPU: 1 UID: 0 PID: 274 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   14.182063] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.182076] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.182096] Call Trace:
[   14.182108]  <TASK>
[   14.182124]  dump_stack_lvl+0x73/0xb0
[   14.182164]  print_report+0xd1/0x610
[   14.182187]  ? __virt_addr_valid+0x1db/0x2d0
[   14.182222]  ? memcmp+0x1b4/0x1d0
[   14.182239]  ? kasan_complete_mode_report_info+0x2a/0x200
[   14.182260]  ? memcmp+0x1b4/0x1d0
[   14.182277]  kasan_report+0x141/0x180
[   14.182299]  ? memcmp+0x1b4/0x1d0
[   14.182321]  __asan_report_load1_noabort+0x18/0x20
[   14.182357]  memcmp+0x1b4/0x1d0
[   14.182376]  kasan_memcmp+0x18f/0x390
[   14.182397]  ? finish_task_switch.isra.0+0x156/0x700
[   14.182421]  ? __pfx_kasan_memcmp+0x10/0x10
[   14.182441]  ? finish_task_switch.isra.0+0x153/0x700
[   14.182461]  ? __switch_to+0x47/0xf50
[   14.182489]  ? __pfx_read_tsc+0x10/0x10
[   14.182509]  ? ktime_get_ts64+0x86/0x230
[   14.182533]  kunit_try_run_case+0x1a5/0x480
[   14.182557]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.182579]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.182602]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.182634]  ? __kthread_parkme+0x82/0x180
[   14.182653]  ? preempt_count_sub+0x50/0x80
[   14.182675]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.182719]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.182742]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.182773]  kthread+0x337/0x6f0
[   14.182792]  ? trace_preempt_on+0x20/0xc0
[   14.182815]  ? __pfx_kthread+0x10/0x10
[   14.182845]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.182865]  ? calculate_sigpending+0x7b/0xa0
[   14.182888]  ? __pfx_kthread+0x10/0x10
[   14.182917]  ret_from_fork+0x116/0x1d0
[   14.182936]  ? __pfx_kthread+0x10/0x10
[   14.182956]  ret_from_fork_asm+0x1a/0x30
[   14.182985]  </TASK>
[   14.182995] 
[   14.194177] Allocated by task 274:
[   14.194363]  kasan_save_stack+0x45/0x70
[   14.194694]  kasan_save_track+0x18/0x40
[   14.194869]  kasan_save_alloc_info+0x3b/0x50
[   14.195095]  __kasan_kmalloc+0xb7/0xc0
[   14.195286]  __kmalloc_cache_noprof+0x189/0x420
[   14.195444]  kasan_memcmp+0xb7/0x390
[   14.195690]  kunit_try_run_case+0x1a5/0x480
[   14.195902]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.196090]  kthread+0x337/0x6f0
[   14.196511]  ret_from_fork+0x116/0x1d0
[   14.196845]  ret_from_fork_asm+0x1a/0x30
[   14.197081] 
[   14.197178] The buggy address belongs to the object at ffff888102746a40
[   14.197178]  which belongs to the cache kmalloc-32 of size 32
[   14.197655] The buggy address is located 0 bytes to the right of
[   14.197655]  allocated 24-byte region [ffff888102746a40, ffff888102746a58)
[   14.198383] 
[   14.198533] The buggy address belongs to the physical page:
[   14.198787] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102746
[   14.199142] flags: 0x200000000000000(node=0|zone=2)
[   14.199378] page_type: f5(slab)
[   14.199636] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.199938] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.200204] page dumped because: kasan: bad access detected
[   14.200475] 
[   14.200570] Memory state around the buggy address:
[   14.200809]  ffff888102746900: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.201032]  ffff888102746980: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   14.201349] >ffff888102746a00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.201972]                                                     ^
[   14.202220]  ffff888102746a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.202670]  ffff888102746b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.203000] ==================================================================