Hay
Date
June 23, 2025, 7:07 a.m.

Environment
qemu-arm64
qemu-x86_64

[   32.210060] ==================================================================
[   32.210190] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x2f4/0x330
[   32.210315] Read of size 1 at addr fff00000c76e9000 by task kunit_try_catch/152
[   32.210426] 
[   32.210499] CPU: 1 UID: 0 PID: 152 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250623 #1 PREEMPT 
[   32.210690] Tainted: [B]=BAD_PAGE, [N]=TEST
[   32.210761] Hardware name: linux,dummy-virt (DT)
[   32.210835] Call trace:
[   32.210897]  show_stack+0x20/0x38 (C)
[   32.211234]  dump_stack_lvl+0x8c/0xd0
[   32.211406]  print_report+0x118/0x608
[   32.211530]  kasan_report+0xdc/0x128
[   32.211638]  __asan_report_load1_noabort+0x20/0x30
[   32.211754]  kmalloc_node_oob_right+0x2f4/0x330
[   32.211882]  kunit_try_run_case+0x170/0x3f0
[   32.212923]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.213111]  kthread+0x328/0x630
[   32.214204]  ret_from_fork+0x10/0x20
[   32.214342] 
[   32.214655] Allocated by task 152:
[   32.214882]  kasan_save_stack+0x3c/0x68
[   32.215008]  kasan_save_track+0x20/0x40
[   32.215445]  kasan_save_alloc_info+0x40/0x58
[   32.215644]  __kasan_kmalloc+0xd4/0xd8
[   32.215865]  __kmalloc_cache_node_noprof+0x178/0x3d0
[   32.216046]  kmalloc_node_oob_right+0xbc/0x330
[   32.216144]  kunit_try_run_case+0x170/0x3f0
[   32.217182]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.217659]  kthread+0x328/0x630
[   32.217749]  ret_from_fork+0x10/0x20
[   32.217854] 
[   32.217902] The buggy address belongs to the object at fff00000c76e8000
[   32.217902]  which belongs to the cache kmalloc-4k of size 4096
[   32.218049] The buggy address is located 0 bytes to the right of
[   32.218049]  allocated 4096-byte region [fff00000c76e8000, fff00000c76e9000)
[   32.218211] 
[   32.218344] The buggy address belongs to the physical page:
[   32.218482] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1076e8
[   32.219862] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   32.220239] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   32.220622] page_type: f5(slab)
[   32.220740] raw: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   32.220856] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   32.221090] head: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   32.221447] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   32.221634] head: 0bfffe0000000003 ffffc1ffc31dba01 00000000ffffffff 00000000ffffffff
[   32.221769] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   32.221877] page dumped because: kasan: bad access detected
[   32.221953] 
[   32.222266] Memory state around the buggy address:
[   32.222360]  fff00000c76e8f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   32.222471]  fff00000c76e8f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   32.223533] >fff00000c76e9000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.223633]                    ^
[   32.224176]  fff00000c76e9080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.224315]  fff00000c76e9100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.224405] ==================================================================

[   21.051201] ==================================================================
[   21.051606] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x369/0x3c0
[   21.052694] Read of size 1 at addr ffff88810385b000 by task kunit_try_catch/169
[   21.053262] 
[   21.053517] CPU: 0 UID: 0 PID: 169 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250623 #1 PREEMPT(voluntary) 
[   21.053600] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.053619] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   21.053648] Call Trace:
[   21.053669]  <TASK>
[   21.053694]  dump_stack_lvl+0x73/0xb0
[   21.053743]  print_report+0xd1/0x650
[   21.053773]  ? __virt_addr_valid+0x1db/0x2d0
[   21.053806]  ? kmalloc_node_oob_right+0x369/0x3c0
[   21.053994]  ? kasan_complete_mode_report_info+0x2a/0x200
[   21.054033]  ? kmalloc_node_oob_right+0x369/0x3c0
[   21.054057]  kasan_report+0x141/0x180
[   21.054086]  ? kmalloc_node_oob_right+0x369/0x3c0
[   21.054126]  __asan_report_load1_noabort+0x18/0x20
[   21.054161]  kmalloc_node_oob_right+0x369/0x3c0
[   21.054197]  ? __pfx_kmalloc_node_oob_right+0x10/0x10
[   21.054220]  ? __schedule+0x10cc/0x2b60
[   21.054239]  ? __pfx_read_tsc+0x10/0x10
[   21.054258]  ? ktime_get_ts64+0x86/0x230
[   21.054280]  kunit_try_run_case+0x1a5/0x480
[   21.054303]  ? __pfx_kunit_try_run_case+0x10/0x10
[   21.054324]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   21.054345]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   21.054365]  ? __kthread_parkme+0x82/0x180
[   21.054402]  ? preempt_count_sub+0x50/0x80
[   21.054426]  ? __pfx_kunit_try_run_case+0x10/0x10
[   21.054449]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   21.054470]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   21.054491]  kthread+0x337/0x6f0
[   21.054509]  ? trace_preempt_on+0x20/0xc0
[   21.054531]  ? __pfx_kthread+0x10/0x10
[   21.054550]  ? _raw_spin_unlock_irq+0x47/0x80
[   21.054569]  ? calculate_sigpending+0x7b/0xa0
[   21.054591]  ? __pfx_kthread+0x10/0x10
[   21.054610]  ret_from_fork+0x116/0x1d0
[   21.054627]  ? __pfx_kthread+0x10/0x10
[   21.054646]  ret_from_fork_asm+0x1a/0x30
[   21.054675]  </TASK>
[   21.054688] 
[   21.064156] Allocated by task 169:
[   21.064311]  kasan_save_stack+0x45/0x70
[   21.064481]  kasan_save_track+0x18/0x40
[   21.064742]  kasan_save_alloc_info+0x3b/0x50
[   21.065024]  __kasan_kmalloc+0xb7/0xc0
[   21.065286]  __kmalloc_cache_node_noprof+0x188/0x420
[   21.066776]  kmalloc_node_oob_right+0xab/0x3c0
[   21.067017]  kunit_try_run_case+0x1a5/0x480
[   21.067181]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   21.067421]  kthread+0x337/0x6f0
[   21.067668]  ret_from_fork+0x116/0x1d0
[   21.068826]  ret_from_fork_asm+0x1a/0x30
[   21.069120] 
[   21.069214] The buggy address belongs to the object at ffff88810385a000
[   21.069214]  which belongs to the cache kmalloc-4k of size 4096
[   21.069427] The buggy address is located 0 bytes to the right of
[   21.069427]  allocated 4096-byte region [ffff88810385a000, ffff88810385b000)
[   21.069716] 
[   21.069805] The buggy address belongs to the physical page:
[   21.070348] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103858
[   21.070796] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   21.070940] flags: 0x200000000000040(head|node=0|zone=2)
[   21.071130] page_type: f5(slab)
[   21.071201] raw: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   21.071317] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   21.071683] head: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   21.072721] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   21.073411] head: 0200000000000003 ffffea00040e1601 00000000ffffffff 00000000ffffffff
[   21.073996] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   21.074725] page dumped because: kasan: bad access detected
[   21.075232] 
[   21.075400] Memory state around the buggy address:
[   21.075763]  ffff88810385af00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   21.076319]  ffff88810385af80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   21.076799] >ffff88810385b000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.077602]                    ^
[   21.078135]  ffff88810385b080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.078407]  ffff88810385b100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.078865] ==================================================================