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

Environment
qemu-arm64
qemu-x86_64

[   20.969861] ==================================================================
[   20.970045] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x2f4/0x330
[   20.970199] Read of size 1 at addr fff00000c78b1000 by task kunit_try_catch/140
[   20.970307] 
[   20.970471] CPU: 0 UID: 0 PID: 140 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT 
[   20.970668] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.970729] Hardware name: linux,dummy-virt (DT)
[   20.971121] Call trace:
[   20.972499]  show_stack+0x20/0x38 (C)
[   20.972587]  dump_stack_lvl+0x8c/0xd0
[   20.972650]  print_report+0x118/0x608
[   20.972706]  kasan_report+0xdc/0x128
[   20.972757]  __asan_report_load1_noabort+0x20/0x30
[   20.972811]  kmalloc_node_oob_right+0x2f4/0x330
[   20.972865]  kunit_try_run_case+0x170/0x3f0
[   20.972922]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.972981]  kthread+0x328/0x630
[   20.973030]  ret_from_fork+0x10/0x20
[   20.973089] 
[   20.973111] Allocated by task 140:
[   20.973147]  kasan_save_stack+0x3c/0x68
[   20.973198]  kasan_save_track+0x20/0x40
[   20.973240]  kasan_save_alloc_info+0x40/0x58
[   20.973280]  __kasan_kmalloc+0xd4/0xd8
[   20.973319]  __kmalloc_cache_node_noprof+0x168/0x3d0
[   20.973366]  kmalloc_node_oob_right+0xbc/0x330
[   20.973428]  kunit_try_run_case+0x170/0x3f0
[   20.973473]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.973520]  kthread+0x328/0x630
[   20.973556]  ret_from_fork+0x10/0x20
[   20.973594] 
[   20.973617] The buggy address belongs to the object at fff00000c78b0000
[   20.973617]  which belongs to the cache kmalloc-4k of size 4096
[   20.973683] The buggy address is located 0 bytes to the right of
[   20.973683]  allocated 4096-byte region [fff00000c78b0000, fff00000c78b1000)
[   20.973751] 
[   20.973777] The buggy address belongs to the physical page:
[   20.973888] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078b0
[   20.974088] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   20.974146] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   20.974227] page_type: f5(slab)
[   20.974282] raw: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   20.974339] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   20.974996] head: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   20.975119] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   20.975229] head: 0bfffe0000000003 ffffc1ffc31e2c01 00000000ffffffff 00000000ffffffff
[   20.975343] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   20.975457] page dumped because: kasan: bad access detected
[   20.975526] 
[   20.975567] Memory state around the buggy address:
[   20.975639]  fff00000c78b0f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   20.975832]  fff00000c78b0f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   20.975964] >fff00000c78b1000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.976059]                    ^
[   20.976126]  fff00000c78b1080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.976230]  fff00000c78b1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.976327] ==================================================================


[   10.280748] ==================================================================
[   10.281386] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x369/0x3c0
[   10.281658] Read of size 1 at addr ffff88810294f000 by task kunit_try_catch/157
[   10.281895] 
[   10.282154] CPU: 1 UID: 0 PID: 157 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT(voluntary) 
[   10.282203] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.282215] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.282236] Call Trace:
[   10.282250]  <TASK>
[   10.282267]  dump_stack_lvl+0x73/0xb0
[   10.282295]  print_report+0xd1/0x650
[   10.282329]  ? __virt_addr_valid+0x1db/0x2d0
[   10.282353]  ? kmalloc_node_oob_right+0x369/0x3c0
[   10.282376]  ? kasan_complete_mode_report_info+0x2a/0x200
[   10.282410]  ? kmalloc_node_oob_right+0x369/0x3c0
[   10.282434]  kasan_report+0x141/0x180
[   10.282456]  ? kmalloc_node_oob_right+0x369/0x3c0
[   10.282484]  __asan_report_load1_noabort+0x18/0x20
[   10.282504]  kmalloc_node_oob_right+0x369/0x3c0
[   10.282541]  ? __pfx_kmalloc_node_oob_right+0x10/0x10
[   10.282566]  ? __schedule+0x10cc/0x2b60
[   10.282600]  ? __pfx_read_tsc+0x10/0x10
[   10.282631]  ? ktime_get_ts64+0x86/0x230
[   10.282655]  kunit_try_run_case+0x1a5/0x480
[   10.282677]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.282697]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.282729]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.282753]  ? __kthread_parkme+0x82/0x180
[   10.282774]  ? preempt_count_sub+0x50/0x80
[   10.282936]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.282965]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.283002]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.283027]  kthread+0x337/0x6f0
[   10.283046]  ? trace_preempt_on+0x20/0xc0
[   10.283069]  ? __pfx_kthread+0x10/0x10
[   10.283089]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.283111]  ? calculate_sigpending+0x7b/0xa0
[   10.283135]  ? __pfx_kthread+0x10/0x10
[   10.283156]  ret_from_fork+0x116/0x1d0
[   10.283174]  ? __pfx_kthread+0x10/0x10
[   10.283194]  ret_from_fork_asm+0x1a/0x30
[   10.283224]  </TASK>
[   10.283235] 
[   10.298030] Allocated by task 157:
[   10.298317]  kasan_save_stack+0x45/0x70
[   10.298475]  kasan_save_track+0x18/0x40
[   10.298628]  kasan_save_alloc_info+0x3b/0x50
[   10.298784]  __kasan_kmalloc+0xb7/0xc0
[   10.299295]  __kmalloc_cache_node_noprof+0x188/0x420
[   10.299886]  kmalloc_node_oob_right+0xab/0x3c0
[   10.300401]  kunit_try_run_case+0x1a5/0x480
[   10.300860]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.301494]  kthread+0x337/0x6f0
[   10.301921]  ret_from_fork+0x116/0x1d0
[   10.302352]  ret_from_fork_asm+0x1a/0x30
[   10.302795] 
[   10.302970] The buggy address belongs to the object at ffff88810294e000
[   10.302970]  which belongs to the cache kmalloc-4k of size 4096
[   10.304262] The buggy address is located 0 bytes to the right of
[   10.304262]  allocated 4096-byte region [ffff88810294e000, ffff88810294f000)
[   10.304659] 
[   10.304735] The buggy address belongs to the physical page:
[   10.305400] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102948
[   10.306593] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   10.307260] flags: 0x200000000000040(head|node=0|zone=2)
[   10.307693] page_type: f5(slab)
[   10.308025] raw: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   10.308712] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   10.309211] head: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   10.309456] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   10.309707] head: 0200000000000003 ffffea00040a5201 00000000ffffffff 00000000ffffffff
[   10.310548] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   10.311407] page dumped because: kasan: bad access detected
[   10.311948] 
[   10.312180] Memory state around the buggy address:
[   10.312716]  ffff88810294ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.313464]  ffff88810294ef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.314082] >ffff88810294f000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.314308]                    ^
[   10.314431]  ffff88810294f080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.314678]  ffff88810294f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.315059] ==================================================================