Hay
Date
July 17, 2025, 11:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   17.824546] ==================================================================
[   17.824608] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   17.824664] Read of size 1 at addr fff00000c7940c18 by task kunit_try_catch/258
[   17.824735] 
[   17.824804] CPU: 0 UID: 0 PID: 258 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   17.824916] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.824946] Hardware name: linux,dummy-virt (DT)
[   17.825006] Call trace:
[   17.825221]  show_stack+0x20/0x38 (C)
[   17.825342]  dump_stack_lvl+0x8c/0xd0
[   17.825439]  print_report+0x118/0x5d0
[   17.825590]  kasan_report+0xdc/0x128
[   17.825724]  __asan_report_load1_noabort+0x20/0x30
[   17.825820]  memcmp+0x198/0x1d8
[   17.825865]  kasan_memcmp+0x16c/0x300
[   17.825936]  kunit_try_run_case+0x170/0x3f0
[   17.825998]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.826054]  kthread+0x328/0x630
[   17.826193]  ret_from_fork+0x10/0x20
[   17.826251] 
[   17.826324] Allocated by task 258:
[   17.826382]  kasan_save_stack+0x3c/0x68
[   17.826443]  kasan_save_track+0x20/0x40
[   17.826534]  kasan_save_alloc_info+0x40/0x58
[   17.826611]  __kasan_kmalloc+0xd4/0xd8
[   17.826736]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.826848]  kasan_memcmp+0xbc/0x300
[   17.826928]  kunit_try_run_case+0x170/0x3f0
[   17.827045]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.827102]  kthread+0x328/0x630
[   17.827137]  ret_from_fork+0x10/0x20
[   17.827296] 
[   17.827318] The buggy address belongs to the object at fff00000c7940c00
[   17.827318]  which belongs to the cache kmalloc-32 of size 32
[   17.827475] The buggy address is located 0 bytes to the right of
[   17.827475]  allocated 24-byte region [fff00000c7940c00, fff00000c7940c18)
[   17.827550] 
[   17.827572] The buggy address belongs to the physical page:
[   17.827606] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107940
[   17.827660] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.827731] page_type: f5(slab)
[   17.827921] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   17.828014] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   17.828116] page dumped because: kasan: bad access detected
[   17.828169] 
[   17.828189] Memory state around the buggy address:
[   17.828250]  fff00000c7940b00: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   17.828345]  fff00000c7940b80: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   17.828392] >fff00000c7940c00: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.828474]                             ^
[   17.828507]  fff00000c7940c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.828801]  fff00000c7940d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.828861] ==================================================================

[   14.947617] ==================================================================
[   14.948717] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   14.949282] Read of size 1 at addr ffff8881039b2c98 by task kunit_try_catch/274
[   14.950011] 
[   14.950186] CPU: 0 UID: 0 PID: 274 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   14.950230] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.950242] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.950271] Call Trace:
[   14.950284]  <TASK>
[   14.950299]  dump_stack_lvl+0x73/0xb0
[   14.950327]  print_report+0xd1/0x610
[   14.950352]  ? __virt_addr_valid+0x1db/0x2d0
[   14.950376]  ? memcmp+0x1b4/0x1d0
[   14.950393]  ? kasan_complete_mode_report_info+0x2a/0x200
[   14.950417]  ? memcmp+0x1b4/0x1d0
[   14.950435]  kasan_report+0x141/0x180
[   14.950456]  ? memcmp+0x1b4/0x1d0
[   14.950478]  __asan_report_load1_noabort+0x18/0x20
[   14.950544]  memcmp+0x1b4/0x1d0
[   14.950573]  kasan_memcmp+0x18f/0x390
[   14.950595]  ? trace_hardirqs_on+0x37/0xe0
[   14.950619]  ? __pfx_kasan_memcmp+0x10/0x10
[   14.950639]  ? finish_task_switch.isra.0+0x153/0x700
[   14.950662]  ? __switch_to+0x47/0xf50
[   14.950691]  ? __pfx_read_tsc+0x10/0x10
[   14.950712]  ? ktime_get_ts64+0x86/0x230
[   14.950735]  kunit_try_run_case+0x1a5/0x480
[   14.950761]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.950784]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.950808]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.950832]  ? __kthread_parkme+0x82/0x180
[   14.950853]  ? preempt_count_sub+0x50/0x80
[   14.950876]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.950900]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.950926]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.950952]  kthread+0x337/0x6f0
[   14.950972]  ? trace_preempt_on+0x20/0xc0
[   14.950994]  ? __pfx_kthread+0x10/0x10
[   14.951015]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.951037]  ? calculate_sigpending+0x7b/0xa0
[   14.951062]  ? __pfx_kthread+0x10/0x10
[   14.951083]  ret_from_fork+0x116/0x1d0
[   14.951102]  ? __pfx_kthread+0x10/0x10
[   14.951123]  ret_from_fork_asm+0x1a/0x30
[   14.951154]  </TASK>
[   14.951165] 
[   14.962236] Allocated by task 274:
[   14.962562]  kasan_save_stack+0x45/0x70
[   14.962995]  kasan_save_track+0x18/0x40
[   14.963401]  kasan_save_alloc_info+0x3b/0x50
[   14.963849]  __kasan_kmalloc+0xb7/0xc0
[   14.964262]  __kmalloc_cache_noprof+0x189/0x420
[   14.964705]  kasan_memcmp+0xb7/0x390
[   14.965038]  kunit_try_run_case+0x1a5/0x480
[   14.965478]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.965974]  kthread+0x337/0x6f0
[   14.966265]  ret_from_fork+0x116/0x1d0
[   14.966731]  ret_from_fork_asm+0x1a/0x30
[   14.966954] 
[   14.967119] The buggy address belongs to the object at ffff8881039b2c80
[   14.967119]  which belongs to the cache kmalloc-32 of size 32
[   14.967996] The buggy address is located 0 bytes to the right of
[   14.967996]  allocated 24-byte region [ffff8881039b2c80, ffff8881039b2c98)
[   14.969134] 
[   14.969218] The buggy address belongs to the physical page:
[   14.969642] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039b2
[   14.969896] flags: 0x200000000000000(node=0|zone=2)
[   14.970061] page_type: f5(slab)
[   14.970185] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.970433] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.971124] page dumped because: kasan: bad access detected
[   14.971726] 
[   14.971902] Memory state around the buggy address:
[   14.972401]  ffff8881039b2b80: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.973144]  ffff8881039b2c00: 00 00 00 04 fc fc fc fc 00 00 07 fc fc fc fc fc
[   14.973856] >ffff8881039b2c80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.974674]                             ^
[   14.975110]  ffff8881039b2d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.975815]  ffff8881039b2d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.976534] ==================================================================