Hay
Date
July 1, 2025, 12:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   17.080490] ==================================================================
[   17.080582] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x2f4/0x330
[   17.080803] Read of size 1 at addr fff00000c5f8f000 by task kunit_try_catch/140
[   17.080977] 
[   17.081018] CPU: 1 UID: 0 PID: 140 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   17.081103] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.081130] Hardware name: linux,dummy-virt (DT)
[   17.081164] Call trace:
[   17.081187]  show_stack+0x20/0x38 (C)
[   17.081238]  dump_stack_lvl+0x8c/0xd0
[   17.081289]  print_report+0x118/0x608
[   17.081335]  kasan_report+0xdc/0x128
[   17.081387]  __asan_report_load1_noabort+0x20/0x30
[   17.081794]  kmalloc_node_oob_right+0x2f4/0x330
[   17.082231]  kunit_try_run_case+0x170/0x3f0
[   17.082292]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.082812]  kthread+0x328/0x630
[   17.082870]  ret_from_fork+0x10/0x20
[   17.083325] 
[   17.083357] Allocated by task 140:
[   17.083440]  kasan_save_stack+0x3c/0x68
[   17.083569]  kasan_save_track+0x20/0x40
[   17.083605]  kasan_save_alloc_info+0x40/0x58
[   17.083644]  __kasan_kmalloc+0xd4/0xd8
[   17.083680]  __kmalloc_cache_node_noprof+0x178/0x3d0
[   17.083889]  kmalloc_node_oob_right+0xbc/0x330
[   17.083996]  kunit_try_run_case+0x170/0x3f0
[   17.084035]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.084078]  kthread+0x328/0x630
[   17.084109]  ret_from_fork+0x10/0x20
[   17.084154] 
[   17.084190] The buggy address belongs to the object at fff00000c5f8e000
[   17.084190]  which belongs to the cache kmalloc-4k of size 4096
[   17.084512] The buggy address is located 0 bytes to the right of
[   17.084512]  allocated 4096-byte region [fff00000c5f8e000, fff00000c5f8f000)
[   17.084821] 
[   17.084843] The buggy address belongs to the physical page:
[   17.084989] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105f88
[   17.085313] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   17.085612] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   17.085751] page_type: f5(slab)
[   17.085824] raw: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   17.085884] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   17.085964] head: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   17.086158] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   17.086209] head: 0bfffe0000000003 ffffc1ffc317e201 00000000ffffffff 00000000ffffffff
[   17.086324] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   17.086420] page dumped because: kasan: bad access detected
[   17.086467] 
[   17.086486] Memory state around the buggy address:
[   17.086520]  fff00000c5f8ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.086594]  fff00000c5f8ef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.086660] >fff00000c5f8f000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.086796]                    ^
[   17.086909]  fff00000c5f8f080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.087112]  fff00000c5f8f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.087209] ==================================================================

[   10.840223] ==================================================================
[   10.840610] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x369/0x3c0
[   10.840858] Read of size 1 at addr ffff888102977000 by task kunit_try_catch/157
[   10.841206] 
[   10.841470] CPU: 1 UID: 0 PID: 157 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   10.841514] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.841526] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.841546] Call Trace:
[   10.841558]  <TASK>
[   10.841574]  dump_stack_lvl+0x73/0xb0
[   10.841602]  print_report+0xd1/0x650
[   10.841623]  ? __virt_addr_valid+0x1db/0x2d0
[   10.841646]  ? kmalloc_node_oob_right+0x369/0x3c0
[   10.841667]  ? kasan_complete_mode_report_info+0x2a/0x200
[   10.841688]  ? kmalloc_node_oob_right+0x369/0x3c0
[   10.841710]  kasan_report+0x141/0x180
[   10.841730]  ? kmalloc_node_oob_right+0x369/0x3c0
[   10.841758]  __asan_report_load1_noabort+0x18/0x20
[   10.841780]  kmalloc_node_oob_right+0x369/0x3c0
[   10.841803]  ? __pfx_kmalloc_node_oob_right+0x10/0x10
[   10.841826]  ? __schedule+0x10cc/0x2b60
[   10.841846]  ? __pfx_read_tsc+0x10/0x10
[   10.841867]  ? ktime_get_ts64+0x86/0x230
[   10.841890]  kunit_try_run_case+0x1a5/0x480
[   10.841914]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.841935]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.841957]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.841978]  ? __kthread_parkme+0x82/0x180
[   10.841997]  ? preempt_count_sub+0x50/0x80
[   10.842020]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.842054]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.842076]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.842097]  kthread+0x337/0x6f0
[   10.842114]  ? trace_preempt_on+0x20/0xc0
[   10.842137]  ? __pfx_kthread+0x10/0x10
[   10.842156]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.842189]  ? calculate_sigpending+0x7b/0xa0
[   10.842212]  ? __pfx_kthread+0x10/0x10
[   10.842232]  ret_from_fork+0x116/0x1d0
[   10.842249]  ? __pfx_kthread+0x10/0x10
[   10.842268]  ret_from_fork_asm+0x1a/0x30
[   10.842297]  </TASK>
[   10.842307] 
[   10.856019] Allocated by task 157:
[   10.856248]  kasan_save_stack+0x45/0x70
[   10.856619]  kasan_save_track+0x18/0x40
[   10.857068]  kasan_save_alloc_info+0x3b/0x50
[   10.857465]  __kasan_kmalloc+0xb7/0xc0
[   10.857819]  __kmalloc_cache_node_noprof+0x188/0x420
[   10.858317]  kmalloc_node_oob_right+0xab/0x3c0
[   10.858734]  kunit_try_run_case+0x1a5/0x480
[   10.858889]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.859075]  kthread+0x337/0x6f0
[   10.859226]  ret_from_fork+0x116/0x1d0
[   10.859373]  ret_from_fork_asm+0x1a/0x30
[   10.859652] 
[   10.859806] The buggy address belongs to the object at ffff888102976000
[   10.859806]  which belongs to the cache kmalloc-4k of size 4096
[   10.860989] The buggy address is located 0 bytes to the right of
[   10.860989]  allocated 4096-byte region [ffff888102976000, ffff888102977000)
[   10.861800] 
[   10.861955] The buggy address belongs to the physical page:
[   10.862542] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102970
[   10.862968] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   10.863634] flags: 0x200000000000040(head|node=0|zone=2)
[   10.864391] page_type: f5(slab)
[   10.864703] raw: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   10.865534] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   10.866337] head: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   10.866646] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   10.866877] head: 0200000000000003 ffffea00040a5c01 00000000ffffffff 00000000ffffffff
[   10.867136] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   10.867623] page dumped because: kasan: bad access detected
[   10.868207] 
[   10.868281] Memory state around the buggy address:
[   10.868703]  ffff888102976f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.868967]  ffff888102976f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.869349] >ffff888102977000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.869756]                    ^
[   10.869916]  ffff888102977080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.870249]  ffff888102977100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.870539] ==================================================================