Date
June 23, 2025, 7:07 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 26.191145] ================================================================== [ 26.191443] BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x3c/0x70 [ 26.191773] Read of size 121 at addr ffff888102c14900 by task kunit_try_catch/314 [ 26.192305] [ 26.192520] CPU: 1 UID: 0 PID: 314 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250623 #1 PREEMPT(voluntary) [ 26.192604] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.192629] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 26.192695] Call Trace: [ 26.192723] <TASK> [ 26.192767] dump_stack_lvl+0x73/0xb0 [ 26.192820] print_report+0xd1/0x650 [ 26.192855] ? __virt_addr_valid+0x1db/0x2d0 [ 26.192922] ? _copy_to_user+0x3c/0x70 [ 26.192959] ? kasan_complete_mode_report_info+0x2a/0x200 [ 26.193021] ? _copy_to_user+0x3c/0x70 [ 26.193049] kasan_report+0x141/0x180 [ 26.193098] ? _copy_to_user+0x3c/0x70 [ 26.193142] kasan_check_range+0x10c/0x1c0 [ 26.193198] __kasan_check_read+0x15/0x20 [ 26.193239] _copy_to_user+0x3c/0x70 [ 26.193285] copy_user_test_oob+0x364/0x10f0 [ 26.193334] ? __pfx_copy_user_test_oob+0x10/0x10 [ 26.193395] ? finish_task_switch.isra.0+0x153/0x700 [ 26.193440] ? __switch_to+0x47/0xf50 [ 26.193504] ? __schedule+0x10cc/0x2b60 [ 26.193534] ? __pfx_read_tsc+0x10/0x10 [ 26.193556] ? ktime_get_ts64+0x86/0x230 [ 26.193579] kunit_try_run_case+0x1a5/0x480 [ 26.193600] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.193619] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 26.193639] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 26.193659] ? __kthread_parkme+0x82/0x180 [ 26.193677] ? preempt_count_sub+0x50/0x80 [ 26.193697] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.193717] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.193738] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 26.193758] kthread+0x337/0x6f0 [ 26.193775] ? trace_preempt_on+0x20/0xc0 [ 26.193795] ? __pfx_kthread+0x10/0x10 [ 26.193813] ? _raw_spin_unlock_irq+0x47/0x80 [ 26.193853] ? calculate_sigpending+0x7b/0xa0 [ 26.193877] ? __pfx_kthread+0x10/0x10 [ 26.193896] ret_from_fork+0x116/0x1d0 [ 26.193912] ? __pfx_kthread+0x10/0x10 [ 26.193931] ret_from_fork_asm+0x1a/0x30 [ 26.193958] </TASK> [ 26.193970] [ 26.203468] Allocated by task 314: [ 26.203701] kasan_save_stack+0x45/0x70 [ 26.203937] kasan_save_track+0x18/0x40 [ 26.204245] kasan_save_alloc_info+0x3b/0x50 [ 26.204619] __kasan_kmalloc+0xb7/0xc0 [ 26.204769] __kmalloc_noprof+0x1c9/0x500 [ 26.205421] kunit_kmalloc_array+0x25/0x60 [ 26.205660] copy_user_test_oob+0xab/0x10f0 [ 26.205833] kunit_try_run_case+0x1a5/0x480 [ 26.205997] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.206197] kthread+0x337/0x6f0 [ 26.206334] ret_from_fork+0x116/0x1d0 [ 26.206537] ret_from_fork_asm+0x1a/0x30 [ 26.206826] [ 26.206973] The buggy address belongs to the object at ffff888102c14900 [ 26.206973] which belongs to the cache kmalloc-128 of size 128 [ 26.209206] The buggy address is located 0 bytes inside of [ 26.209206] allocated 120-byte region [ffff888102c14900, ffff888102c14978) [ 26.210200] [ 26.210397] The buggy address belongs to the physical page: [ 26.210948] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102c14 [ 26.211305] flags: 0x200000000000000(node=0|zone=2) [ 26.211637] page_type: f5(slab) [ 26.211853] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 26.212255] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 26.212648] page dumped because: kasan: bad access detected [ 26.213023] [ 26.213177] Memory state around the buggy address: [ 26.213406] ffff888102c14800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.213852] ffff888102c14880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.214180] >ffff888102c14900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 26.214643] ^ [ 26.215009] ffff888102c14980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.215418] ffff888102c14a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.215680] ==================================================================