Date
June 23, 2025, 7:07 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 26.156415] ================================================================== [ 26.156865] BUG: KASAN: slab-out-of-bounds in _copy_from_user+0x32/0x90 [ 26.157351] Write of size 121 at addr ffff888102c14900 by task kunit_try_catch/314 [ 26.157763] [ 26.158014] CPU: 1 UID: 0 PID: 314 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250623 #1 PREEMPT(voluntary) [ 26.158122] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.158149] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 26.158188] Call Trace: [ 26.158217] <TASK> [ 26.158254] dump_stack_lvl+0x73/0xb0 [ 26.158312] print_report+0xd1/0x650 [ 26.158357] ? __virt_addr_valid+0x1db/0x2d0 [ 26.158423] ? _copy_from_user+0x32/0x90 [ 26.158467] ? kasan_complete_mode_report_info+0x2a/0x200 [ 26.158506] ? _copy_from_user+0x32/0x90 [ 26.158526] kasan_report+0x141/0x180 [ 26.158549] ? _copy_from_user+0x32/0x90 [ 26.158572] kasan_check_range+0x10c/0x1c0 [ 26.158595] __kasan_check_write+0x18/0x20 [ 26.158616] _copy_from_user+0x32/0x90 [ 26.158640] copy_user_test_oob+0x2be/0x10f0 [ 26.158678] ? __pfx_copy_user_test_oob+0x10/0x10 [ 26.158713] ? finish_task_switch.isra.0+0x153/0x700 [ 26.158748] ? __switch_to+0x47/0xf50 [ 26.158798] ? __schedule+0x10cc/0x2b60 [ 26.159011] ? __pfx_read_tsc+0x10/0x10 [ 26.159090] ? ktime_get_ts64+0x86/0x230 [ 26.159146] kunit_try_run_case+0x1a5/0x480 [ 26.159194] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.159237] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 26.159285] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 26.159323] ? __kthread_parkme+0x82/0x180 [ 26.159356] ? preempt_count_sub+0x50/0x80 [ 26.159560] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.159588] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.159611] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 26.159632] kthread+0x337/0x6f0 [ 26.159649] ? trace_preempt_on+0x20/0xc0 [ 26.159671] ? __pfx_kthread+0x10/0x10 [ 26.159689] ? _raw_spin_unlock_irq+0x47/0x80 [ 26.159708] ? calculate_sigpending+0x7b/0xa0 [ 26.159729] ? __pfx_kthread+0x10/0x10 [ 26.159748] ret_from_fork+0x116/0x1d0 [ 26.159764] ? __pfx_kthread+0x10/0x10 [ 26.159782] ret_from_fork_asm+0x1a/0x30 [ 26.159810] </TASK> [ 26.159824] [ 26.171990] Allocated by task 314: [ 26.172225] kasan_save_stack+0x45/0x70 [ 26.172537] kasan_save_track+0x18/0x40 [ 26.172715] kasan_save_alloc_info+0x3b/0x50 [ 26.173094] __kasan_kmalloc+0xb7/0xc0 [ 26.173601] __kmalloc_noprof+0x1c9/0x500 [ 26.173932] kunit_kmalloc_array+0x25/0x60 [ 26.174348] copy_user_test_oob+0xab/0x10f0 [ 26.174767] kunit_try_run_case+0x1a5/0x480 [ 26.175065] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.175322] kthread+0x337/0x6f0 [ 26.175677] ret_from_fork+0x116/0x1d0 [ 26.176333] ret_from_fork_asm+0x1a/0x30 [ 26.176701] [ 26.176997] The buggy address belongs to the object at ffff888102c14900 [ 26.176997] which belongs to the cache kmalloc-128 of size 128 [ 26.177658] The buggy address is located 0 bytes inside of [ 26.177658] allocated 120-byte region [ffff888102c14900, ffff888102c14978) [ 26.178657] [ 26.178872] The buggy address belongs to the physical page: [ 26.179353] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102c14 [ 26.180173] flags: 0x200000000000000(node=0|zone=2) [ 26.180669] page_type: f5(slab) [ 26.181027] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 26.181583] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 26.182049] page dumped because: kasan: bad access detected [ 26.182494] [ 26.182686] Memory state around the buggy address: [ 26.183066] ffff888102c14800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.183538] ffff888102c14880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.184050] >ffff888102c14900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 26.184494] ^ [ 26.184954] ffff888102c14980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.185175] ffff888102c14a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.185692] ==================================================================