Hay
Date
May 13, 2025, 12:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.975838] ==================================================================
[   18.976276] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   18.976485] Write of size 1 at addr fff00000c6595f00 by task kunit_try_catch/144
[   18.976730] 
[   18.976807] CPU: 1 UID: 0 PID: 144 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250513 #1 PREEMPT 
[   18.976911] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.976942] Hardware name: linux,dummy-virt (DT)
[   18.976995] Call trace:
[   18.977027]  show_stack+0x20/0x38 (C)
[   18.977090]  dump_stack_lvl+0x8c/0xd0
[   18.977144]  print_report+0x118/0x608
[   18.977194]  kasan_report+0xdc/0x128
[   18.977244]  __asan_report_store1_noabort+0x20/0x30
[   18.977300]  kmalloc_big_oob_right+0x2a4/0x2f0
[   18.977355]  kunit_try_run_case+0x170/0x3f0
[   18.977408]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.977464]  kthread+0x328/0x630
[   18.977516]  ret_from_fork+0x10/0x20
[   18.977571] 
[   18.977593] Allocated by task 144:
[   18.977626]  kasan_save_stack+0x3c/0x68
[   18.977675]  kasan_save_track+0x20/0x40
[   18.977718]  kasan_save_alloc_info+0x40/0x58
[   18.977761]  __kasan_kmalloc+0xd4/0xd8
[   18.977801]  __kmalloc_cache_noprof+0x15c/0x3c0
[   18.978480]  kmalloc_big_oob_right+0xb8/0x2f0
[   18.978554]  kunit_try_run_case+0x170/0x3f0
[   18.978802]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.978857]  kthread+0x328/0x630
[   18.979354]  ret_from_fork+0x10/0x20
[   18.979455] 
[   18.979574] The buggy address belongs to the object at fff00000c6594000
[   18.979574]  which belongs to the cache kmalloc-8k of size 8192
[   18.979686] The buggy address is located 0 bytes to the right of
[   18.979686]  allocated 7936-byte region [fff00000c6594000, fff00000c6595f00)
[   18.979898] 
[   18.980045] The buggy address belongs to the physical page:
[   18.980268] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106590
[   18.980476] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   18.980630] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   18.980700] page_type: f5(slab)
[   18.980753] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   18.980811] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   18.980869] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   18.981567] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   18.981647] head: 0bfffe0000000003 ffffc1ffc3196401 00000000ffffffff 00000000ffffffff
[   18.982137] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   18.982315] page dumped because: kasan: bad access detected
[   18.982357] 
[   18.982382] Memory state around the buggy address:
[   18.982501]  fff00000c6595e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.982578]  fff00000c6595e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.982624] >fff00000c6595f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.982665]                    ^
[   18.982699]  fff00000c6595f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.982793]  fff00000c6596000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.982854] ==================================================================

[   10.541138] ==================================================================
[   10.541655] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   10.541936] Write of size 1 at addr ffff8881038e9f00 by task kunit_try_catch/161
[   10.542291] 
[   10.542480] CPU: 0 UID: 0 PID: 161 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250513 #1 PREEMPT(voluntary) 
[   10.542596] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.542608] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.542639] Call Trace:
[   10.542652]  <TASK>
[   10.542669]  dump_stack_lvl+0x73/0xb0
[   10.542699]  print_report+0xd1/0x650
[   10.542722]  ? __virt_addr_valid+0x1db/0x2d0
[   10.542746]  ? kmalloc_big_oob_right+0x316/0x370
[   10.542767]  ? kasan_complete_mode_report_info+0x2a/0x200
[   10.542789]  ? kmalloc_big_oob_right+0x316/0x370
[   10.542812]  kasan_report+0x141/0x180
[   10.542834]  ? kmalloc_big_oob_right+0x316/0x370
[   10.542861]  __asan_report_store1_noabort+0x1b/0x30
[   10.542882]  kmalloc_big_oob_right+0x316/0x370
[   10.542904]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   10.542927]  ? __schedule+0x10cc/0x2b60
[   10.542948]  ? __pfx_read_tsc+0x10/0x10
[   10.542969]  ? ktime_get_ts64+0x86/0x230
[   10.542994]  kunit_try_run_case+0x1a5/0x480
[   10.543018]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.543039]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.543061]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.543083]  ? __kthread_parkme+0x82/0x180
[   10.543103]  ? preempt_count_sub+0x50/0x80
[   10.543127]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.543150]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.543172]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.543195]  kthread+0x337/0x6f0
[   10.543214]  ? trace_preempt_on+0x20/0xc0
[   10.543237]  ? __pfx_kthread+0x10/0x10
[   10.543257]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.543277]  ? calculate_sigpending+0x7b/0xa0
[   10.543301]  ? __pfx_kthread+0x10/0x10
[   10.543322]  ret_from_fork+0x116/0x1d0
[   10.543340]  ? __pfx_kthread+0x10/0x10
[   10.543361]  ret_from_fork_asm+0x1a/0x30
[   10.543392]  </TASK>
[   10.543403] 
[   10.553504] Allocated by task 161:
[   10.553778]  kasan_save_stack+0x45/0x70
[   10.554027]  kasan_save_track+0x18/0x40
[   10.554239]  kasan_save_alloc_info+0x3b/0x50
[   10.554408]  __kasan_kmalloc+0xb7/0xc0
[   10.554551]  __kmalloc_cache_noprof+0x189/0x420
[   10.555063]  kmalloc_big_oob_right+0xa9/0x370
[   10.555293]  kunit_try_run_case+0x1a5/0x480
[   10.555516]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.555901]  kthread+0x337/0x6f0
[   10.556031]  ret_from_fork+0x116/0x1d0
[   10.556215]  ret_from_fork_asm+0x1a/0x30
[   10.556446] 
[   10.556634] The buggy address belongs to the object at ffff8881038e8000
[   10.556634]  which belongs to the cache kmalloc-8k of size 8192
[   10.557454] The buggy address is located 0 bytes to the right of
[   10.557454]  allocated 7936-byte region [ffff8881038e8000, ffff8881038e9f00)
[   10.558265] 
[   10.558395] The buggy address belongs to the physical page:
[   10.558750] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1038e8
[   10.559084] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   10.559520] flags: 0x200000000000040(head|node=0|zone=2)
[   10.559917] page_type: f5(slab)
[   10.560103] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   10.560504] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   10.561020] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   10.561383] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   10.561890] head: 0200000000000003 ffffea00040e3a01 00000000ffffffff 00000000ffffffff
[   10.562851] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   10.563152] page dumped because: kasan: bad access detected
[   10.563682] 
[   10.563915] Memory state around the buggy address:
[   10.564103]  ffff8881038e9e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.564493]  ffff8881038e9e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.564921] >ffff8881038e9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.565204]                    ^
[   10.565417]  ffff8881038e9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.565821]  ffff8881038ea000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.566199] ==================================================================