Hay
Date
July 5, 2025, 5:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.003376] ==================================================================
[   18.003443] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x2f4/0x330
[   18.003495] Read of size 1 at addr fff00000c5e93000 by task kunit_try_catch/140
[   18.003542] 
[   18.003590] CPU: 1 UID: 0 PID: 140 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   18.003667] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.003692] Hardware name: linux,dummy-virt (DT)
[   18.003738] Call trace:
[   18.003760]  show_stack+0x20/0x38 (C)
[   18.003807]  dump_stack_lvl+0x8c/0xd0
[   18.003851]  print_report+0x118/0x608
[   18.003909]  kasan_report+0xdc/0x128
[   18.003953]  __asan_report_load1_noabort+0x20/0x30
[   18.004151]  kmalloc_node_oob_right+0x2f4/0x330
[   18.004200]  kunit_try_run_case+0x170/0x3f0
[   18.004245]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.004430]  kthread+0x328/0x630
[   18.004486]  ret_from_fork+0x10/0x20
[   18.004627] 
[   18.004645] Allocated by task 140:
[   18.004672]  kasan_save_stack+0x3c/0x68
[   18.004758]  kasan_save_track+0x20/0x40
[   18.004795]  kasan_save_alloc_info+0x40/0x58
[   18.004938]  __kasan_kmalloc+0xd4/0xd8
[   18.004975]  __kmalloc_cache_node_noprof+0x178/0x3d0
[   18.005014]  kmalloc_node_oob_right+0xbc/0x330
[   18.005050]  kunit_try_run_case+0x170/0x3f0
[   18.005086]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.005127]  kthread+0x328/0x630
[   18.005174]  ret_from_fork+0x10/0x20
[   18.005209] 
[   18.005227] The buggy address belongs to the object at fff00000c5e92000
[   18.005227]  which belongs to the cache kmalloc-4k of size 4096
[   18.005282] The buggy address is located 0 bytes to the right of
[   18.005282]  allocated 4096-byte region [fff00000c5e92000, fff00000c5e93000)
[   18.005342] 
[   18.005361] The buggy address belongs to the physical page:
[   18.005430] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105e90
[   18.005581] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   18.005643] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   18.005705] page_type: f5(slab)
[   18.005740] raw: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   18.005789] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   18.005849] head: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   18.005907] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   18.005954] head: 0bfffe0000000003 ffffc1ffc317a401 00000000ffffffff 00000000ffffffff
[   18.006001] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   18.006042] page dumped because: kasan: bad access detected
[   18.006071] 
[   18.006088] Memory state around the buggy address:
[   18.006117]  fff00000c5e92f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.006157]  fff00000c5e92f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.006197] >fff00000c5e93000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.006233]                    ^
[   18.006258]  fff00000c5e93080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.006298]  fff00000c5e93100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.006333] ==================================================================

[   10.948906] ==================================================================
[   10.949773] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x369/0x3c0
[   10.950518] Read of size 1 at addr ffff888102955000 by task kunit_try_catch/158
[   10.951175] 
[   10.951343] CPU: 1 UID: 0 PID: 158 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   10.951405] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.951417] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.951438] Call Trace:
[   10.951472]  <TASK>
[   10.951491]  dump_stack_lvl+0x73/0xb0
[   10.951521]  print_report+0xd1/0x650
[   10.951542]  ? __virt_addr_valid+0x1db/0x2d0
[   10.951574]  ? kmalloc_node_oob_right+0x369/0x3c0
[   10.951596]  ? kasan_complete_mode_report_info+0x2a/0x200
[   10.951617]  ? kmalloc_node_oob_right+0x369/0x3c0
[   10.951650]  kasan_report+0x141/0x180
[   10.951689]  ? kmalloc_node_oob_right+0x369/0x3c0
[   10.951716]  __asan_report_load1_noabort+0x18/0x20
[   10.951749]  kmalloc_node_oob_right+0x369/0x3c0
[   10.951772]  ? __pfx_kmalloc_node_oob_right+0x10/0x10
[   10.951797]  ? __schedule+0x10cc/0x2b60
[   10.951830]  ? __pfx_read_tsc+0x10/0x10
[   10.951850]  ? ktime_get_ts64+0x86/0x230
[   10.951874]  kunit_try_run_case+0x1a5/0x480
[   10.951908]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.951928]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.951951]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.951983]  ? __kthread_parkme+0x82/0x180
[   10.952003]  ? preempt_count_sub+0x50/0x80
[   10.952027]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.952049]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.952070]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.952092]  kthread+0x337/0x6f0
[   10.952119]  ? trace_preempt_on+0x20/0xc0
[   10.952142]  ? __pfx_kthread+0x10/0x10
[   10.952162]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.952220]  ? calculate_sigpending+0x7b/0xa0
[   10.952253]  ? __pfx_kthread+0x10/0x10
[   10.952274]  ret_from_fork+0x116/0x1d0
[   10.952292]  ? __pfx_kthread+0x10/0x10
[   10.952311]  ret_from_fork_asm+0x1a/0x30
[   10.952341]  </TASK>
[   10.952361] 
[   10.964228] Allocated by task 158:
[   10.964586]  kasan_save_stack+0x45/0x70
[   10.965035]  kasan_save_track+0x18/0x40
[   10.965561]  kasan_save_alloc_info+0x3b/0x50
[   10.965874]  __kasan_kmalloc+0xb7/0xc0
[   10.966009]  __kmalloc_cache_node_noprof+0x188/0x420
[   10.966180]  kmalloc_node_oob_right+0xab/0x3c0
[   10.966343]  kunit_try_run_case+0x1a5/0x480
[   10.966507]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.966759]  kthread+0x337/0x6f0
[   10.966881]  ret_from_fork+0x116/0x1d0
[   10.967066]  ret_from_fork_asm+0x1a/0x30
[   10.967288] 
[   10.967360] The buggy address belongs to the object at ffff888102954000
[   10.967360]  which belongs to the cache kmalloc-4k of size 4096
[   10.968954] The buggy address is located 0 bytes to the right of
[   10.968954]  allocated 4096-byte region [ffff888102954000, ffff888102955000)
[   10.969348] 
[   10.969435] The buggy address belongs to the physical page:
[   10.969687] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102950
[   10.970102] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   10.970338] flags: 0x200000000000040(head|node=0|zone=2)
[   10.972168] page_type: f5(slab)
[   10.973054] raw: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   10.974389] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   10.975559] head: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   10.976174] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   10.976755] head: 0200000000000003 ffffea00040a5401 00000000ffffffff 00000000ffffffff
[   10.977589] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   10.978120] page dumped because: kasan: bad access detected
[   10.978320] 
[   10.978565] Memory state around the buggy address:
[   10.979048]  ffff888102954f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.979505]  ffff888102954f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.979817] >ffff888102955000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.980201]                    ^
[   10.980445]  ffff888102955080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.980706]  ffff888102955100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.981147] ==================================================================