Hay
Date
July 12, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   18.813019] ==================================================================
[   18.813429] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x2f4/0x330
[   18.813623] Read of size 1 at addr fff00000c5ecf000 by task kunit_try_catch/141
[   18.813847] 
[   18.814000] CPU: 0 UID: 0 PID: 141 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   18.814162] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.814814] Hardware name: linux,dummy-virt (DT)
[   18.815143] Call trace:
[   18.815196]  show_stack+0x20/0x38 (C)
[   18.815586]  dump_stack_lvl+0x8c/0xd0
[   18.816139]  print_report+0x118/0x608
[   18.816611]  kasan_report+0xdc/0x128
[   18.817073]  __asan_report_load1_noabort+0x20/0x30
[   18.818159]  kmalloc_node_oob_right+0x2f4/0x330
[   18.818921]  kunit_try_run_case+0x170/0x3f0
[   18.819069]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.819726]  kthread+0x328/0x630
[   18.820001]  ret_from_fork+0x10/0x20
[   18.820349] 
[   18.820599] Allocated by task 141:
[   18.820750]  kasan_save_stack+0x3c/0x68
[   18.820876]  kasan_save_track+0x20/0x40
[   18.820970]  kasan_save_alloc_info+0x40/0x58
[   18.821068]  __kasan_kmalloc+0xd4/0xd8
[   18.822471]  __kmalloc_cache_node_noprof+0x178/0x3d0
[   18.822703]  kmalloc_node_oob_right+0xbc/0x330
[   18.822978]  kunit_try_run_case+0x170/0x3f0
[   18.823209]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.823397]  kthread+0x328/0x630
[   18.823483]  ret_from_fork+0x10/0x20
[   18.823566] 
[   18.823612] The buggy address belongs to the object at fff00000c5ece000
[   18.823612]  which belongs to the cache kmalloc-4k of size 4096
[   18.823754] The buggy address is located 0 bytes to the right of
[   18.823754]  allocated 4096-byte region [fff00000c5ece000, fff00000c5ecf000)
[   18.823925] 
[   18.823975] The buggy address belongs to the physical page:
[   18.824142] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105ec8
[   18.825962] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   18.826120] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   18.826706] page_type: f5(slab)
[   18.826923] raw: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   18.827125] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   18.827291] head: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   18.827408] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   18.827533] head: 0bfffe0000000003 ffffc1ffc317b201 00000000ffffffff 00000000ffffffff
[   18.827664] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   18.827772] page dumped because: kasan: bad access detected
[   18.827864] 
[   18.827909] Memory state around the buggy address:
[   18.827987]  fff00000c5ecef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.828093]  fff00000c5ecef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.828200] >fff00000c5ecf000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.828293]                    ^
[   18.828364]  fff00000c5ecf080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.828477]  fff00000c5ecf100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.828578] ==================================================================

[   12.031486] ==================================================================
[   12.034047] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x369/0x3c0
[   12.034551] Read of size 1 at addr ffff8881029cd000 by task kunit_try_catch/158
[   12.035129] 
[   12.035236] CPU: 0 UID: 0 PID: 158 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.035392] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.035407] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.035426] Call Trace:
[   12.035439]  <TASK>
[   12.035662]  dump_stack_lvl+0x73/0xb0
[   12.035694]  print_report+0xd1/0x650
[   12.035716]  ? __virt_addr_valid+0x1db/0x2d0
[   12.035740]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.035778]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.035824]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.035849]  kasan_report+0x141/0x180
[   12.035870]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.035898]  __asan_report_load1_noabort+0x18/0x20
[   12.035922]  kmalloc_node_oob_right+0x369/0x3c0
[   12.035946]  ? __pfx_kmalloc_node_oob_right+0x10/0x10
[   12.035981]  ? __schedule+0x10cc/0x2b60
[   12.036002]  ? __pfx_read_tsc+0x10/0x10
[   12.036022]  ? ktime_get_ts64+0x86/0x230
[   12.036046]  kunit_try_run_case+0x1a5/0x480
[   12.036070]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.036093]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.036116]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.036139]  ? __kthread_parkme+0x82/0x180
[   12.036165]  ? preempt_count_sub+0x50/0x80
[   12.036188]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.036212]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.036236]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.036260]  kthread+0x337/0x6f0
[   12.036279]  ? trace_preempt_on+0x20/0xc0
[   12.036302]  ? __pfx_kthread+0x10/0x10
[   12.036326]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.036347]  ? calculate_sigpending+0x7b/0xa0
[   12.036370]  ? __pfx_kthread+0x10/0x10
[   12.036391]  ret_from_fork+0x116/0x1d0
[   12.036409]  ? __pfx_kthread+0x10/0x10
[   12.036429]  ret_from_fork_asm+0x1a/0x30
[   12.036458]  </TASK>
[   12.036469] 
[   12.046583] Allocated by task 158:
[   12.046797]  kasan_save_stack+0x45/0x70
[   12.047448]  kasan_save_track+0x18/0x40
[   12.047614]  kasan_save_alloc_info+0x3b/0x50
[   12.048119]  __kasan_kmalloc+0xb7/0xc0
[   12.048396]  __kmalloc_cache_node_noprof+0x188/0x420
[   12.048862]  kmalloc_node_oob_right+0xab/0x3c0
[   12.049210]  kunit_try_run_case+0x1a5/0x480
[   12.049515]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.049890]  kthread+0x337/0x6f0
[   12.050067]  ret_from_fork+0x116/0x1d0
[   12.050251]  ret_from_fork_asm+0x1a/0x30
[   12.050448] 
[   12.050534] The buggy address belongs to the object at ffff8881029cc000
[   12.050534]  which belongs to the cache kmalloc-4k of size 4096
[   12.051798] The buggy address is located 0 bytes to the right of
[   12.051798]  allocated 4096-byte region [ffff8881029cc000, ffff8881029cd000)
[   12.052406] 
[   12.052622] The buggy address belongs to the physical page:
[   12.053360] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029c8
[   12.054066] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.054400] flags: 0x200000000000040(head|node=0|zone=2)
[   12.055054] page_type: f5(slab)
[   12.055227] raw: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   12.055624] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   12.056289] head: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   12.056880] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   12.057327] head: 0200000000000003 ffffea00040a7201 00000000ffffffff 00000000ffffffff
[   12.057803] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   12.058358] page dumped because: kasan: bad access detected
[   12.058626] 
[   12.059077] Memory state around the buggy address:
[   12.059300]  ffff8881029ccf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.059646]  ffff8881029ccf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.060269] >ffff8881029cd000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.060828]                    ^
[   12.061111]  ffff8881029cd080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.061453]  ffff8881029cd100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.062027] ==================================================================