Hay
Date
July 9, 2025, 2:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.677531] ==================================================================
[   16.677626] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x2f4/0x330
[   16.677728] Read of size 1 at addr fff00000c5c8f000 by task kunit_try_catch/140
[   16.677915] 
[   16.678054] CPU: 0 UID: 0 PID: 140 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   16.678368] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.678504] Hardware name: linux,dummy-virt (DT)
[   16.678547] Call trace:
[   16.678569]  show_stack+0x20/0x38 (C)
[   16.678620]  dump_stack_lvl+0x8c/0xd0
[   16.678667]  print_report+0x118/0x608
[   16.678714]  kasan_report+0xdc/0x128
[   16.678760]  __asan_report_load1_noabort+0x20/0x30
[   16.678811]  kmalloc_node_oob_right+0x2f4/0x330
[   16.678859]  kunit_try_run_case+0x170/0x3f0
[   16.678906]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.678961]  kthread+0x328/0x630
[   16.679026]  ret_from_fork+0x10/0x20
[   16.679075] 
[   16.679103] Allocated by task 140:
[   16.679130]  kasan_save_stack+0x3c/0x68
[   16.679170]  kasan_save_track+0x20/0x40
[   16.679284]  kasan_save_alloc_info+0x40/0x58
[   16.679509]  __kasan_kmalloc+0xd4/0xd8
[   16.679625]  __kmalloc_cache_node_noprof+0x178/0x3d0
[   16.679747]  kmalloc_node_oob_right+0xbc/0x330
[   16.679786]  kunit_try_run_case+0x170/0x3f0
[   16.679834]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.679878]  kthread+0x328/0x630
[   16.679954]  ret_from_fork+0x10/0x20
[   16.679989] 
[   16.680103] The buggy address belongs to the object at fff00000c5c8e000
[   16.680103]  which belongs to the cache kmalloc-4k of size 4096
[   16.680171] The buggy address is located 0 bytes to the right of
[   16.680171]  allocated 4096-byte region [fff00000c5c8e000, fff00000c5c8f000)
[   16.680243] 
[   16.680361] The buggy address belongs to the physical page:
[   16.680458] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105c88
[   16.680617] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   16.680682] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   16.680745] page_type: f5(slab)
[   16.680783] raw: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   16.680834] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   16.680953] head: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   16.681041] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   16.681127] head: 0bfffe0000000003 ffffc1ffc3172201 00000000ffffffff 00000000ffffffff
[   16.681211] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   16.681254] page dumped because: kasan: bad access detected
[   16.681342] 
[   16.681393] Memory state around the buggy address:
[   16.681520]  fff00000c5c8ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.681583]  fff00000c5c8ef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.681745] >fff00000c5c8f000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.681849]                    ^
[   16.681983]  fff00000c5c8f080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.682025]  fff00000c5c8f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.682063] ==================================================================

[   12.106498] ==================================================================
[   12.107535] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x369/0x3c0
[   12.107828] Read of size 1 at addr ffff888103921000 by task kunit_try_catch/157
[   12.108052] 
[   12.108161] CPU: 0 UID: 0 PID: 157 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.108211] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.108222] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.108246] Call Trace:
[   12.108259]  <TASK>
[   12.108281]  dump_stack_lvl+0x73/0xb0
[   12.108313]  print_report+0xd1/0x650
[   12.108336]  ? __virt_addr_valid+0x1db/0x2d0
[   12.108361]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.108384]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.108406]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.108430]  kasan_report+0x141/0x180
[   12.108450]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.108477]  __asan_report_load1_noabort+0x18/0x20
[   12.108501]  kmalloc_node_oob_right+0x369/0x3c0
[   12.108525]  ? __pfx_kmalloc_node_oob_right+0x10/0x10
[   12.108549]  ? __schedule+0x10cc/0x2b60
[   12.108571]  ? __pfx_read_tsc+0x10/0x10
[   12.108603]  ? ktime_get_ts64+0x86/0x230
[   12.108630]  kunit_try_run_case+0x1a5/0x480
[   12.108656]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.108678]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.108702]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.108725]  ? __kthread_parkme+0x82/0x180
[   12.108747]  ? preempt_count_sub+0x50/0x80
[   12.108771]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.108795]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.108819]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.108842]  kthread+0x337/0x6f0
[   12.108860]  ? trace_preempt_on+0x20/0xc0
[   12.108884]  ? __pfx_kthread+0x10/0x10
[   12.108904]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.108925]  ? calculate_sigpending+0x7b/0xa0
[   12.108949]  ? __pfx_kthread+0x10/0x10
[   12.108969]  ret_from_fork+0x116/0x1d0
[   12.108986]  ? __pfx_kthread+0x10/0x10
[   12.109005]  ret_from_fork_asm+0x1a/0x30
[   12.109037]  </TASK>
[   12.109048] 
[   12.118533] Allocated by task 157:
[   12.119038]  kasan_save_stack+0x45/0x70
[   12.119237]  kasan_save_track+0x18/0x40
[   12.119429]  kasan_save_alloc_info+0x3b/0x50
[   12.119873]  __kasan_kmalloc+0xb7/0xc0
[   12.120049]  __kmalloc_cache_node_noprof+0x188/0x420
[   12.120422]  kmalloc_node_oob_right+0xab/0x3c0
[   12.120609]  kunit_try_run_case+0x1a5/0x480
[   12.121009]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.121405]  kthread+0x337/0x6f0
[   12.121571]  ret_from_fork+0x116/0x1d0
[   12.121726]  ret_from_fork_asm+0x1a/0x30
[   12.122171] 
[   12.122258] The buggy address belongs to the object at ffff888103920000
[   12.122258]  which belongs to the cache kmalloc-4k of size 4096
[   12.123070] The buggy address is located 0 bytes to the right of
[   12.123070]  allocated 4096-byte region [ffff888103920000, ffff888103921000)
[   12.123738] 
[   12.124002] The buggy address belongs to the physical page:
[   12.124331] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103920
[   12.125611] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.125885] flags: 0x200000000000040(head|node=0|zone=2)
[   12.126173] page_type: f5(slab)
[   12.126300] raw: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   12.126531] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   12.126838] head: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   12.127635] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   12.129618] head: 0200000000000003 ffffea00040e4801 00000000ffffffff 00000000ffffffff
[   12.130481] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   12.131515] page dumped because: kasan: bad access detected
[   12.132336] 
[   12.132415] Memory state around the buggy address:
[   12.132575]  ffff888103920f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.133027]  ffff888103920f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.133651] >ffff888103921000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.134299]                    ^
[   12.134584]  ffff888103921080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.135292]  ffff888103921100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.136027] ==================================================================