Hay
Date
June 16, 2025, 7:07 a.m.

Environment
qemu-arm64
qemu-x86_64

[   18.775910] ==================================================================
[   18.776051] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   18.776184] Write of size 1 at addr fff00000c65adf00 by task kunit_try_catch/153
[   18.776345] 
[   18.776455] CPU: 0 UID: 0 PID: 153 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250616 #1 PREEMPT 
[   18.776819] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.776950] Hardware name: linux,dummy-virt (DT)
[   18.777031] Call trace:
[   18.777103]  show_stack+0x20/0x38 (C)
[   18.777253]  dump_stack_lvl+0x8c/0xd0
[   18.777397]  print_report+0x118/0x608
[   18.777539]  kasan_report+0xdc/0x128
[   18.777669]  __asan_report_store1_noabort+0x20/0x30
[   18.777772]  kmalloc_big_oob_right+0x2a4/0x2f0
[   18.777906]  kunit_try_run_case+0x170/0x3f0
[   18.778053]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.778177]  kthread+0x328/0x630
[   18.778276]  ret_from_fork+0x10/0x20
[   18.778389] 
[   18.778439] Allocated by task 153:
[   18.778520]  kasan_save_stack+0x3c/0x68
[   18.778636]  kasan_save_track+0x20/0x40
[   18.778767]  kasan_save_alloc_info+0x40/0x58
[   18.778884]  __kasan_kmalloc+0xd4/0xd8
[   18.779075]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.779248]  kmalloc_big_oob_right+0xb8/0x2f0
[   18.779364]  kunit_try_run_case+0x170/0x3f0
[   18.779457]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.779570]  kthread+0x328/0x630
[   18.779654]  ret_from_fork+0x10/0x20
[   18.779747] 
[   18.779792] The buggy address belongs to the object at fff00000c65ac000
[   18.779792]  which belongs to the cache kmalloc-8k of size 8192
[   18.779921] The buggy address is located 0 bytes to the right of
[   18.779921]  allocated 7936-byte region [fff00000c65ac000, fff00000c65adf00)
[   18.780074] 
[   18.780120] The buggy address belongs to the physical page:
[   18.780195] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1065a8
[   18.780301] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   18.780398] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   18.780516] page_type: f5(slab)
[   18.780639] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   18.780817] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   18.780975] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   18.781117] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   18.781229] head: 0bfffe0000000003 ffffc1ffc3196a01 00000000ffffffff 00000000ffffffff
[   18.781338] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   18.781430] page dumped because: kasan: bad access detected
[   18.781496] 
[   18.781532] Memory state around the buggy address:
[   18.781594]  fff00000c65ade00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.781680]  fff00000c65ade80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.781773] >fff00000c65adf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.781885]                    ^
[   18.781956]  fff00000c65adf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.782073]  fff00000c65ae000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.782198] ==================================================================

[   10.847756] ==================================================================
[   10.848184] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   10.848430] Write of size 1 at addr ffff888103901f00 by task kunit_try_catch/169
[   10.848645] 
[   10.848733] CPU: 0 UID: 0 PID: 169 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250616 #1 PREEMPT(voluntary) 
[   10.848780] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.848791] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.848812] Call Trace:
[   10.848824]  <TASK>
[   10.848844]  dump_stack_lvl+0x73/0xb0
[   10.848873]  print_report+0xd1/0x650
[   10.848894]  ? __virt_addr_valid+0x1db/0x2d0
[   10.848917]  ? kmalloc_big_oob_right+0x316/0x370
[   10.848978]  ? kasan_complete_mode_report_info+0x2a/0x200
[   10.849000]  ? kmalloc_big_oob_right+0x316/0x370
[   10.849021]  kasan_report+0x141/0x180
[   10.849042]  ? kmalloc_big_oob_right+0x316/0x370
[   10.849067]  __asan_report_store1_noabort+0x1b/0x30
[   10.849090]  kmalloc_big_oob_right+0x316/0x370
[   10.849111]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   10.849133]  ? __schedule+0x10cc/0x2b60
[   10.849155]  ? __pfx_read_tsc+0x10/0x10
[   10.849178]  ? ktime_get_ts64+0x86/0x230
[   10.849203]  kunit_try_run_case+0x1a5/0x480
[   10.849227]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.849248]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.849269]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.849291]  ? __kthread_parkme+0x82/0x180
[   10.849339]  ? preempt_count_sub+0x50/0x80
[   10.849363]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.849405]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.849427]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.849448]  kthread+0x337/0x6f0
[   10.849467]  ? trace_preempt_on+0x20/0xc0
[   10.849491]  ? __pfx_kthread+0x10/0x10
[   10.849510]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.849529]  ? calculate_sigpending+0x7b/0xa0
[   10.849553]  ? __pfx_kthread+0x10/0x10
[   10.849573]  ret_from_fork+0x116/0x1d0
[   10.849591]  ? __pfx_kthread+0x10/0x10
[   10.849611]  ret_from_fork_asm+0x1a/0x30
[   10.849643]  </TASK>
[   10.849654] 
[   10.862634] Allocated by task 169:
[   10.862945]  kasan_save_stack+0x45/0x70
[   10.863279]  kasan_save_track+0x18/0x40
[   10.863657]  kasan_save_alloc_info+0x3b/0x50
[   10.864025]  __kasan_kmalloc+0xb7/0xc0
[   10.864356]  __kmalloc_cache_noprof+0x189/0x420
[   10.864804]  kmalloc_big_oob_right+0xa9/0x370
[   10.865202]  kunit_try_run_case+0x1a5/0x480
[   10.865706]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.866054]  kthread+0x337/0x6f0
[   10.866174]  ret_from_fork+0x116/0x1d0
[   10.866301]  ret_from_fork_asm+0x1a/0x30
[   10.866576] 
[   10.866728] The buggy address belongs to the object at ffff888103900000
[   10.866728]  which belongs to the cache kmalloc-8k of size 8192
[   10.867831] The buggy address is located 0 bytes to the right of
[   10.867831]  allocated 7936-byte region [ffff888103900000, ffff888103901f00)
[   10.868782] 
[   10.868856] The buggy address belongs to the physical page:
[   10.869038] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103900
[   10.869277] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   10.869974] flags: 0x200000000000040(head|node=0|zone=2)
[   10.870445] page_type: f5(slab)
[   10.870719] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   10.871428] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   10.872150] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   10.872876] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   10.873549] head: 0200000000000003 ffffea00040e4001 00000000ffffffff 00000000ffffffff
[   10.873903] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   10.874130] page dumped because: kasan: bad access detected
[   10.874291] 
[   10.874352] Memory state around the buggy address:
[   10.875063]  ffff888103901e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.875795]  ffff888103901e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.876396] >ffff888103901f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.877210]                    ^
[   10.877544]  ffff888103901f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.878387]  ffff888103902000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.879114] ==================================================================