Hay
Date
July 8, 2025, 11:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   30.901870] ==================================================================
[   30.901929] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   30.901976] Write of size 1 at addr fff00000c6455f00 by task kunit_try_catch/175
[   30.902023] 
[   30.902065] CPU: 0 UID: 0 PID: 175 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250708 #1 PREEMPT 
[   30.902149] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.902174] Hardware name: linux,dummy-virt (DT)
[   30.902203] Call trace:
[   30.902248]  show_stack+0x20/0x38 (C)
[   30.902295]  dump_stack_lvl+0x8c/0xd0
[   30.902341]  print_report+0x118/0x5d0
[   30.902386]  kasan_report+0xdc/0x128
[   30.902439]  __asan_report_store1_noabort+0x20/0x30
[   30.902487]  kmalloc_big_oob_right+0x2a4/0x2f0
[   30.902534]  kunit_try_run_case+0x170/0x3f0
[   30.902631]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.902702]  kthread+0x328/0x630
[   30.902749]  ret_from_fork+0x10/0x20
[   30.902796] 
[   30.902813] Allocated by task 175:
[   30.902840]  kasan_save_stack+0x3c/0x68
[   30.902880]  kasan_save_track+0x20/0x40
[   30.902917]  kasan_save_alloc_info+0x40/0x58
[   30.902953]  __kasan_kmalloc+0xd4/0xd8
[   30.902990]  __kmalloc_cache_noprof+0x16c/0x3c0
[   30.903029]  kmalloc_big_oob_right+0xb8/0x2f0
[   30.903066]  kunit_try_run_case+0x170/0x3f0
[   30.903103]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.903272]  kthread+0x328/0x630
[   30.903333]  ret_from_fork+0x10/0x20
[   30.903370] 
[   30.903389] The buggy address belongs to the object at fff00000c6454000
[   30.903389]  which belongs to the cache kmalloc-8k of size 8192
[   30.903467] The buggy address is located 0 bytes to the right of
[   30.903467]  allocated 7936-byte region [fff00000c6454000, fff00000c6455f00)
[   30.903538] 
[   30.903567] The buggy address belongs to the physical page:
[   30.903605] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106450
[   30.903655] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   30.903700] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   30.903748] page_type: f5(slab)
[   30.903784] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   30.903840] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   30.903888] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   30.903935] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   30.903981] head: 0bfffe0000000003 ffffc1ffc3191401 00000000ffffffff 00000000ffffffff
[   30.904027] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   30.904064] page dumped because: kasan: bad access detected
[   30.904094] 
[   30.904112] Memory state around the buggy address:
[   30.904152]  fff00000c6455e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   30.904192]  fff00000c6455e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   30.904244] >fff00000c6455f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.904279]                    ^
[   30.904305]  fff00000c6455f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.904344]  fff00000c6456000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.904380] ==================================================================

[   22.827742] ==================================================================
[   22.828561] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   22.829024] Write of size 1 at addr ffff888102c2df00 by task kunit_try_catch/192
[   22.829399] 
[   22.829496] CPU: 1 UID: 0 PID: 192 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250708 #1 PREEMPT(voluntary) 
[   22.829584] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.829597] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   22.829620] Call Trace:
[   22.829634]  <TASK>
[   22.829661]  dump_stack_lvl+0x73/0xb0
[   22.829882]  print_report+0xd1/0x610
[   22.829921]  ? __virt_addr_valid+0x1db/0x2d0
[   22.829946]  ? kmalloc_big_oob_right+0x316/0x370
[   22.829969]  ? kasan_complete_mode_report_info+0x2a/0x200
[   22.829998]  ? kmalloc_big_oob_right+0x316/0x370
[   22.830020]  kasan_report+0x141/0x180
[   22.830043]  ? kmalloc_big_oob_right+0x316/0x370
[   22.830070]  __asan_report_store1_noabort+0x1b/0x30
[   22.830097]  kmalloc_big_oob_right+0x316/0x370
[   22.830120]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   22.830143]  ? __schedule+0x10cc/0x2b60
[   22.830172]  ? __pfx_read_tsc+0x10/0x10
[   22.830225]  ? ktime_get_ts64+0x86/0x230
[   22.830263]  kunit_try_run_case+0x1a5/0x480
[   22.830286]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.830307]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   22.830329]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   22.830358]  ? __kthread_parkme+0x82/0x180
[   22.830379]  ? preempt_count_sub+0x50/0x80
[   22.830404]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.830425]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.830485]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   22.830512]  kthread+0x337/0x6f0
[   22.830558]  ? trace_preempt_on+0x20/0xc0
[   22.830583]  ? __pfx_kthread+0x10/0x10
[   22.830606]  ? _raw_spin_unlock_irq+0x47/0x80
[   22.830632]  ? calculate_sigpending+0x7b/0xa0
[   22.830659]  ? __pfx_kthread+0x10/0x10
[   22.830682]  ret_from_fork+0x116/0x1d0
[   22.830702]  ? __pfx_kthread+0x10/0x10
[   22.830724]  ret_from_fork_asm+0x1a/0x30
[   22.830758]  </TASK>
[   22.830771] 
[   22.841527] Allocated by task 192:
[   22.841998]  kasan_save_stack+0x45/0x70
[   22.842295]  kasan_save_track+0x18/0x40
[   22.842577]  kasan_save_alloc_info+0x3b/0x50
[   22.843152]  __kasan_kmalloc+0xb7/0xc0
[   22.843357]  __kmalloc_cache_noprof+0x189/0x420
[   22.843662]  kmalloc_big_oob_right+0xa9/0x370
[   22.844088]  kunit_try_run_case+0x1a5/0x480
[   22.844396]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.844731]  kthread+0x337/0x6f0
[   22.845127]  ret_from_fork+0x116/0x1d0
[   22.845345]  ret_from_fork_asm+0x1a/0x30
[   22.845694] 
[   22.845872] The buggy address belongs to the object at ffff888102c2c000
[   22.845872]  which belongs to the cache kmalloc-8k of size 8192
[   22.846415] The buggy address is located 0 bytes to the right of
[   22.846415]  allocated 7936-byte region [ffff888102c2c000, ffff888102c2df00)
[   22.846887] 
[   22.847004] The buggy address belongs to the physical page:
[   22.847314] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102c28
[   22.847667] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   22.847974] flags: 0x200000000000040(head|node=0|zone=2)
[   22.848331] page_type: f5(slab)
[   22.848465] raw: 0200000000000040 ffff888100042280 dead000000000100 dead000000000122
[   22.848926] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   22.849284] head: 0200000000000040 ffff888100042280 dead000000000100 dead000000000122
[   22.849632] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   22.850045] head: 0200000000000003 ffffea00040b0a01 00000000ffffffff 00000000ffffffff
[   22.850318] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   22.850672] page dumped because: kasan: bad access detected
[   22.850932] 
[   22.851013] Memory state around the buggy address:
[   22.851317]  ffff888102c2de00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   22.851598]  ffff888102c2de80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   22.852092] >ffff888102c2df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.852462]                    ^
[   22.852646]  ffff888102c2df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.852914]  ffff888102c2e000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.853523] ==================================================================