Hay
Date
July 15, 2025, 2:09 p.m.

Environment
qemu-x86_64

[   14.865350] ==================================================================
[   14.865668] BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x4a/0x70
[   14.866123] Read of size 121 at addr ffff888103a34500 by task kunit_try_catch/304
[   14.866602] 
[   14.866693] CPU: 1 UID: 0 PID: 304 Comm: kunit_try_catch Tainted: G    B            N  6.15.7-rc1 #1 PREEMPT(voluntary) 
[   14.866806] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.866820] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.866839] Call Trace:
[   14.866853]  <TASK>
[   14.866868]  dump_stack_lvl+0x73/0xb0
[   14.866909]  print_report+0xd1/0x610
[   14.866932]  ? __virt_addr_valid+0x1db/0x2d0
[   14.866953]  ? _copy_to_user+0x4a/0x70
[   14.866972]  ? kasan_complete_mode_report_info+0x2a/0x200
[   14.866995]  ? _copy_to_user+0x4a/0x70
[   14.867015]  kasan_report+0x141/0x180
[   14.867038]  ? _copy_to_user+0x4a/0x70
[   14.867062]  kasan_check_range+0x10c/0x1c0
[   14.867082]  __kasan_check_read+0x15/0x20
[   14.867102]  _copy_to_user+0x4a/0x70
[   14.867122]  copy_user_test_oob+0x364/0x10f0
[   14.867144]  ? __pfx_copy_user_test_oob+0x10/0x10
[   14.867164]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   14.867191]  ? __pfx_copy_user_test_oob+0x10/0x10
[   14.867215]  kunit_try_run_case+0x1a5/0x480
[   14.867235]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.867254]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.867277]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.867302]  ? __kthread_parkme+0x82/0x180
[   14.867324]  ? preempt_count_sub+0x50/0x80
[   14.867349]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.867369]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.867393]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.867416]  kthread+0x337/0x6f0
[   14.867433]  ? trace_preempt_on+0x20/0xc0
[   14.867456]  ? __pfx_kthread+0x10/0x10
[   14.867474]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.867497]  ? calculate_sigpending+0x7b/0xa0
[   14.867518]  ? __pfx_kthread+0x10/0x10
[   14.867537]  ret_from_fork+0x41/0x80
[   14.867557]  ? __pfx_kthread+0x10/0x10
[   14.867575]  ret_from_fork_asm+0x1a/0x30
[   14.867605]  </TASK>
[   14.867616] 
[   14.874426] Allocated by task 304:
[   14.874604]  kasan_save_stack+0x45/0x70
[   14.874803]  kasan_save_track+0x18/0x40
[   14.875118]  kasan_save_alloc_info+0x3b/0x50
[   14.875270]  __kasan_kmalloc+0xb7/0xc0
[   14.875462]  __kmalloc_noprof+0x1c9/0x500
[   14.875653]  kunit_kmalloc_array+0x25/0x60
[   14.875849]  copy_user_test_oob+0xab/0x10f0
[   14.876038]  kunit_try_run_case+0x1a5/0x480
[   14.876180]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.876354]  kthread+0x337/0x6f0
[   14.876520]  ret_from_fork+0x41/0x80
[   14.876702]  ret_from_fork_asm+0x1a/0x30
[   14.876903] 
[   14.877051] The buggy address belongs to the object at ffff888103a34500
[   14.877051]  which belongs to the cache kmalloc-128 of size 128
[   14.877571] The buggy address is located 0 bytes inside of
[   14.877571]  allocated 120-byte region [ffff888103a34500, ffff888103a34578)
[   14.878154] 
[   14.878224] The buggy address belongs to the physical page:
[   14.878479] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a34
[   14.878804] flags: 0x200000000000000(node=0|zone=2)
[   14.879002] page_type: f5(slab)
[   14.879133] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   14.879485] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   14.879778] page dumped because: kasan: bad access detected
[   14.879989] 
[   14.880074] Memory state around the buggy address:
[   14.880300]  ffff888103a34400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   14.880587]  ffff888103a34480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.880802] >ffff888103a34500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   14.881024]                                                                 ^
[   14.881319]  ffff888103a34580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.881829]  ffff888103a34600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.882071] ==================================================================