Hay
Date
May 23, 2025, 11:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   26.783436] ==================================================================
[   26.783660] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x2f4/0x330
[   26.783829] Read of size 1 at addr fff00000c639f000 by task kunit_try_catch/142
[   26.784299] 
[   26.784441] CPU: 0 UID: 0 PID: 142 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7 #1 PREEMPT 
[   26.785327] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.785519] Hardware name: linux,dummy-virt (DT)
[   26.785619] Call trace:
[   26.785687]  show_stack+0x20/0x38 (C)
[   26.786018]  dump_stack_lvl+0x8c/0xd0
[   26.786661]  print_report+0x118/0x608
[   26.786827]  kasan_report+0xdc/0x128
[   26.786961]  __asan_report_load1_noabort+0x20/0x30
[   26.787108]  kmalloc_node_oob_right+0x2f4/0x330
[   26.787256]  kunit_try_run_case+0x170/0x3f0
[   26.787410]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.787592]  kthread+0x328/0x630
[   26.787727]  ret_from_fork+0x10/0x20
[   26.787872] 
[   26.788558] Allocated by task 142:
[   26.788800]  kasan_save_stack+0x3c/0x68
[   26.789044]  kasan_save_track+0x20/0x40
[   26.789151]  kasan_save_alloc_info+0x40/0x58
[   26.789241]  __kasan_kmalloc+0xd4/0xd8
[   26.789903]  __kmalloc_cache_node_noprof+0x168/0x3d0
[   26.790585]  kmalloc_node_oob_right+0xbc/0x330
[   26.791019]  kunit_try_run_case+0x170/0x3f0
[   26.791832]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.792248]  kthread+0x328/0x630
[   26.792511]  ret_from_fork+0x10/0x20
[   26.792604] 
[   26.792690] The buggy address belongs to the object at fff00000c639e000
[   26.792690]  which belongs to the cache kmalloc-4k of size 4096
[   26.792854] The buggy address is located 0 bytes to the right of
[   26.792854]  allocated 4096-byte region [fff00000c639e000, fff00000c639f000)
[   26.793115] 
[   26.793201] The buggy address belongs to the physical page:
[   26.793532] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106398
[   26.794780] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   26.795899] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   26.796127] page_type: f5(slab)
[   26.796279] raw: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   26.796575] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   26.796774] head: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   26.796923] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   26.797042] head: 0bfffe0000000003 ffffc1ffc318e601 00000000ffffffff 00000000ffffffff
[   26.797150] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   26.798377] page dumped because: kasan: bad access detected
[   26.798583] 
[   26.798640] Memory state around the buggy address:
[   26.798760]  fff00000c639ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   26.798885]  fff00000c639ef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   26.799224] >fff00000c639f000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.799342]                    ^
[   26.799464]  fff00000c639f080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.799615]  fff00000c639f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.799887] ==================================================================

[   12.039839] ==================================================================
[   12.041165] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x369/0x3c0
[   12.041855] Read of size 1 at addr ffff8881029b7000 by task kunit_try_catch/159
[   12.042776] 
[   12.043018] CPU: 0 UID: 0 PID: 159 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7 #1 PREEMPT(voluntary) 
[   12.043068] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.043081] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.043103] Call Trace:
[   12.043115]  <TASK>
[   12.043132]  dump_stack_lvl+0x73/0xb0
[   12.043160]  print_report+0xd1/0x650
[   12.043182]  ? __virt_addr_valid+0x1db/0x2d0
[   12.043204]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.043224]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.043246]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.043266]  kasan_report+0x141/0x180
[   12.043302]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.043327]  __asan_report_load1_noabort+0x18/0x20
[   12.043347]  kmalloc_node_oob_right+0x369/0x3c0
[   12.043368]  ? __pfx_kmalloc_node_oob_right+0x10/0x10
[   12.043388]  ? __schedule+0x10cc/0x2b30
[   12.043410]  ? __pfx_read_tsc+0x10/0x10
[   12.043429]  ? ktime_get_ts64+0x86/0x230
[   12.043455]  kunit_try_run_case+0x1a5/0x480
[   12.043479]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.043500]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.043522]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.043544]  ? __kthread_parkme+0x82/0x180
[   12.043565]  ? preempt_count_sub+0x50/0x80
[   12.043590]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.043613]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.043634]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.043656]  kthread+0x337/0x6f0
[   12.043672]  ? trace_preempt_on+0x20/0xc0
[   12.043695]  ? __pfx_kthread+0x10/0x10
[   12.043713]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.043733]  ? calculate_sigpending+0x7b/0xa0
[   12.043754]  ? __pfx_kthread+0x10/0x10
[   12.043772]  ret_from_fork+0x41/0x80
[   12.043792]  ? __pfx_kthread+0x10/0x10
[   12.043809]  ret_from_fork_asm+0x1a/0x30
[   12.043840]  </TASK>
[   12.043851] 
[   12.057242] Allocated by task 159:
[   12.057659]  kasan_save_stack+0x45/0x70
[   12.057814]  kasan_save_track+0x18/0x40
[   12.058101]  kasan_save_alloc_info+0x3b/0x50
[   12.058511]  __kasan_kmalloc+0xb7/0xc0
[   12.058913]  __kmalloc_cache_node_noprof+0x188/0x420
[   12.059495]  kmalloc_node_oob_right+0xab/0x3c0
[   12.059843]  kunit_try_run_case+0x1a5/0x480
[   12.060381]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.060687]  kthread+0x337/0x6f0
[   12.060812]  ret_from_fork+0x41/0x80
[   12.061003]  ret_from_fork_asm+0x1a/0x30
[   12.061377] 
[   12.061539] The buggy address belongs to the object at ffff8881029b6000
[   12.061539]  which belongs to the cache kmalloc-4k of size 4096
[   12.062576] The buggy address is located 0 bytes to the right of
[   12.062576]  allocated 4096-byte region [ffff8881029b6000, ffff8881029b7000)
[   12.063147] 
[   12.063327] The buggy address belongs to the physical page:
[   12.063910] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029b0
[   12.065091] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.065841] flags: 0x200000000000040(head|node=0|zone=2)
[   12.066507] page_type: f5(slab)
[   12.066786] raw: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   12.067343] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   12.067698] head: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   12.068110] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   12.068974] head: 0200000000000003 ffffea00040a6c01 00000000ffffffff 00000000ffffffff
[   12.069692] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   12.070463] page dumped because: kasan: bad access detected
[   12.070861] 
[   12.070935] Memory state around the buggy address:
[   12.071512]  ffff8881029b6f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.072306]  ffff8881029b6f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.072732] >ffff8881029b7000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.073043]                    ^
[   12.073365]  ffff8881029b7080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.074048]  ffff8881029b7100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.074726] ==================================================================