Hay
Date
July 23, 2025, 2:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   15.108731] ==================================================================
[   15.108796] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   15.108847] Write of size 1 at addr fff00000c651df00 by task kunit_try_catch/144
[   15.109070] 
[   15.109260] CPU: 1 UID: 0 PID: 144 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7 #1 PREEMPT 
[   15.109359] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.109416] Hardware name: linux,dummy-virt (DT)
[   15.109465] Call trace:
[   15.109487]  show_stack+0x20/0x38 (C)
[   15.109536]  dump_stack_lvl+0x8c/0xd0
[   15.109581]  print_report+0x118/0x5d0
[   15.109636]  kasan_report+0xdc/0x128
[   15.109682]  __asan_report_store1_noabort+0x20/0x30
[   15.109828]  kmalloc_big_oob_right+0x2a4/0x2f0
[   15.109889]  kunit_try_run_case+0x170/0x3f0
[   15.110108]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.110175]  kthread+0x328/0x630
[   15.110274]  ret_from_fork+0x10/0x20
[   15.110322] 
[   15.110341] Allocated by task 144:
[   15.110369]  kasan_save_stack+0x3c/0x68
[   15.110521]  kasan_save_track+0x20/0x40
[   15.110831]  kasan_save_alloc_info+0x40/0x58
[   15.110941]  __kasan_kmalloc+0xd4/0xd8
[   15.111039]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.111126]  kmalloc_big_oob_right+0xb8/0x2f0
[   15.111168]  kunit_try_run_case+0x170/0x3f0
[   15.111206]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.111271]  kthread+0x328/0x630
[   15.111303]  ret_from_fork+0x10/0x20
[   15.111339] 
[   15.111359] The buggy address belongs to the object at fff00000c651c000
[   15.111359]  which belongs to the cache kmalloc-8k of size 8192
[   15.111422] The buggy address is located 0 bytes to the right of
[   15.111422]  allocated 7936-byte region [fff00000c651c000, fff00000c651df00)
[   15.111488] 
[   15.111508] The buggy address belongs to the physical page:
[   15.111540] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106518
[   15.111814] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   15.111920] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   15.112003] page_type: f5(slab)
[   15.112070] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   15.112172] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   15.112233] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   15.112567] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   15.112706] head: 0bfffe0000000003 ffffc1ffc3194601 00000000ffffffff 00000000ffffffff
[   15.112843] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   15.113019] page dumped because: kasan: bad access detected
[   15.113117] 
[   15.113176] Memory state around the buggy address:
[   15.113209]  fff00000c651de00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   15.113277]  fff00000c651de80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   15.113629] >fff00000c651df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.113731]                    ^
[   15.113823]  fff00000c651df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.113896]  fff00000c651e000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.114098] ==================================================================

[   12.155596] ==================================================================
[   12.156304] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   12.156759] Write of size 1 at addr ffff888102b8df00 by task kunit_try_catch/161
[   12.157209] 
[   12.157602] CPU: 1 UID: 0 PID: 161 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7 #1 PREEMPT(voluntary) 
[   12.157651] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.157663] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.157684] Call Trace:
[   12.157697]  <TASK>
[   12.157714]  dump_stack_lvl+0x73/0xb0
[   12.157746]  print_report+0xd1/0x610
[   12.157768]  ? __virt_addr_valid+0x1db/0x2d0
[   12.157792]  ? kmalloc_big_oob_right+0x316/0x370
[   12.157824]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.157846]  ? kmalloc_big_oob_right+0x316/0x370
[   12.157868]  kasan_report+0x141/0x180
[   12.157889]  ? kmalloc_big_oob_right+0x316/0x370
[   12.157915]  __asan_report_store1_noabort+0x1b/0x30
[   12.157938]  kmalloc_big_oob_right+0x316/0x370
[   12.157960]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   12.157982]  ? __schedule+0x10c6/0x2b60
[   12.158005]  ? __pfx_read_tsc+0x10/0x10
[   12.158026]  ? ktime_get_ts64+0x86/0x230
[   12.158051]  kunit_try_run_case+0x1a5/0x480
[   12.158075]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.158210]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.158236]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.158259]  ? __kthread_parkme+0x82/0x180
[   12.158279]  ? preempt_count_sub+0x50/0x80
[   12.158303]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.158326]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.158349]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.158373]  kthread+0x337/0x6f0
[   12.158392]  ? trace_preempt_on+0x20/0xc0
[   12.158415]  ? __pfx_kthread+0x10/0x10
[   12.158435]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.158456]  ? calculate_sigpending+0x7b/0xa0
[   12.158480]  ? __pfx_kthread+0x10/0x10
[   12.158501]  ret_from_fork+0x116/0x1d0
[   12.158519]  ? __pfx_kthread+0x10/0x10
[   12.158539]  ret_from_fork_asm+0x1a/0x30
[   12.158568]  </TASK>
[   12.158578] 
[   12.168729] Allocated by task 161:
[   12.168913]  kasan_save_stack+0x45/0x70
[   12.169091]  kasan_save_track+0x18/0x40
[   12.169609]  kasan_save_alloc_info+0x3b/0x50
[   12.169897]  __kasan_kmalloc+0xb7/0xc0
[   12.170183]  __kmalloc_cache_noprof+0x189/0x420
[   12.170496]  kmalloc_big_oob_right+0xa9/0x370
[   12.170822]  kunit_try_run_case+0x1a5/0x480
[   12.171105]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.171442]  kthread+0x337/0x6f0
[   12.171590]  ret_from_fork+0x116/0x1d0
[   12.171926]  ret_from_fork_asm+0x1a/0x30
[   12.172278] 
[   12.172483] The buggy address belongs to the object at ffff888102b8c000
[   12.172483]  which belongs to the cache kmalloc-8k of size 8192
[   12.173040] The buggy address is located 0 bytes to the right of
[   12.173040]  allocated 7936-byte region [ffff888102b8c000, ffff888102b8df00)
[   12.173617] 
[   12.173718] The buggy address belongs to the physical page:
[   12.174015] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b88
[   12.174415] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.174789] flags: 0x200000000000040(head|node=0|zone=2)
[   12.175052] page_type: f5(slab)
[   12.175255] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   12.175603] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   12.175984] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   12.176367] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   12.176718] head: 0200000000000003 ffffea00040ae201 00000000ffffffff 00000000ffffffff
[   12.177066] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   12.177436] page dumped because: kasan: bad access detected
[   12.177718] 
[   12.177821] Memory state around the buggy address:
[   12.178061]  ffff888102b8de00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.178345]  ffff888102b8de80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.178654] >ffff888102b8df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.178978]                    ^
[   12.179162]  ffff888102b8df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.179414]  ffff888102b8e000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.179686] ==================================================================