Hay
Date
July 24, 2025, 4:41 a.m.

Environment
qemu-arm64
qemu-x86_64

[   32.194126] ==================================================================
[   32.194658] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   32.194728] Write of size 1 at addr fff00000c6605f00 by task kunit_try_catch/175
[   32.194793] 
[   32.195089] CPU: 0 UID: 0 PID: 175 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250724 #1 PREEMPT 
[   32.195671] Tainted: [B]=BAD_PAGE, [N]=TEST
[   32.195739] Hardware name: linux,dummy-virt (DT)
[   32.196129] Call trace:
[   32.196210]  show_stack+0x20/0x38 (C)
[   32.196284]  dump_stack_lvl+0x8c/0xd0
[   32.196411]  print_report+0x118/0x5e8
[   32.196508]  kasan_report+0xdc/0x128
[   32.196585]  __asan_report_store1_noabort+0x20/0x30
[   32.196736]  kmalloc_big_oob_right+0x2a4/0x2f0
[   32.197036]  kunit_try_run_case+0x170/0x3f0
[   32.197314]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.197418]  kthread+0x328/0x630
[   32.197565]  ret_from_fork+0x10/0x20
[   32.197660] 
[   32.197679] Allocated by task 175:
[   32.197937]  kasan_save_stack+0x3c/0x68
[   32.198215]  kasan_save_track+0x20/0x40
[   32.198595]  kasan_save_alloc_info+0x40/0x58
[   32.198740]  __kasan_kmalloc+0xd4/0xd8
[   32.198894]  __kmalloc_cache_noprof+0x16c/0x3c0
[   32.199084]  kmalloc_big_oob_right+0xb8/0x2f0
[   32.199128]  kunit_try_run_case+0x170/0x3f0
[   32.199187]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.199582]  kthread+0x328/0x630
[   32.199740]  ret_from_fork+0x10/0x20
[   32.199809] 
[   32.199903] The buggy address belongs to the object at fff00000c6604000
[   32.199903]  which belongs to the cache kmalloc-8k of size 8192
[   32.200000] The buggy address is located 0 bytes to the right of
[   32.200000]  allocated 7936-byte region [fff00000c6604000, fff00000c6605f00)
[   32.200098] 
[   32.200326] The buggy address belongs to the physical page:
[   32.200643] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106600
[   32.200826] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   32.200905] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   32.201236] page_type: f5(slab)
[   32.201503] raw: 0bfffe0000000040 fff00000c0002280 dead000000000100 dead000000000122
[   32.201635] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   32.201698] head: 0bfffe0000000040 fff00000c0002280 dead000000000100 dead000000000122
[   32.201927] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   32.202261] head: 0bfffe0000000003 ffffc1ffc3198001 00000000ffffffff 00000000ffffffff
[   32.202355] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   32.202433] page dumped because: kasan: bad access detected
[   32.202534] 
[   32.202589] Memory state around the buggy address:
[   32.202625]  fff00000c6605e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   32.202771]  fff00000c6605e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   32.203017] >fff00000c6605f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.203275]                    ^
[   32.203389]  fff00000c6605f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.203512]  fff00000c6606000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.203552] ==================================================================

[   26.282258] ==================================================================
[   26.282995] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   26.283385] Write of size 1 at addr ffff8881060b1f00 by task kunit_try_catch/192
[   26.283730] 
[   26.284112] CPU: 0 UID: 0 PID: 192 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250724 #1 PREEMPT(voluntary) 
[   26.284170] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   26.284184] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.284223] Call Trace:
[   26.284389]  <TASK>
[   26.284479]  dump_stack_lvl+0x73/0xb0
[   26.284516]  print_report+0xd1/0x640
[   26.284539]  ? __virt_addr_valid+0x1db/0x2d0
[   26.284564]  ? kmalloc_big_oob_right+0x316/0x370
[   26.284598]  ? kasan_complete_mode_report_info+0x2a/0x200
[   26.284622]  ? kmalloc_big_oob_right+0x316/0x370
[   26.284644]  kasan_report+0x141/0x180
[   26.284665]  ? kmalloc_big_oob_right+0x316/0x370
[   26.284691]  __asan_report_store1_noabort+0x1b/0x30
[   26.284715]  kmalloc_big_oob_right+0x316/0x370
[   26.284736]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   26.284759]  ? __schedule+0x10da/0x2b60
[   26.284784]  ? __pfx_read_tsc+0x10/0x10
[   26.284806]  ? ktime_get_ts64+0x86/0x230
[   26.284832]  kunit_try_run_case+0x1a5/0x480
[   26.284857]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.284879]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   26.284903]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   26.284939]  ? __kthread_parkme+0x82/0x180
[   26.284959]  ? preempt_count_sub+0x50/0x80
[   26.284982]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.285005]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.285027]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   26.285050]  kthread+0x337/0x6f0
[   26.285070]  ? trace_preempt_on+0x20/0xc0
[   26.285094]  ? __pfx_kthread+0x10/0x10
[   26.285124]  ? _raw_spin_unlock_irq+0x47/0x80
[   26.285155]  ? calculate_sigpending+0x7b/0xa0
[   26.285178]  ? __pfx_kthread+0x10/0x10
[   26.285198]  ret_from_fork+0x116/0x1d0
[   26.285217]  ? __pfx_kthread+0x10/0x10
[   26.285238]  ret_from_fork_asm+0x1a/0x30
[   26.285270]  </TASK>
[   26.285280] 
[   26.296829] Allocated by task 192:
[   26.297478]  kasan_save_stack+0x45/0x70
[   26.297715]  kasan_save_track+0x18/0x40
[   26.297859]  kasan_save_alloc_info+0x3b/0x50
[   26.298003]  __kasan_kmalloc+0xb7/0xc0
[   26.298130]  __kmalloc_cache_noprof+0x189/0x420
[   26.298285]  kmalloc_big_oob_right+0xa9/0x370
[   26.298432]  kunit_try_run_case+0x1a5/0x480
[   26.298584]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.298753]  kthread+0x337/0x6f0
[   26.298869]  ret_from_fork+0x116/0x1d0
[   26.298995]  ret_from_fork_asm+0x1a/0x30
[   26.299132] 
[   26.299198] The buggy address belongs to the object at ffff8881060b0000
[   26.299198]  which belongs to the cache kmalloc-8k of size 8192
[   26.299560] The buggy address is located 0 bytes to the right of
[   26.299560]  allocated 7936-byte region [ffff8881060b0000, ffff8881060b1f00)
[   26.300419] 
[   26.300505] The buggy address belongs to the physical page:
[   26.300700] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1060b0
[   26.301390] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   26.302090] flags: 0x200000000000040(head|node=0|zone=2)
[   26.302570] page_type: f5(slab)
[   26.302931] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   26.303442] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   26.303680] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   26.304256] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   26.305258] head: 0200000000000003 ffffea0004182c01 00000000ffffffff 00000000ffffffff
[   26.306012] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   26.306344] page dumped because: kasan: bad access detected
[   26.306511] 
[   26.306584] Memory state around the buggy address:
[   26.306736]  ffff8881060b1e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   26.307404]  ffff8881060b1e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   26.308085] >ffff8881060b1f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.308682]                    ^
[   26.309055]  ffff8881060b1f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.309661]  ffff8881060b2000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.310213] ==================================================================