Hay
Date
July 16, 2025, 12:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   30.625012] ==================================================================
[   30.625544] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8
[   30.625616] Write of size 2 at addr fff00000c6361a77 by task kunit_try_catch/203
[   30.625930] 
[   30.625981] CPU: 0 UID: 0 PID: 203 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT 
[   30.626070] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.626097] Hardware name: linux,dummy-virt (DT)
[   30.626464] Call trace:
[   30.626599]  show_stack+0x20/0x38 (C)
[   30.626673]  dump_stack_lvl+0x8c/0xd0
[   30.626727]  print_report+0x118/0x5d0
[   30.626986]  kasan_report+0xdc/0x128
[   30.627051]  kasan_check_range+0x100/0x1a8
[   30.627541]  __asan_memset+0x34/0x78
[   30.627649]  kmalloc_oob_memset_2+0x150/0x2f8
[   30.627725]  kunit_try_run_case+0x170/0x3f0
[   30.627953]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.628164]  kthread+0x328/0x630
[   30.628367]  ret_from_fork+0x10/0x20
[   30.628497] 
[   30.628705] Allocated by task 203:
[   30.628851]  kasan_save_stack+0x3c/0x68
[   30.629007]  kasan_save_track+0x20/0x40
[   30.629066]  kasan_save_alloc_info+0x40/0x58
[   30.629268]  __kasan_kmalloc+0xd4/0xd8
[   30.629488]  __kmalloc_cache_noprof+0x16c/0x3c0
[   30.629564]  kmalloc_oob_memset_2+0xb0/0x2f8
[   30.629727]  kunit_try_run_case+0x170/0x3f0
[   30.629892]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.630038]  kthread+0x328/0x630
[   30.630076]  ret_from_fork+0x10/0x20
[   30.630112] 
[   30.630148] The buggy address belongs to the object at fff00000c6361a00
[   30.630148]  which belongs to the cache kmalloc-128 of size 128
[   30.630208] The buggy address is located 119 bytes inside of
[   30.630208]  allocated 120-byte region [fff00000c6361a00, fff00000c6361a78)
[   30.630281] 
[   30.630317] The buggy address belongs to the physical page:
[   30.630362] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106361
[   30.630419] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.630485] page_type: f5(slab)
[   30.630547] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   30.630606] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   30.630652] page dumped because: kasan: bad access detected
[   30.630689] 
[   30.630707] Memory state around the buggy address:
[   30.630756]  fff00000c6361900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   30.630799]  fff00000c6361980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.630857] >fff00000c6361a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   30.630895]                                                                 ^
[   30.630935]  fff00000c6361a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.630995]  fff00000c6361b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.631033] ==================================================================

[   23.343424] ==================================================================
[   23.344574] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x166/0x330
[   23.344815] Write of size 2 at addr ffff88810539f977 by task kunit_try_catch/221
[   23.345034] 
[   23.345111] CPU: 0 UID: 0 PID: 221 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT(voluntary) 
[   23.345158] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.345171] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   23.345190] Call Trace:
[   23.345202]  <TASK>
[   23.345218]  dump_stack_lvl+0x73/0xb0
[   23.345247]  print_report+0xd1/0x610
[   23.345564]  ? __virt_addr_valid+0x1db/0x2d0
[   23.346164]  ? kmalloc_oob_memset_2+0x166/0x330
[   23.346191]  ? kasan_complete_mode_report_info+0x2a/0x200
[   23.346218]  ? kmalloc_oob_memset_2+0x166/0x330
[   23.346240]  kasan_report+0x141/0x180
[   23.346263]  ? kmalloc_oob_memset_2+0x166/0x330
[   23.346354]  kasan_check_range+0x10c/0x1c0
[   23.346377]  __asan_memset+0x27/0x50
[   23.346399]  kmalloc_oob_memset_2+0x166/0x330
[   23.346421]  ? __pfx_kmalloc_oob_memset_2+0x10/0x10
[   23.346442]  ? __schedule+0x10c6/0x2b60
[   23.346465]  ? __pfx_read_tsc+0x10/0x10
[   23.346487]  ? ktime_get_ts64+0x86/0x230
[   23.346512]  kunit_try_run_case+0x1a5/0x480
[   23.346555]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.346577]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   23.346599]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   23.346620]  ? __kthread_parkme+0x82/0x180
[   23.346640]  ? preempt_count_sub+0x50/0x80
[   23.346662]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.346684]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.346710]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   23.346735]  kthread+0x337/0x6f0
[   23.346754]  ? trace_preempt_on+0x20/0xc0
[   23.346777]  ? __pfx_kthread+0x10/0x10
[   23.346797]  ? _raw_spin_unlock_irq+0x47/0x80
[   23.346817]  ? calculate_sigpending+0x7b/0xa0
[   23.346841]  ? __pfx_kthread+0x10/0x10
[   23.346880]  ret_from_fork+0x116/0x1d0
[   23.346899]  ? __pfx_kthread+0x10/0x10
[   23.346919]  ret_from_fork_asm+0x1a/0x30
[   23.346948]  </TASK>
[   23.346959] 
[   23.358643] Allocated by task 221:
[   23.358812]  kasan_save_stack+0x45/0x70
[   23.359671]  kasan_save_track+0x18/0x40
[   23.360283]  kasan_save_alloc_info+0x3b/0x50
[   23.360779]  __kasan_kmalloc+0xb7/0xc0
[   23.361049]  __kmalloc_cache_noprof+0x189/0x420
[   23.361235]  kmalloc_oob_memset_2+0xac/0x330
[   23.361453]  kunit_try_run_case+0x1a5/0x480
[   23.361975]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.362300]  kthread+0x337/0x6f0
[   23.362477]  ret_from_fork+0x116/0x1d0
[   23.362718]  ret_from_fork_asm+0x1a/0x30
[   23.363290] 
[   23.363496] The buggy address belongs to the object at ffff88810539f900
[   23.363496]  which belongs to the cache kmalloc-128 of size 128
[   23.364458] The buggy address is located 119 bytes inside of
[   23.364458]  allocated 120-byte region [ffff88810539f900, ffff88810539f978)
[   23.365182] 
[   23.365291] The buggy address belongs to the physical page:
[   23.365859] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10539f
[   23.366278] flags: 0x200000000000000(node=0|zone=2)
[   23.366548] page_type: f5(slab)
[   23.366730] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   23.367031] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   23.367363] page dumped because: kasan: bad access detected
[   23.367725] 
[   23.367838] Memory state around the buggy address:
[   23.368090]  ffff88810539f800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   23.368617]  ffff88810539f880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.369028] >ffff88810539f900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   23.369327]                                                                 ^
[   23.369539]  ffff88810539f980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.370056]  ffff88810539fa00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.370404] ==================================================================