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

Environment
qemu-arm64
qemu-x86_64

[   17.862929] ==================================================================
[   17.862993] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   17.863041] Write of size 1 at addr fff00000c7821f00 by task kunit_try_catch/144
[   17.863087] 
[   17.863136] CPU: 0 UID: 0 PID: 144 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   17.863227] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.863251] Hardware name: linux,dummy-virt (DT)
[   17.863281] Call trace:
[   17.863674]  show_stack+0x20/0x38 (C)
[   17.863762]  dump_stack_lvl+0x8c/0xd0
[   17.863806]  print_report+0x118/0x608
[   17.863849]  kasan_report+0xdc/0x128
[   17.864148]  __asan_report_store1_noabort+0x20/0x30
[   17.864211]  kmalloc_big_oob_right+0x2a4/0x2f0
[   17.864475]  kunit_try_run_case+0x170/0x3f0
[   17.864542]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.864698]  kthread+0x328/0x630
[   17.864749]  ret_from_fork+0x10/0x20
[   17.864878] 
[   17.864951] Allocated by task 144:
[   17.865030]  kasan_save_stack+0x3c/0x68
[   17.865166]  kasan_save_track+0x20/0x40
[   17.865243]  kasan_save_alloc_info+0x40/0x58
[   17.865334]  __kasan_kmalloc+0xd4/0xd8
[   17.865420]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.865469]  kmalloc_big_oob_right+0xb8/0x2f0
[   17.865547]  kunit_try_run_case+0x170/0x3f0
[   17.865583]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.865627]  kthread+0x328/0x630
[   17.865659]  ret_from_fork+0x10/0x20
[   17.865948] 
[   17.866013] The buggy address belongs to the object at fff00000c7820000
[   17.866013]  which belongs to the cache kmalloc-8k of size 8192
[   17.866137] The buggy address is located 0 bytes to the right of
[   17.866137]  allocated 7936-byte region [fff00000c7820000, fff00000c7821f00)
[   17.866278] 
[   17.866316] The buggy address belongs to the physical page:
[   17.866349] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107820
[   17.866511] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   17.866635] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   17.866764] page_type: f5(slab)
[   17.866871] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   17.866982] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   17.867115] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   17.867281] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   17.867462] head: 0bfffe0000000003 ffffc1ffc31e0801 00000000ffffffff 00000000ffffffff
[   17.867576] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   17.867615] page dumped because: kasan: bad access detected
[   17.867645] 
[   17.867663] Memory state around the buggy address:
[   17.867722]  fff00000c7821e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.867939]  fff00000c7821e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.868168] >fff00000c7821f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.868330]                    ^
[   17.868364]  fff00000c7821f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.868404]  fff00000c7822000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.868460] ==================================================================

[   12.887336] ==================================================================
[   12.887913] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   12.888366] Write of size 1 at addr ffff888103999f00 by task kunit_try_catch/162
[   12.889050] 
[   12.889370] CPU: 0 UID: 0 PID: 162 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   12.889426] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.889440] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.889464] Call Trace:
[   12.889481]  <TASK>
[   12.889502]  dump_stack_lvl+0x73/0xb0
[   12.889540]  print_report+0xd1/0x650
[   12.889566]  ? __virt_addr_valid+0x1db/0x2d0
[   12.889593]  ? kmalloc_big_oob_right+0x316/0x370
[   12.889617]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.889642]  ? kmalloc_big_oob_right+0x316/0x370
[   12.889666]  kasan_report+0x141/0x180
[   12.889691]  ? kmalloc_big_oob_right+0x316/0x370
[   12.889721]  __asan_report_store1_noabort+0x1b/0x30
[   12.889744]  kmalloc_big_oob_right+0x316/0x370
[   12.889768]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   12.889806]  ? __schedule+0x10cc/0x2b60
[   12.889831]  ? __pfx_read_tsc+0x10/0x10
[   12.889855]  ? ktime_get_ts64+0x86/0x230
[   12.889882]  kunit_try_run_case+0x1a5/0x480
[   12.889909]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.889933]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.889959]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.889984]  ? __kthread_parkme+0x82/0x180
[   12.890008]  ? preempt_count_sub+0x50/0x80
[   12.890034]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.890060]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.890085]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.890109]  kthread+0x337/0x6f0
[   12.890130]  ? trace_preempt_on+0x20/0xc0
[   12.890156]  ? __pfx_kthread+0x10/0x10
[   12.890179]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.890202]  ? calculate_sigpending+0x7b/0xa0
[   12.890231]  ? __pfx_kthread+0x10/0x10
[   12.890254]  ret_from_fork+0x116/0x1d0
[   12.890275]  ? __pfx_kthread+0x10/0x10
[   12.890297]  ret_from_fork_asm+0x1a/0x30
[   12.890332]  </TASK>
[   12.890345] 
[   12.901060] Allocated by task 162:
[   12.901395]  kasan_save_stack+0x45/0x70
[   12.901849]  kasan_save_track+0x18/0x40
[   12.902176]  kasan_save_alloc_info+0x3b/0x50
[   12.902603]  __kasan_kmalloc+0xb7/0xc0
[   12.902815]  __kmalloc_cache_noprof+0x189/0x420
[   12.903067]  kmalloc_big_oob_right+0xa9/0x370
[   12.903251]  kunit_try_run_case+0x1a5/0x480
[   12.903908]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.904331]  kthread+0x337/0x6f0
[   12.904509]  ret_from_fork+0x116/0x1d0
[   12.904717]  ret_from_fork_asm+0x1a/0x30
[   12.904986] 
[   12.905140] The buggy address belongs to the object at ffff888103998000
[   12.905140]  which belongs to the cache kmalloc-8k of size 8192
[   12.905934] The buggy address is located 0 bytes to the right of
[   12.905934]  allocated 7936-byte region [ffff888103998000, ffff888103999f00)
[   12.907113] 
[   12.907262] The buggy address belongs to the physical page:
[   12.907471] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103998
[   12.907755] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.908347] flags: 0x200000000000040(head|node=0|zone=2)
[   12.908560] page_type: f5(slab)
[   12.908704] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   12.910149] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   12.911482] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   12.912752] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   12.913971] head: 0200000000000003 ffffea00040e6601 00000000ffffffff 00000000ffffffff
[   12.914938] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   12.915222] page dumped because: kasan: bad access detected
[   12.915418] 
[   12.915500] Memory state around the buggy address:
[   12.915679]  ffff888103999e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.916858]  ffff888103999e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.917922] >ffff888103999f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.919517]                    ^
[   12.920068]  ffff888103999f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.921115]  ffff88810399a000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.922111] ==================================================================