Hay
Date
April 20, 2025, 11:09 p.m.

Environment
x86

[   76.331041] ==================================================================
[   76.344368] BUG: KASAN: slab-out-of-bounds in _copy_from_user+0x32/0x90
[   76.350989] Write of size 121 at addr ffff888104ee9700 by task kunit_try_catch/328
[   76.358563] 
[   76.360064] CPU: 0 UID: 0 PID: 328 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT(voluntary) 
[   76.360073] Tainted: [B]=BAD_PAGE, [N]=TEST
[   76.360076] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS 2.7 12/07/2021
[   76.360080] Call Trace:
[   76.360082]  <TASK>
[   76.360084]  dump_stack_lvl+0x73/0xb0
[   76.360088]  print_report+0xd1/0x650
[   76.360092]  ? __virt_addr_valid+0x1db/0x2d0
[   76.360096]  ? _copy_from_user+0x32/0x90
[   76.360101]  ? kasan_complete_mode_report_info+0x2a/0x200
[   76.360105]  ? _copy_from_user+0x32/0x90
[   76.360110]  kasan_report+0x141/0x180
[   76.360114]  ? _copy_from_user+0x32/0x90
[   76.360120]  kasan_check_range+0x10c/0x1c0
[   76.360125]  __kasan_check_write+0x18/0x20
[   76.360129]  _copy_from_user+0x32/0x90
[   76.360133]  copy_user_test_oob+0x2be/0x10f0
[   76.360138]  ? __pfx_copy_user_test_oob+0x10/0x10
[   76.360141]  ? finish_task_switch.isra.0+0x153/0x700
[   76.360146]  ? __switch_to+0x5d9/0xf60
[   76.360150]  ? dequeue_task_fair+0x166/0x4e0
[   76.360154]  ? __schedule+0x10cc/0x2b30
[   76.360159]  ? ktime_get_ts64+0x83/0x230
[   76.360164]  kunit_try_run_case+0x1a2/0x480
[   76.360169]  ? __pfx_kunit_try_run_case+0x10/0x10
[   76.360173]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   76.360178]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   76.360183]  ? __kthread_parkme+0x82/0x180
[   76.360187]  ? preempt_count_sub+0x50/0x80
[   76.360191]  ? __pfx_kunit_try_run_case+0x10/0x10
[   76.360196]  kunit_generic_run_threadfn_adapter+0x82/0xf0
[   76.360200]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   76.360204]  kthread+0x334/0x6f0
[   76.360209]  ? trace_preempt_on+0x20/0xc0
[   76.360213]  ? __pfx_kthread+0x10/0x10
[   76.360218]  ? _raw_spin_unlock_irq+0x47/0x80
[   76.360222]  ? calculate_sigpending+0x7b/0xa0
[   76.360226]  ? __pfx_kthread+0x10/0x10
[   76.360230]  ret_from_fork+0x3e/0x80
[   76.360234]  ? __pfx_kthread+0x10/0x10
[   76.360239]  ret_from_fork_asm+0x1a/0x30
[   76.360245]  </TASK>
[   76.360246] 
[   76.542462] Allocated by task 328:
[   76.545867]  kasan_save_stack+0x45/0x70
[   76.549716]  kasan_save_track+0x18/0x40
[   76.553579]  kasan_save_alloc_info+0x3b/0x50
[   76.557851]  __kasan_kmalloc+0xb7/0xc0
[   76.561605]  __kmalloc_noprof+0x1c9/0x500
[   76.565615]  kunit_kmalloc_array+0x25/0x60
[   76.569737]  copy_user_test_oob+0xab/0x10f0
[   76.573929]  kunit_try_run_case+0x1a2/0x480
[   76.578123]  kunit_generic_run_threadfn_adapter+0x82/0xf0
[   76.583522]  kthread+0x334/0x6f0
[   76.586762]  ret_from_fork+0x3e/0x80
[   76.590343]  ret_from_fork_asm+0x1a/0x30
[   76.594275] 
[   76.595777] The buggy address belongs to the object at ffff888104ee9700
[   76.595777]  which belongs to the cache kmalloc-128 of size 128
[   76.608291] The buggy address is located 0 bytes inside of
[   76.608291]  allocated 120-byte region [ffff888104ee9700, ffff888104ee9778)
[   76.620748] 
[   76.622251] The buggy address belongs to the physical page:
[   76.627823] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104ee9
[   76.635830] flags: 0x200000000000000(node=0|zone=2)
[   76.640709] page_type: f5(slab)
[   76.643882] raw: 0200000000000000 ffff888100042a00 dead000000000122 0000000000000000
[   76.651623] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   76.659368] page dumped because: kasan: bad access detected
[   76.664940] 
[   76.666432] Memory state around the buggy address:
[   76.671224]  ffff888104ee9600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   76.678444]  ffff888104ee9680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   76.685661] >ffff888104ee9700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   76.692907]                                                                 ^
[   76.700039]  ffff888104ee9780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   76.707259]  ffff888104ee9800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   76.714487] ==================================================================