Hay
Date
June 2, 2025, 2:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.084760] ==================================================================
[   19.085616] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x310/0x348
[   19.086463] Read of size 1 at addr fff00000c6b25000 by task kunit_try_catch/129
[   19.087545] 
[   19.087920] CPU: 1 UID: 0 PID: 129 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   19.088381] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.088456] Hardware name: linux,dummy-virt (DT)
[   19.088543] Call trace:
[   19.088622]  dump_backtrace+0x9c/0x128
[   19.088748]  show_stack+0x20/0x38
[   19.088833]  dump_stack_lvl+0x8c/0xd0
[   19.088904]  print_report+0x118/0x5f0
[   19.088948]  kasan_report+0xdc/0x128
[   19.088989]  __asan_report_load1_noabort+0x20/0x30
[   19.089035]  kmalloc_node_oob_right+0x310/0x348
[   19.089082]  kunit_try_run_case+0x170/0x3f0
[   19.089127]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.089174]  kthread+0x24c/0x2d0
[   19.089216]  ret_from_fork+0x10/0x20
[   19.089289] 
[   19.095313] Allocated by task 129:
[   19.095750]  kasan_save_stack+0x3c/0x68
[   19.096288]  kasan_save_track+0x20/0x40
[   19.096759]  kasan_save_alloc_info+0x40/0x58
[   19.097646]  __kasan_kmalloc+0xd4/0xd8
[   19.097993]  __kmalloc_cache_node_noprof+0x174/0x348
[   19.098410]  kmalloc_node_oob_right+0xbc/0x348
[   19.098954]  kunit_try_run_case+0x170/0x3f0
[   19.099569]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.099904]  kthread+0x24c/0x2d0
[   19.100375]  ret_from_fork+0x10/0x20
[   19.100799] 
[   19.101013] The buggy address belongs to the object at fff00000c6b24000
[   19.101013]  which belongs to the cache kmalloc-4k of size 4096
[   19.102032] The buggy address is located 0 bytes to the right of
[   19.102032]  allocated 4096-byte region [fff00000c6b24000, fff00000c6b25000)
[   19.102999] 
[   19.103346] The buggy address belongs to the physical page:
[   19.104385] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106b20
[   19.105436] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   19.106178] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   19.106780] page_type: f5(slab)
[   19.107138] raw: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   19.107899] raw: 0000000000000000 0000000080040004 00000001f5000000 0000000000000000
[   19.108742] head: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   19.109337] head: 0000000000000000 0000000080040004 00000001f5000000 0000000000000000
[   19.110055] head: 0bfffe0000000003 ffffc1ffc31ac801 ffffffffffffffff 0000000000000000
[   19.110709] head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000
[   19.111664] page dumped because: kasan: bad access detected
[   19.112339] 
[   19.112497] Memory state around the buggy address:
[   19.112749]  fff00000c6b24f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.113083]  fff00000c6b24f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.113416] >fff00000c6b25000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.113743]                    ^
[   19.113945]  fff00000c6b25080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.115209]  fff00000c6b25100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.116007] ==================================================================

[   11.406849] ==================================================================
[   11.407670] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x36b/0x3d0
[   11.408612] Read of size 1 at addr ffff888102a59000 by task kunit_try_catch/147
[   11.408948] 
[   11.409114] CPU: 1 UID: 0 PID: 147 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   11.409196] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.409219] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.409403] Call Trace:
[   11.409441]  <TASK>
[   11.409473]  dump_stack_lvl+0x73/0xb0
[   11.409530]  print_report+0xd1/0x640
[   11.409576]  ? __virt_addr_valid+0x1db/0x2d0
[   11.409621]  ? kmalloc_node_oob_right+0x36b/0x3d0
[   11.409668]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.409705]  ? kmalloc_node_oob_right+0x36b/0x3d0
[   11.409730]  kasan_report+0x140/0x180
[   11.409752]  ? kmalloc_node_oob_right+0x36b/0x3d0
[   11.409775]  __asan_report_load1_noabort+0x18/0x20
[   11.409794]  kmalloc_node_oob_right+0x36b/0x3d0
[   11.409814]  ? __pfx_kmalloc_node_oob_right+0x10/0x10
[   11.409834]  ? __schedule+0xc49/0x27a0
[   11.409854]  ? __pfx_read_tsc+0x10/0x10
[   11.409872]  ? ktime_get_ts64+0x84/0x230
[   11.409910]  kunit_try_run_case+0x1a6/0x480
[   11.409932]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.409951]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   11.409970]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.409994]  ? __kthread_parkme+0x82/0x160
[   11.410013]  ? preempt_count_sub+0x50/0x80
[   11.410035]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.410075]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.410144]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.410185]  kthread+0x257/0x310
[   11.410207]  ? __pfx_kthread+0x10/0x10
[   11.410226]  ret_from_fork+0x41/0x80
[   11.410244]  ? __pfx_kthread+0x10/0x10
[   11.410261]  ret_from_fork_asm+0x1a/0x30
[   11.410289]  </TASK>
[   11.410301] 
[   11.419059] Allocated by task 147:
[   11.419353]  kasan_save_stack+0x45/0x70
[   11.419776]  kasan_save_track+0x18/0x40
[   11.420350]  kasan_save_alloc_info+0x3b/0x50
[   11.420588]  __kasan_kmalloc+0xb7/0xc0
[   11.420770]  __kmalloc_cache_node_noprof+0x187/0x370
[   11.420965]  kmalloc_node_oob_right+0xac/0x3d0
[   11.421155]  kunit_try_run_case+0x1a6/0x480
[   11.421327]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.421693]  kthread+0x257/0x310
[   11.421957]  ret_from_fork+0x41/0x80
[   11.422244]  ret_from_fork_asm+0x1a/0x30
[   11.422547] 
[   11.422728] The buggy address belongs to the object at ffff888102a58000
[   11.422728]  which belongs to the cache kmalloc-4k of size 4096
[   11.423954] The buggy address is located 0 bytes to the right of
[   11.423954]  allocated 4096-byte region [ffff888102a58000, ffff888102a59000)
[   11.425427] 
[   11.425591] The buggy address belongs to the physical page:
[   11.425914] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a58
[   11.426488] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   11.426927] flags: 0x200000000000040(head|node=0|zone=2)
[   11.427745] page_type: f5(slab)
[   11.428333] raw: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   11.428770] raw: 0000000000000000 0000000080040004 00000001f5000000 0000000000000000
[   11.429382] head: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   11.429750] head: 0000000000000000 0000000080040004 00000001f5000000 0000000000000000
[   11.430374] head: 0200000000000003 ffffea00040a9601 ffffffffffffffff 0000000000000000
[   11.430771] head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000
[   11.431542] page dumped because: kasan: bad access detected
[   11.431856] 
[   11.432016] Memory state around the buggy address:
[   11.432309]  ffff888102a58f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.432744]  ffff888102a58f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.433217] >ffff888102a59000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.433486]                    ^
[   11.433760]  ffff888102a59080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.434136]  ffff888102a59100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.434603] ==================================================================