Hay
Date
July 10, 2025, 9:07 a.m.

Environment
qemu-arm64
qemu-x86_64

[   29.496573] ==================================================================
[   29.496627] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   29.496673] Write of size 8 at addr fff00000c9af0271 by task kunit_try_catch/207
[   29.496731] 
[   29.496873] CPU: 0 UID: 0 PID: 207 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250710 #1 PREEMPT 
[   29.496958] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.496984] Hardware name: linux,dummy-virt (DT)
[   29.497013] Call trace:
[   29.497035]  show_stack+0x20/0x38 (C)
[   29.497082]  dump_stack_lvl+0x8c/0xd0
[   29.497125]  print_report+0x118/0x5d0
[   29.497180]  kasan_report+0xdc/0x128
[   29.497221]  kasan_check_range+0x100/0x1a8
[   29.497265]  __asan_memset+0x34/0x78
[   29.497307]  kmalloc_oob_memset_8+0x150/0x2f8
[   29.497353]  kunit_try_run_case+0x170/0x3f0
[   29.497398]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.497450]  kthread+0x328/0x630
[   29.497490]  ret_from_fork+0x10/0x20
[   29.497535] 
[   29.497553] Allocated by task 207:
[   29.497578]  kasan_save_stack+0x3c/0x68
[   29.497617]  kasan_save_track+0x20/0x40
[   29.497655]  kasan_save_alloc_info+0x40/0x58
[   29.497691]  __kasan_kmalloc+0xd4/0xd8
[   29.497727]  __kmalloc_cache_noprof+0x16c/0x3c0
[   29.497766]  kmalloc_oob_memset_8+0xb0/0x2f8
[   29.497804]  kunit_try_run_case+0x170/0x3f0
[   29.497860]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.497905]  kthread+0x328/0x630
[   29.497949]  ret_from_fork+0x10/0x20
[   29.497993] 
[   29.498011] The buggy address belongs to the object at fff00000c9af0200
[   29.498011]  which belongs to the cache kmalloc-128 of size 128
[   29.498103] The buggy address is located 113 bytes inside of
[   29.498103]  allocated 120-byte region [fff00000c9af0200, fff00000c9af0278)
[   29.498175] 
[   29.498217] The buggy address belongs to the physical page:
[   29.498247] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109af0
[   29.498297] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   29.498342] page_type: f5(slab)
[   29.498387] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   29.498447] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   29.498566] page dumped because: kasan: bad access detected
[   29.498668] 
[   29.498686] Memory state around the buggy address:
[   29.498722]  fff00000c9af0100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   29.498824]  fff00000c9af0180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.498903] >fff00000c9af0200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   29.498941]                                                                 ^
[   29.498999]  fff00000c9af0280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.499068]  fff00000c9af0300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.499107] ==================================================================

[   25.175919] ==================================================================
[   25.176360] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   25.177101] Write of size 8 at addr ffff88810583a671 by task kunit_try_catch/224
[   25.177848] 
[   25.178031] CPU: 0 UID: 0 PID: 224 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250710 #1 PREEMPT(voluntary) 
[   25.178082] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.178112] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.178135] Call Trace:
[   25.178148]  <TASK>
[   25.178166]  dump_stack_lvl+0x73/0xb0
[   25.178198]  print_report+0xd1/0x610
[   25.178222]  ? __virt_addr_valid+0x1db/0x2d0
[   25.178247]  ? kmalloc_oob_memset_8+0x166/0x330
[   25.178268]  ? kasan_complete_mode_report_info+0x2a/0x200
[   25.178293]  ? kmalloc_oob_memset_8+0x166/0x330
[   25.178315]  kasan_report+0x141/0x180
[   25.178337]  ? kmalloc_oob_memset_8+0x166/0x330
[   25.178363]  kasan_check_range+0x10c/0x1c0
[   25.178386]  __asan_memset+0x27/0x50
[   25.178409]  kmalloc_oob_memset_8+0x166/0x330
[   25.178431]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   25.178453]  ? __schedule+0x10cc/0x2b60
[   25.178483]  ? __pfx_read_tsc+0x10/0x10
[   25.178505]  ? ktime_get_ts64+0x86/0x230
[   25.178531]  kunit_try_run_case+0x1a5/0x480
[   25.178554]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.178574]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.178596]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.178618]  ? __kthread_parkme+0x82/0x180
[   25.178639]  ? preempt_count_sub+0x50/0x80
[   25.178662]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.178683]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.178717]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.178741]  kthread+0x337/0x6f0
[   25.178760]  ? trace_preempt_on+0x20/0xc0
[   25.178783]  ? __pfx_kthread+0x10/0x10
[   25.178803]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.178824]  ? calculate_sigpending+0x7b/0xa0
[   25.178848]  ? __pfx_kthread+0x10/0x10
[   25.178934]  ret_from_fork+0x116/0x1d0
[   25.178967]  ? __pfx_kthread+0x10/0x10
[   25.178990]  ret_from_fork_asm+0x1a/0x30
[   25.179021]  </TASK>
[   25.179033] 
[   25.190242] Allocated by task 224:
[   25.190681]  kasan_save_stack+0x45/0x70
[   25.191161]  kasan_save_track+0x18/0x40
[   25.191530]  kasan_save_alloc_info+0x3b/0x50
[   25.191898]  __kasan_kmalloc+0xb7/0xc0
[   25.192252]  __kmalloc_cache_noprof+0x189/0x420
[   25.192402]  kmalloc_oob_memset_8+0xac/0x330
[   25.192557]  kunit_try_run_case+0x1a5/0x480
[   25.192974]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.193524]  kthread+0x337/0x6f0
[   25.193902]  ret_from_fork+0x116/0x1d0
[   25.194065]  ret_from_fork_asm+0x1a/0x30
[   25.194311] 
[   25.194486] The buggy address belongs to the object at ffff88810583a600
[   25.194486]  which belongs to the cache kmalloc-128 of size 128
[   25.195603] The buggy address is located 113 bytes inside of
[   25.195603]  allocated 120-byte region [ffff88810583a600, ffff88810583a678)
[   25.196527] 
[   25.196601] The buggy address belongs to the physical page:
[   25.196778] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10583a
[   25.197517] flags: 0x200000000000000(node=0|zone=2)
[   25.198019] page_type: f5(slab)
[   25.198379] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   25.198913] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   25.199570] page dumped because: kasan: bad access detected
[   25.199750] 
[   25.199856] Memory state around the buggy address:
[   25.200626]  ffff88810583a500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   25.201407]  ffff88810583a580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.202081] >ffff88810583a600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   25.202725]                                                                 ^
[   25.203230]  ffff88810583a680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.203867]  ffff88810583a700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.204319] ==================================================================