Hay
Date
July 1, 2025, 11:08 a.m.

Environment
qemu-arm64
qemu-x86_64

[   18.157445] ==================================================================
[   18.157903] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   18.157976] Write of size 1 at addr fff00000c7729f00 by task kunit_try_catch/145
[   18.158030] 
[   18.158103] CPU: 1 UID: 0 PID: 145 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   18.158209] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.158237] Hardware name: linux,dummy-virt (DT)
[   18.158270] Call trace:
[   18.158387]  show_stack+0x20/0x38 (C)
[   18.158452]  dump_stack_lvl+0x8c/0xd0
[   18.158534]  print_report+0x118/0x608
[   18.158649]  kasan_report+0xdc/0x128
[   18.158697]  __asan_report_store1_noabort+0x20/0x30
[   18.158778]  kmalloc_big_oob_right+0x2a4/0x2f0
[   18.158828]  kunit_try_run_case+0x170/0x3f0
[   18.158878]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.158954]  kthread+0x328/0x630
[   18.159000]  ret_from_fork+0x10/0x20
[   18.159051] 
[   18.159269] Allocated by task 145:
[   18.159316]  kasan_save_stack+0x3c/0x68
[   18.159470]  kasan_save_track+0x20/0x40
[   18.159622]  kasan_save_alloc_info+0x40/0x58
[   18.159702]  __kasan_kmalloc+0xd4/0xd8
[   18.159751]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.159793]  kmalloc_big_oob_right+0xb8/0x2f0
[   18.159833]  kunit_try_run_case+0x170/0x3f0
[   18.159899]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.159949]  kthread+0x328/0x630
[   18.159983]  ret_from_fork+0x10/0x20
[   18.160022] 
[   18.160043] The buggy address belongs to the object at fff00000c7728000
[   18.160043]  which belongs to the cache kmalloc-8k of size 8192
[   18.160107] The buggy address is located 0 bytes to the right of
[   18.160107]  allocated 7936-byte region [fff00000c7728000, fff00000c7729f00)
[   18.160316] 
[   18.160420] The buggy address belongs to the physical page:
[   18.160513] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107728
[   18.160604] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   18.160663] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   18.160736] page_type: f5(slab)
[   18.160802] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   18.160879] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   18.160932] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   18.160983] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   18.161062] head: 0bfffe0000000003 ffffc1ffc31dca01 00000000ffffffff 00000000ffffffff
[   18.161318] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   18.161424] page dumped because: kasan: bad access detected
[   18.161559] 
[   18.161646] Memory state around the buggy address:
[   18.161714]  fff00000c7729e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.161780]  fff00000c7729e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.161826] >fff00000c7729f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.161888]                    ^
[   18.161918]  fff00000c7729f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.161963]  fff00000c772a000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.162169] ==================================================================

[   11.006861] ==================================================================
[   11.007396] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   11.007787] Write of size 1 at addr ffff8881039c9f00 by task kunit_try_catch/161
[   11.008083] 
[   11.008281] CPU: 1 UID: 0 PID: 161 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.008331] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.008343] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.008363] Call Trace:
[   11.008387]  <TASK>
[   11.008447]  dump_stack_lvl+0x73/0xb0
[   11.008480]  print_report+0xd1/0x650
[   11.008514]  ? __virt_addr_valid+0x1db/0x2d0
[   11.008539]  ? kmalloc_big_oob_right+0x316/0x370
[   11.008560]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.008581]  ? kmalloc_big_oob_right+0x316/0x370
[   11.008604]  kasan_report+0x141/0x180
[   11.008626]  ? kmalloc_big_oob_right+0x316/0x370
[   11.008651]  __asan_report_store1_noabort+0x1b/0x30
[   11.008671]  kmalloc_big_oob_right+0x316/0x370
[   11.008693]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   11.008714]  ? __schedule+0x10cc/0x2b60
[   11.008751]  ? __pfx_read_tsc+0x10/0x10
[   11.008772]  ? ktime_get_ts64+0x86/0x230
[   11.008796]  kunit_try_run_case+0x1a5/0x480
[   11.008822]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.008844]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.008867]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.008888]  ? __kthread_parkme+0x82/0x180
[   11.008908]  ? preempt_count_sub+0x50/0x80
[   11.008933]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.008955]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.008977]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.008998]  kthread+0x337/0x6f0
[   11.009016]  ? trace_preempt_on+0x20/0xc0
[   11.009040]  ? __pfx_kthread+0x10/0x10
[   11.009059]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.009078]  ? calculate_sigpending+0x7b/0xa0
[   11.009101]  ? __pfx_kthread+0x10/0x10
[   11.009121]  ret_from_fork+0x116/0x1d0
[   11.009138]  ? __pfx_kthread+0x10/0x10
[   11.009157]  ret_from_fork_asm+0x1a/0x30
[   11.009188]  </TASK>
[   11.009199] 
[   11.018310] Allocated by task 161:
[   11.018521]  kasan_save_stack+0x45/0x70
[   11.018741]  kasan_save_track+0x18/0x40
[   11.019015]  kasan_save_alloc_info+0x3b/0x50
[   11.019350]  __kasan_kmalloc+0xb7/0xc0
[   11.019507]  __kmalloc_cache_noprof+0x189/0x420
[   11.019796]  kmalloc_big_oob_right+0xa9/0x370
[   11.020167]  kunit_try_run_case+0x1a5/0x480
[   11.020322]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.020525]  kthread+0x337/0x6f0
[   11.020648]  ret_from_fork+0x116/0x1d0
[   11.020818]  ret_from_fork_asm+0x1a/0x30
[   11.021014] 
[   11.021155] The buggy address belongs to the object at ffff8881039c8000
[   11.021155]  which belongs to the cache kmalloc-8k of size 8192
[   11.021722] The buggy address is located 0 bytes to the right of
[   11.021722]  allocated 7936-byte region [ffff8881039c8000, ffff8881039c9f00)
[   11.022599] 
[   11.022710] The buggy address belongs to the physical page:
[   11.023104] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039c8
[   11.023480] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   11.023750] flags: 0x200000000000040(head|node=0|zone=2)
[   11.024058] page_type: f5(slab)
[   11.024236] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   11.024830] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   11.025127] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   11.025607] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   11.026150] head: 0200000000000003 ffffea00040e7201 00000000ffffffff 00000000ffffffff
[   11.026576] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   11.026962] page dumped because: kasan: bad access detected
[   11.027518] 
[   11.027675] Memory state around the buggy address:
[   11.027882]  ffff8881039c9e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.028419]  ffff8881039c9e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.028800] >ffff8881039c9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.029159]                    ^
[   11.029324]  ffff8881039c9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.029680]  ffff8881039ca000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.029903] ==================================================================