Hay
Date
May 29, 2025, 7:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   24.629730] ==================================================================
[   24.629926] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   24.630110] Read of size 1 at addr fff00000c78760d8 by task kunit_try_catch/257
[   24.630246] 
[   24.630351] CPU: 1 UID: 0 PID: 257 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT 
[   24.630578] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.630761] Hardware name: linux,dummy-virt (DT)
[   24.630869] Call trace:
[   24.630930]  show_stack+0x20/0x38 (C)
[   24.631086]  dump_stack_lvl+0x8c/0xd0
[   24.631214]  print_report+0x118/0x608
[   24.631359]  kasan_report+0xdc/0x128
[   24.631496]  __asan_report_load1_noabort+0x20/0x30
[   24.631640]  memcmp+0x198/0x1d8
[   24.631759]  kasan_memcmp+0x16c/0x300
[   24.631959]  kunit_try_run_case+0x170/0x3f0
[   24.632087]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.632283]  kthread+0x328/0x630
[   24.632431]  ret_from_fork+0x10/0x20
[   24.632547] 
[   24.632590] Allocated by task 257:
[   24.632662]  kasan_save_stack+0x3c/0x68
[   24.632768]  kasan_save_track+0x20/0x40
[   24.632952]  kasan_save_alloc_info+0x40/0x58
[   24.633052]  __kasan_kmalloc+0xd4/0xd8
[   24.633174]  __kmalloc_cache_noprof+0x15c/0x3c0
[   24.633285]  kasan_memcmp+0xbc/0x300
[   24.633374]  kunit_try_run_case+0x170/0x3f0
[   24.633494]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.633665]  kthread+0x328/0x630
[   24.633754]  ret_from_fork+0x10/0x20
[   24.633842] 
[   24.633895] The buggy address belongs to the object at fff00000c78760c0
[   24.633895]  which belongs to the cache kmalloc-32 of size 32
[   24.634120] The buggy address is located 0 bytes to the right of
[   24.634120]  allocated 24-byte region [fff00000c78760c0, fff00000c78760d8)
[   24.634408] 
[   24.634477] The buggy address belongs to the physical page:
[   24.634590] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107876
[   24.634747] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   24.634971] page_type: f5(slab)
[   24.635122] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   24.635236] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   24.635591] page dumped because: kasan: bad access detected
[   24.635698] 
[   24.635753] Memory state around the buggy address:
[   24.635811]  fff00000c7875f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   24.635866]  fff00000c7876000: 00 00 00 fc fc fc fc fc 00 00 00 03 fc fc fc fc
[   24.635918] >fff00000c7876080: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   24.635964]                                                     ^
[   24.636010]  fff00000c7876100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.636059]  fff00000c7876180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.636105] ==================================================================


[   12.745330] ==================================================================
[   12.746563] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   12.747499] Read of size 1 at addr ffff888102fa3ed8 by task kunit_try_catch/274
[   12.748704] 
[   12.749058] CPU: 0 UID: 0 PID: 274 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT(voluntary) 
[   12.749141] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.749156] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.749178] Call Trace:
[   12.749192]  <TASK>
[   12.749208]  dump_stack_lvl+0x73/0xb0
[   12.749235]  print_report+0xd1/0x650
[   12.749261]  ? __virt_addr_valid+0x1db/0x2d0
[   12.749284]  ? memcmp+0x1b4/0x1d0
[   12.749303]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.749328]  ? memcmp+0x1b4/0x1d0
[   12.749349]  kasan_report+0x141/0x180
[   12.749371]  ? memcmp+0x1b4/0x1d0
[   12.749396]  __asan_report_load1_noabort+0x18/0x20
[   12.749417]  memcmp+0x1b4/0x1d0
[   12.749438]  kasan_memcmp+0x18f/0x390
[   12.749459]  ? trace_hardirqs_on+0x37/0xe0
[   12.749483]  ? __pfx_kasan_memcmp+0x10/0x10
[   12.749504]  ? finish_task_switch.isra.0+0x153/0x700
[   12.749527]  ? __switch_to+0x47/0xf50
[   12.749555]  ? __pfx_read_tsc+0x10/0x10
[   12.749577]  ? ktime_get_ts64+0x86/0x230
[   12.749602]  kunit_try_run_case+0x1a5/0x480
[   12.749639]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.749659]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.749685]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.749710]  ? __kthread_parkme+0x82/0x180
[   12.749730]  ? preempt_count_sub+0x50/0x80
[   12.749835]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.749860]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.749886]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.749911]  kthread+0x337/0x6f0
[   12.749931]  ? trace_preempt_on+0x20/0xc0
[   12.749953]  ? __pfx_kthread+0x10/0x10
[   12.749974]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.749998]  ? calculate_sigpending+0x7b/0xa0
[   12.750023]  ? __pfx_kthread+0x10/0x10
[   12.750044]  ret_from_fork+0x116/0x1d0
[   12.750063]  ? __pfx_kthread+0x10/0x10
[   12.750084]  ret_from_fork_asm+0x1a/0x30
[   12.750116]  </TASK>
[   12.750126] 
[   12.760522] Allocated by task 274:
[   12.760726]  kasan_save_stack+0x45/0x70
[   12.761132]  kasan_save_track+0x18/0x40
[   12.761337]  kasan_save_alloc_info+0x3b/0x50
[   12.761526]  __kasan_kmalloc+0xb7/0xc0
[   12.761733]  __kmalloc_cache_noprof+0x189/0x420
[   12.762431]  kasan_memcmp+0xb7/0x390
[   12.762707]  kunit_try_run_case+0x1a5/0x480
[   12.763206]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.763620]  kthread+0x337/0x6f0
[   12.764065]  ret_from_fork+0x116/0x1d0
[   12.764274]  ret_from_fork_asm+0x1a/0x30
[   12.764580] 
[   12.764699] The buggy address belongs to the object at ffff888102fa3ec0
[   12.764699]  which belongs to the cache kmalloc-32 of size 32
[   12.765593] The buggy address is located 0 bytes to the right of
[   12.765593]  allocated 24-byte region [ffff888102fa3ec0, ffff888102fa3ed8)
[   12.766341] 
[   12.766429] The buggy address belongs to the physical page:
[   12.766707] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102fa3
[   12.767272] flags: 0x200000000000000(node=0|zone=2)
[   12.767521] page_type: f5(slab)
[   12.767747] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   12.768194] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   12.768820] page dumped because: kasan: bad access detected
[   12.769302] 
[   12.769382] Memory state around the buggy address:
[   12.769544]  ffff888102fa3d80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   12.769790]  ffff888102fa3e00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   12.770569] >ffff888102fa3e80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   12.770914]                                                     ^
[   12.771407]  ffff888102fa3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.771719]  ffff888102fa3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.772382] ==================================================================