Date
June 26, 2025, 9:10 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 26.072253] ================================================================== [ 26.072596] BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x3c/0x70 [ 26.073030] Read of size 121 at addr ffff8881024e1b00 by task kunit_try_catch/314 [ 26.073663] [ 26.073790] CPU: 0 UID: 0 PID: 314 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250626 #1 PREEMPT(voluntary) [ 26.073972] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.073991] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 26.074024] Call Trace: [ 26.074048] <TASK> [ 26.074070] dump_stack_lvl+0x73/0xb0 [ 26.074102] print_report+0xd1/0x650 [ 26.074128] ? __virt_addr_valid+0x1db/0x2d0 [ 26.074154] ? _copy_to_user+0x3c/0x70 [ 26.074174] ? kasan_complete_mode_report_info+0x2a/0x200 [ 26.074202] ? _copy_to_user+0x3c/0x70 [ 26.074237] kasan_report+0x141/0x180 [ 26.074260] ? _copy_to_user+0x3c/0x70 [ 26.074285] kasan_check_range+0x10c/0x1c0 [ 26.074309] __kasan_check_read+0x15/0x20 [ 26.074333] _copy_to_user+0x3c/0x70 [ 26.074354] copy_user_test_oob+0x364/0x10f0 [ 26.074380] ? __pfx_copy_user_test_oob+0x10/0x10 [ 26.074404] ? finish_task_switch.isra.0+0x153/0x700 [ 26.074427] ? __switch_to+0x47/0xf50 [ 26.074454] ? __schedule+0x10cc/0x2b60 [ 26.074480] ? __pfx_read_tsc+0x10/0x10 [ 26.074503] ? ktime_get_ts64+0x86/0x230 [ 26.074528] kunit_try_run_case+0x1a5/0x480 [ 26.074554] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.074577] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 26.074603] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 26.074629] ? __kthread_parkme+0x82/0x180 [ 26.074650] ? preempt_count_sub+0x50/0x80 [ 26.074674] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.074699] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.074723] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 26.074747] kthread+0x337/0x6f0 [ 26.074769] ? trace_preempt_on+0x20/0xc0 [ 26.074793] ? __pfx_kthread+0x10/0x10 [ 26.074815] ? _raw_spin_unlock_irq+0x47/0x80 [ 26.074840] ? calculate_sigpending+0x7b/0xa0 [ 26.074864] ? __pfx_kthread+0x10/0x10 [ 26.074886] ret_from_fork+0x116/0x1d0 [ 26.074906] ? __pfx_kthread+0x10/0x10 [ 26.074929] ret_from_fork_asm+0x1a/0x30 [ 26.074961] </TASK> [ 26.074974] [ 26.084894] Allocated by task 314: [ 26.085086] kasan_save_stack+0x45/0x70 [ 26.085504] kasan_save_track+0x18/0x40 [ 26.085765] kasan_save_alloc_info+0x3b/0x50 [ 26.085937] __kasan_kmalloc+0xb7/0xc0 [ 26.086274] __kmalloc_noprof+0x1c9/0x500 [ 26.086463] kunit_kmalloc_array+0x25/0x60 [ 26.086666] copy_user_test_oob+0xab/0x10f0 [ 26.086850] kunit_try_run_case+0x1a5/0x480 [ 26.087333] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.087571] kthread+0x337/0x6f0 [ 26.087707] ret_from_fork+0x116/0x1d0 [ 26.088018] ret_from_fork_asm+0x1a/0x30 [ 26.088355] [ 26.088437] The buggy address belongs to the object at ffff8881024e1b00 [ 26.088437] which belongs to the cache kmalloc-128 of size 128 [ 26.089131] The buggy address is located 0 bytes inside of [ 26.089131] allocated 120-byte region [ffff8881024e1b00, ffff8881024e1b78) [ 26.089624] [ 26.089714] The buggy address belongs to the physical page: [ 26.089949] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1024e1 [ 26.090663] flags: 0x200000000000000(node=0|zone=2) [ 26.090954] page_type: f5(slab) [ 26.091089] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 26.091569] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 26.091970] page dumped because: kasan: bad access detected [ 26.092325] [ 26.092399] Memory state around the buggy address: [ 26.092754] ffff8881024e1a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.093199] ffff8881024e1a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.093618] >ffff8881024e1b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 26.094014] ^ [ 26.094430] ffff8881024e1b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.094794] ffff8881024e1c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.095216] ==================================================================