Hay
Date
July 2, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.863784] ==================================================================
[   17.863849] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   17.863900] Write of size 1 at addr fff00000c6585f00 by task kunit_try_catch/144
[   17.864706] 
[   17.864784] CPU: 1 UID: 0 PID: 144 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   17.864885] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.865070] Hardware name: linux,dummy-virt (DT)
[   17.865398] Call trace:
[   17.865428]  show_stack+0x20/0x38 (C)
[   17.865480]  dump_stack_lvl+0x8c/0xd0
[   17.865526]  print_report+0x118/0x608
[   17.866281]  kasan_report+0xdc/0x128
[   17.866447]  __asan_report_store1_noabort+0x20/0x30
[   17.866529]  kmalloc_big_oob_right+0x2a4/0x2f0
[   17.866586]  kunit_try_run_case+0x170/0x3f0
[   17.866704]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.867214]  kthread+0x328/0x630
[   17.867328]  ret_from_fork+0x10/0x20
[   17.867545] 
[   17.867598] Allocated by task 144:
[   17.867627]  kasan_save_stack+0x3c/0x68
[   17.867996]  kasan_save_track+0x20/0x40
[   17.868043]  kasan_save_alloc_info+0x40/0x58
[   17.868083]  __kasan_kmalloc+0xd4/0xd8
[   17.868256]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.868632]  kmalloc_big_oob_right+0xb8/0x2f0
[   17.868822]  kunit_try_run_case+0x170/0x3f0
[   17.868882]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.868926]  kthread+0x328/0x630
[   17.868958]  ret_from_fork+0x10/0x20
[   17.869150] 
[   17.869184] The buggy address belongs to the object at fff00000c6584000
[   17.869184]  which belongs to the cache kmalloc-8k of size 8192
[   17.869477] The buggy address is located 0 bytes to the right of
[   17.869477]  allocated 7936-byte region [fff00000c6584000, fff00000c6585f00)
[   17.869540] 
[   17.869561] The buggy address belongs to the physical page:
[   17.870032] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106580
[   17.870094] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   17.870139] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   17.870192] page_type: f5(slab)
[   17.870726] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   17.870909] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   17.872414] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   17.872471] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   17.872518] head: 0bfffe0000000003 ffffc1ffc3196001 00000000ffffffff 00000000ffffffff
[   17.872565] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   17.872986] page dumped because: kasan: bad access detected
[   17.873021] 
[   17.873248] Memory state around the buggy address:
[   17.873335]  fff00000c6585e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.873394]  fff00000c6585e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.873544] >fff00000c6585f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.873719]                    ^
[   17.873907]  fff00000c6585f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.874082]  fff00000c6586000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.874314] ==================================================================

[   10.871007] ==================================================================
[   10.871439] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   10.871713] Write of size 1 at addr ffff888101f95f00 by task kunit_try_catch/163
[   10.872161] 
[   10.872268] CPU: 0 UID: 0 PID: 163 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   10.872312] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.872323] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.872343] Call Trace:
[   10.872356]  <TASK>
[   10.872374]  dump_stack_lvl+0x73/0xb0
[   10.872417]  print_report+0xd1/0x650
[   10.872442]  ? __virt_addr_valid+0x1db/0x2d0
[   10.872477]  ? kmalloc_big_oob_right+0x316/0x370
[   10.872498]  ? kasan_complete_mode_report_info+0x2a/0x200
[   10.872518]  ? kmalloc_big_oob_right+0x316/0x370
[   10.872550]  kasan_report+0x141/0x180
[   10.872647]  ? kmalloc_big_oob_right+0x316/0x370
[   10.872677]  __asan_report_store1_noabort+0x1b/0x30
[   10.872696]  kmalloc_big_oob_right+0x316/0x370
[   10.872717]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   10.872738]  ? __schedule+0x10cc/0x2b60
[   10.872759]  ? __pfx_read_tsc+0x10/0x10
[   10.872780]  ? ktime_get_ts64+0x86/0x230
[   10.872805]  kunit_try_run_case+0x1a5/0x480
[   10.872829]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.872849]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.872872]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.872892]  ? __kthread_parkme+0x82/0x180
[   10.872912]  ? preempt_count_sub+0x50/0x80
[   10.872936]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.872957]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.872978]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.873012]  kthread+0x337/0x6f0
[   10.873030]  ? trace_preempt_on+0x20/0xc0
[   10.873053]  ? __pfx_kthread+0x10/0x10
[   10.873084]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.873103]  ? calculate_sigpending+0x7b/0xa0
[   10.873127]  ? __pfx_kthread+0x10/0x10
[   10.873146]  ret_from_fork+0x116/0x1d0
[   10.873164]  ? __pfx_kthread+0x10/0x10
[   10.873182]  ret_from_fork_asm+0x1a/0x30
[   10.873212]  </TASK>
[   10.873223] 
[   10.883753] Allocated by task 163:
[   10.884160]  kasan_save_stack+0x45/0x70
[   10.884582]  kasan_save_track+0x18/0x40
[   10.885001]  kasan_save_alloc_info+0x3b/0x50
[   10.885388]  __kasan_kmalloc+0xb7/0xc0
[   10.885723]  __kmalloc_cache_noprof+0x189/0x420
[   10.886258]  kmalloc_big_oob_right+0xa9/0x370
[   10.886718]  kunit_try_run_case+0x1a5/0x480
[   10.887200]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.887752]  kthread+0x337/0x6f0
[   10.888149]  ret_from_fork+0x116/0x1d0
[   10.888555]  ret_from_fork_asm+0x1a/0x30
[   10.888951] 
[   10.889118] The buggy address belongs to the object at ffff888101f94000
[   10.889118]  which belongs to the cache kmalloc-8k of size 8192
[   10.890193] The buggy address is located 0 bytes to the right of
[   10.890193]  allocated 7936-byte region [ffff888101f94000, ffff888101f95f00)
[   10.891479] 
[   10.891638] The buggy address belongs to the physical page:
[   10.892206] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101f90
[   10.892988] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   10.893569] flags: 0x200000000000040(head|node=0|zone=2)
[   10.893809] page_type: f5(slab)
[   10.894123] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   10.894563] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   10.894805] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   10.895141] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   10.895365] head: 0200000000000003 ffffea000407e401 00000000ffffffff 00000000ffffffff
[   10.895614] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   10.895858] page dumped because: kasan: bad access detected
[   10.896029] 
[   10.896097] Memory state around the buggy address:
[   10.896248]  ffff888101f95e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.896467]  ffff888101f95e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.896767] >ffff888101f95f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.897029]                    ^
[   10.897224]  ffff888101f95f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.897472]  ffff888101f96000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.898057] ==================================================================