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

Environment
qemu-arm64
qemu-x86_64

[   16.770420] ==================================================================
[   16.770505] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x150/0x2f8
[   16.770582] Write of size 16 at addr fff00000c585ee69 by task kunit_try_catch/178
[   16.770649] 
[   16.770685] CPU: 1 UID: 0 PID: 178 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   16.770766] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.771088] Hardware name: linux,dummy-virt (DT)
[   16.771130] Call trace:
[   16.771275]  show_stack+0x20/0x38 (C)
[   16.771519]  dump_stack_lvl+0x8c/0xd0
[   16.771624]  print_report+0x118/0x5d0
[   16.771724]  kasan_report+0xdc/0x128
[   16.771769]  kasan_check_range+0x100/0x1a8
[   16.771815]  __asan_memset+0x34/0x78
[   16.771856]  kmalloc_oob_memset_16+0x150/0x2f8
[   16.771917]  kunit_try_run_case+0x170/0x3f0
[   16.771979]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.772030]  kthread+0x328/0x630
[   16.772073]  ret_from_fork+0x10/0x20
[   16.772127] 
[   16.772146] Allocated by task 178:
[   16.772393]  kasan_save_stack+0x3c/0x68
[   16.772577]  kasan_save_track+0x20/0x40
[   16.772646]  kasan_save_alloc_info+0x40/0x58
[   16.772811]  __kasan_kmalloc+0xd4/0xd8
[   16.772869]  __kmalloc_cache_noprof+0x16c/0x3c0
[   16.772907]  kmalloc_oob_memset_16+0xb0/0x2f8
[   16.772944]  kunit_try_run_case+0x170/0x3f0
[   16.773152]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.773248]  kthread+0x328/0x630
[   16.773316]  ret_from_fork+0x10/0x20
[   16.773361] 
[   16.773441] The buggy address belongs to the object at fff00000c585ee00
[   16.773441]  which belongs to the cache kmalloc-128 of size 128
[   16.773515] The buggy address is located 105 bytes inside of
[   16.773515]  allocated 120-byte region [fff00000c585ee00, fff00000c585ee78)
[   16.773610] 
[   16.773646] The buggy address belongs to the physical page:
[   16.773685] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10585e
[   16.773773] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.773860] page_type: f5(slab)
[   16.773915] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   16.774039] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.774097] page dumped because: kasan: bad access detected
[   16.774127] 
[   16.774144] Memory state around the buggy address:
[   16.774197]  fff00000c585ed00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.774239]  fff00000c585ed80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.774280] >fff00000c585ee00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.774578]                                                                 ^
[   16.774684]  fff00000c585ee80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.774758]  fff00000c585ef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.774861] ==================================================================

[   13.139735] ==================================================================
[   13.140611] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x166/0x330
[   13.140888] Write of size 16 at addr ffff8881029ef769 by task kunit_try_catch/195
[   13.141896] 
[   13.142074] CPU: 1 UID: 0 PID: 195 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   13.142512] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.142527] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.142549] Call Trace:
[   13.142562]  <TASK>
[   13.142580]  dump_stack_lvl+0x73/0xb0
[   13.142615]  print_report+0xd1/0x610
[   13.142638]  ? __virt_addr_valid+0x1db/0x2d0
[   13.142663]  ? kmalloc_oob_memset_16+0x166/0x330
[   13.142685]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.142713]  ? kmalloc_oob_memset_16+0x166/0x330
[   13.142735]  kasan_report+0x141/0x180
[   13.142757]  ? kmalloc_oob_memset_16+0x166/0x330
[   13.142784]  kasan_check_range+0x10c/0x1c0
[   13.142807]  __asan_memset+0x27/0x50
[   13.142826]  kmalloc_oob_memset_16+0x166/0x330
[   13.142849]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   13.142872]  ? __schedule+0x10cc/0x2b60
[   13.142895]  ? __pfx_read_tsc+0x10/0x10
[   13.142917]  ? ktime_get_ts64+0x86/0x230
[   13.142943]  kunit_try_run_case+0x1a5/0x480
[   13.142968]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.142991]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.143016]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.143039]  ? __kthread_parkme+0x82/0x180
[   13.143061]  ? preempt_count_sub+0x50/0x80
[   13.143085]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.143109]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.143133]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.143158]  kthread+0x337/0x6f0
[   13.143177]  ? trace_preempt_on+0x20/0xc0
[   13.143201]  ? __pfx_kthread+0x10/0x10
[   13.143222]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.143243]  ? calculate_sigpending+0x7b/0xa0
[   13.143279]  ? __pfx_kthread+0x10/0x10
[   13.143385]  ret_from_fork+0x116/0x1d0
[   13.143409]  ? __pfx_kthread+0x10/0x10
[   13.143430]  ret_from_fork_asm+0x1a/0x30
[   13.143462]  </TASK>
[   13.143473] 
[   13.152377] Allocated by task 195:
[   13.152518]  kasan_save_stack+0x45/0x70
[   13.152668]  kasan_save_track+0x18/0x40
[   13.152858]  kasan_save_alloc_info+0x3b/0x50
[   13.153132]  __kasan_kmalloc+0xb7/0xc0
[   13.153366]  __kmalloc_cache_noprof+0x189/0x420
[   13.153559]  kmalloc_oob_memset_16+0xac/0x330
[   13.153765]  kunit_try_run_case+0x1a5/0x480
[   13.153913]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.154119]  kthread+0x337/0x6f0
[   13.154452]  ret_from_fork+0x116/0x1d0
[   13.154646]  ret_from_fork_asm+0x1a/0x30
[   13.154893] 
[   13.155037] The buggy address belongs to the object at ffff8881029ef700
[   13.155037]  which belongs to the cache kmalloc-128 of size 128
[   13.155590] The buggy address is located 105 bytes inside of
[   13.155590]  allocated 120-byte region [ffff8881029ef700, ffff8881029ef778)
[   13.156348] 
[   13.156450] The buggy address belongs to the physical page:
[   13.156843] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029ef
[   13.157183] flags: 0x200000000000000(node=0|zone=2)
[   13.157393] page_type: f5(slab)
[   13.157515] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   13.157745] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   13.158249] page dumped because: kasan: bad access detected
[   13.158515] 
[   13.158749] Memory state around the buggy address:
[   13.158969]  ffff8881029ef600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.159215]  ffff8881029ef680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.159502] >ffff8881029ef700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   13.159821]                                                                 ^
[   13.160095]  ffff8881029ef780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.160371]  ffff8881029ef800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.160697] ==================================================================