Hay
Date
July 12, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   18.896940] ==================================================================
[   18.897086] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   18.898332] Write of size 1 at addr fff00000c78e9f00 by task kunit_try_catch/145
[   18.898520] 
[   18.899109] CPU: 0 UID: 0 PID: 145 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   18.899745] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.900249] Hardware name: linux,dummy-virt (DT)
[   18.900340] Call trace:
[   18.900395]  show_stack+0x20/0x38 (C)
[   18.900521]  dump_stack_lvl+0x8c/0xd0
[   18.901526]  print_report+0x118/0x608
[   18.901750]  kasan_report+0xdc/0x128
[   18.901857]  __asan_report_store1_noabort+0x20/0x30
[   18.901963]  kmalloc_big_oob_right+0x2a4/0x2f0
[   18.903135]  kunit_try_run_case+0x170/0x3f0
[   18.903352]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.903476]  kthread+0x328/0x630
[   18.903577]  ret_from_fork+0x10/0x20
[   18.903691] 
[   18.903735] Allocated by task 145:
[   18.904992]  kasan_save_stack+0x3c/0x68
[   18.905390]  kasan_save_track+0x20/0x40
[   18.905467]  kasan_save_alloc_info+0x40/0x58
[   18.906150]  __kasan_kmalloc+0xd4/0xd8
[   18.906407]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.907061]  kmalloc_big_oob_right+0xb8/0x2f0
[   18.907240]  kunit_try_run_case+0x170/0x3f0
[   18.907656]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.907847]  kthread+0x328/0x630
[   18.907928]  ret_from_fork+0x10/0x20
[   18.908288] 
[   18.908475] The buggy address belongs to the object at fff00000c78e8000
[   18.908475]  which belongs to the cache kmalloc-8k of size 8192
[   18.909134] The buggy address is located 0 bytes to the right of
[   18.909134]  allocated 7936-byte region [fff00000c78e8000, fff00000c78e9f00)
[   18.909805] 
[   18.909904] The buggy address belongs to the physical page:
[   18.910542] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078e8
[   18.910726] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   18.910880] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   18.911033] page_type: f5(slab)
[   18.911142] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   18.912879] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   18.913016] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   18.913151] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   18.913265] head: 0bfffe0000000003 ffffc1ffc31e3a01 00000000ffffffff 00000000ffffffff
[   18.913319] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   18.913363] page dumped because: kasan: bad access detected
[   18.913397] 
[   18.913418] Memory state around the buggy address:
[   18.913458]  fff00000c78e9e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.913503]  fff00000c78e9e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.913547] >fff00000c78e9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.913586]                    ^
[   18.913617]  fff00000c78e9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.913660]  fff00000c78ea000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.913699] ==================================================================

[   12.124558] ==================================================================
[   12.125281] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   12.125604] Write of size 1 at addr ffff888102bfdf00 by task kunit_try_catch/162
[   12.126473] 
[   12.126583] CPU: 0 UID: 0 PID: 162 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.126628] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.126639] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.126659] Call Trace:
[   12.126683]  <TASK>
[   12.126699]  dump_stack_lvl+0x73/0xb0
[   12.126730]  print_report+0xd1/0x650
[   12.126763]  ? __virt_addr_valid+0x1db/0x2d0
[   12.126787]  ? kmalloc_big_oob_right+0x316/0x370
[   12.126809]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.126831]  ? kmalloc_big_oob_right+0x316/0x370
[   12.126854]  kasan_report+0x141/0x180
[   12.126875]  ? kmalloc_big_oob_right+0x316/0x370
[   12.126902]  __asan_report_store1_noabort+0x1b/0x30
[   12.126927]  kmalloc_big_oob_right+0x316/0x370
[   12.126950]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   12.126973]  ? __schedule+0x10cc/0x2b60
[   12.126995]  ? __pfx_read_tsc+0x10/0x10
[   12.127015]  ? ktime_get_ts64+0x86/0x230
[   12.127039]  kunit_try_run_case+0x1a5/0x480
[   12.127063]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.127085]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.127108]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.127131]  ? __kthread_parkme+0x82/0x180
[   12.127151]  ? preempt_count_sub+0x50/0x80
[   12.127175]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.127199]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.127223]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.127248]  kthread+0x337/0x6f0
[   12.127266]  ? trace_preempt_on+0x20/0xc0
[   12.127290]  ? __pfx_kthread+0x10/0x10
[   12.127311]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.127332]  ? calculate_sigpending+0x7b/0xa0
[   12.127355]  ? __pfx_kthread+0x10/0x10
[   12.127376]  ret_from_fork+0x116/0x1d0
[   12.127394]  ? __pfx_kthread+0x10/0x10
[   12.127414]  ret_from_fork_asm+0x1a/0x30
[   12.127445]  </TASK>
[   12.127455] 
[   12.134893] Allocated by task 162:
[   12.135071]  kasan_save_stack+0x45/0x70
[   12.135265]  kasan_save_track+0x18/0x40
[   12.135425]  kasan_save_alloc_info+0x3b/0x50
[   12.135613]  __kasan_kmalloc+0xb7/0xc0
[   12.135868]  __kmalloc_cache_noprof+0x189/0x420
[   12.136103]  kmalloc_big_oob_right+0xa9/0x370
[   12.136289]  kunit_try_run_case+0x1a5/0x480
[   12.136455]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.136718]  kthread+0x337/0x6f0
[   12.136902]  ret_from_fork+0x116/0x1d0
[   12.137055]  ret_from_fork_asm+0x1a/0x30
[   12.137258] 
[   12.137350] The buggy address belongs to the object at ffff888102bfc000
[   12.137350]  which belongs to the cache kmalloc-8k of size 8192
[   12.138043] The buggy address is located 0 bytes to the right of
[   12.138043]  allocated 7936-byte region [ffff888102bfc000, ffff888102bfdf00)
[   12.138566] 
[   12.138648] The buggy address belongs to the physical page:
[   12.138863] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102bf8
[   12.139093] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.139307] flags: 0x200000000000040(head|node=0|zone=2)
[   12.139521] page_type: f5(slab)
[   12.139680] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   12.140038] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   12.140327] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   12.140546] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   12.141048] head: 0200000000000003 ffffea00040afe01 00000000ffffffff 00000000ffffffff
[   12.141391] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   12.141658] page dumped because: kasan: bad access detected
[   12.141919] 
[   12.142005] Memory state around the buggy address:
[   12.142192]  ffff888102bfde00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.142466]  ffff888102bfde80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.142759] >ffff888102bfdf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.143052]                    ^
[   12.143196]  ffff888102bfdf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.143444]  ffff888102bfe000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.143646] ==================================================================