Hay
Date
June 19, 2025, 12:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   29.879454] ==================================================================
[   29.879778] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   29.879939] Write of size 1 at addr fff00000c646df00 by task kunit_try_catch/155
[   29.880048] 
[   29.880127] CPU: 1 UID: 0 PID: 155 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250619 #1 PREEMPT 
[   29.880684] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.880760] Hardware name: linux,dummy-virt (DT)
[   29.880863] Call trace:
[   29.880950]  show_stack+0x20/0x38 (C)
[   29.881120]  dump_stack_lvl+0x8c/0xd0
[   29.881268]  print_report+0x118/0x608
[   29.881376]  kasan_report+0xdc/0x128
[   29.881478]  __asan_report_store1_noabort+0x20/0x30
[   29.881599]  kmalloc_big_oob_right+0x2a4/0x2f0
[   29.881722]  kunit_try_run_case+0x170/0x3f0
[   29.881893]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.882077]  kthread+0x328/0x630
[   29.882201]  ret_from_fork+0x10/0x20
[   29.882300] 
[   29.882338] Allocated by task 155:
[   29.882423]  kasan_save_stack+0x3c/0x68
[   29.882521]  kasan_save_track+0x20/0x40
[   29.883233]  kasan_save_alloc_info+0x40/0x58
[   29.883338]  __kasan_kmalloc+0xd4/0xd8
[   29.883436]  __kmalloc_cache_noprof+0x16c/0x3c0
[   29.883558]  kmalloc_big_oob_right+0xb8/0x2f0
[   29.883679]  kunit_try_run_case+0x170/0x3f0
[   29.884361]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.884498]  kthread+0x328/0x630
[   29.884626]  ret_from_fork+0x10/0x20
[   29.884708] 
[   29.884758] The buggy address belongs to the object at fff00000c646c000
[   29.884758]  which belongs to the cache kmalloc-8k of size 8192
[   29.884973] The buggy address is located 0 bytes to the right of
[   29.884973]  allocated 7936-byte region [fff00000c646c000, fff00000c646df00)
[   29.885189] 
[   29.885259] The buggy address belongs to the physical page:
[   29.885373] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106468
[   29.885490] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   29.885587] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   29.885858] page_type: f5(slab)
[   29.885967] raw: 0bfffe0000000040 fff00000c0002280 dead000000000100 dead000000000122
[   29.886074] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   29.886175] head: 0bfffe0000000040 fff00000c0002280 dead000000000100 dead000000000122
[   29.886271] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   29.886373] head: 0bfffe0000000003 ffffc1ffc3191a01 00000000ffffffff 00000000ffffffff
[   29.886470] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   29.887025] page dumped because: kasan: bad access detected
[   29.887165] 
[   29.887208] Memory state around the buggy address:
[   29.887294]  fff00000c646de00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   29.887397]  fff00000c646de80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   29.887496] >fff00000c646df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.887582]                    ^
[   29.887650]  fff00000c646df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.887754]  fff00000c646e000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.887856] ==================================================================

[   26.046697] ==================================================================
[   26.047218] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   26.048208] Write of size 1 at addr ffff8881038e1f00 by task kunit_try_catch/173
[   26.049145] 
[   26.049520] CPU: 0 UID: 0 PID: 173 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250619 #1 PREEMPT(voluntary) 
[   26.049660] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.049682] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.049710] Call Trace:
[   26.049730]  <TASK>
[   26.049759]  dump_stack_lvl+0x73/0xb0
[   26.049811]  print_report+0xd1/0x650
[   26.049838]  ? __virt_addr_valid+0x1db/0x2d0
[   26.049865]  ? kmalloc_big_oob_right+0x316/0x370
[   26.049986]  ? kasan_complete_mode_report_info+0x2a/0x200
[   26.050017]  ? kmalloc_big_oob_right+0x316/0x370
[   26.050041]  kasan_report+0x141/0x180
[   26.050065]  ? kmalloc_big_oob_right+0x316/0x370
[   26.050093]  __asan_report_store1_noabort+0x1b/0x30
[   26.050144]  kmalloc_big_oob_right+0x316/0x370
[   26.050178]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   26.050345]  ? __schedule+0x10cc/0x2b60
[   26.050375]  ? __pfx_read_tsc+0x10/0x10
[   26.050400]  ? ktime_get_ts64+0x86/0x230
[   26.050429]  kunit_try_run_case+0x1a5/0x480
[   26.050458]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.050482]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   26.050508]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   26.050533]  ? __kthread_parkme+0x82/0x180
[   26.050557]  ? preempt_count_sub+0x50/0x80
[   26.050583]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.050608]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.050634]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   26.050658]  kthread+0x337/0x6f0
[   26.050680]  ? trace_preempt_on+0x20/0xc0
[   26.050706]  ? __pfx_kthread+0x10/0x10
[   26.050728]  ? _raw_spin_unlock_irq+0x47/0x80
[   26.050751]  ? calculate_sigpending+0x7b/0xa0
[   26.050777]  ? __pfx_kthread+0x10/0x10
[   26.050800]  ret_from_fork+0x116/0x1d0
[   26.050821]  ? __pfx_kthread+0x10/0x10
[   26.050843]  ret_from_fork_asm+0x1a/0x30
[   26.050883]  </TASK>
[   26.050898] 
[   26.064522] Allocated by task 173:
[   26.064913]  kasan_save_stack+0x45/0x70
[   26.065176]  kasan_save_track+0x18/0x40
[   26.065447]  kasan_save_alloc_info+0x3b/0x50
[   26.065741]  __kasan_kmalloc+0xb7/0xc0
[   26.066370]  __kmalloc_cache_noprof+0x189/0x420
[   26.066714]  kmalloc_big_oob_right+0xa9/0x370
[   26.067411]  kunit_try_run_case+0x1a5/0x480
[   26.067790]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.068369]  kthread+0x337/0x6f0
[   26.068816]  ret_from_fork+0x116/0x1d0
[   26.069254]  ret_from_fork_asm+0x1a/0x30
[   26.069478] 
[   26.069675] The buggy address belongs to the object at ffff8881038e0000
[   26.069675]  which belongs to the cache kmalloc-8k of size 8192
[   26.070250] The buggy address is located 0 bytes to the right of
[   26.070250]  allocated 7936-byte region [ffff8881038e0000, ffff8881038e1f00)
[   26.071379] 
[   26.071583] The buggy address belongs to the physical page:
[   26.072138] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1038e0
[   26.072666] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   26.073384] flags: 0x200000000000040(head|node=0|zone=2)
[   26.073753] page_type: f5(slab)
[   26.074125] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   26.074688] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   26.075514] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   26.076164] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   26.077053] head: 0200000000000003 ffffea00040e3801 00000000ffffffff 00000000ffffffff
[   26.077339] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   26.078276] page dumped because: kasan: bad access detected
[   26.078481] 
[   26.078795] Memory state around the buggy address:
[   26.079035]  ffff8881038e1e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   26.080014]  ffff8881038e1e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   26.080486] >ffff8881038e1f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.081593]                    ^
[   26.081827]  ffff8881038e1f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.082071]  ffff8881038e2000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.082682] ==================================================================