Date
July 24, 2025, 4:41 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 31.074156] ================================================================== [ 31.075464] BUG: KASAN: slab-out-of-bounds in _copy_from_user+0x32/0x90 [ 31.076335] Write of size 121 at addr ffff888105635400 by task kunit_try_catch/333 [ 31.077045] [ 31.077339] CPU: 0 UID: 0 PID: 333 Comm: kunit_try_catch Tainted: G B W N 6.16.0-rc7-next-20250724 #1 PREEMPT(voluntary) [ 31.077407] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 31.077423] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 31.077559] Call Trace: [ 31.077588] <TASK> [ 31.077614] dump_stack_lvl+0x73/0xb0 [ 31.077655] print_report+0xd1/0x640 [ 31.077683] ? __virt_addr_valid+0x1db/0x2d0 [ 31.077741] ? _copy_from_user+0x32/0x90 [ 31.077792] ? kasan_complete_mode_report_info+0x2a/0x200 [ 31.077819] ? _copy_from_user+0x32/0x90 [ 31.077839] kasan_report+0x141/0x180 [ 31.077863] ? _copy_from_user+0x32/0x90 [ 31.077887] kasan_check_range+0x10c/0x1c0 [ 31.077917] __kasan_check_write+0x18/0x20 [ 31.077942] _copy_from_user+0x32/0x90 [ 31.077963] copy_user_test_oob+0x2be/0x10f0 [ 31.077992] ? __pfx_copy_user_test_oob+0x10/0x10 [ 31.078016] ? finish_task_switch.isra.0+0x153/0x700 [ 31.078040] ? __switch_to+0x47/0xf80 [ 31.078069] ? __schedule+0x10da/0x2b60 [ 31.078096] ? __pfx_read_tsc+0x10/0x10 [ 31.078119] ? ktime_get_ts64+0x86/0x230 [ 31.078147] kunit_try_run_case+0x1a5/0x480 [ 31.078172] ? __pfx_kunit_try_run_case+0x10/0x10 [ 31.078195] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 31.078221] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 31.078248] ? __kthread_parkme+0x82/0x180 [ 31.078269] ? preempt_count_sub+0x50/0x80 [ 31.078293] ? __pfx_kunit_try_run_case+0x10/0x10 [ 31.078318] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 31.078343] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 31.078367] kthread+0x337/0x6f0 [ 31.078388] ? trace_preempt_on+0x20/0xc0 [ 31.078414] ? __pfx_kthread+0x10/0x10 [ 31.078435] ? _raw_spin_unlock_irq+0x47/0x80 [ 31.078460] ? calculate_sigpending+0x7b/0xa0 [ 31.078485] ? __pfx_kthread+0x10/0x10 [ 31.078507] ret_from_fork+0x116/0x1d0 [ 31.078528] ? __pfx_kthread+0x10/0x10 [ 31.078549] ret_from_fork_asm+0x1a/0x30 [ 31.078591] </TASK> [ 31.078615] [ 31.092431] Allocated by task 333: [ 31.092611] kasan_save_stack+0x45/0x70 [ 31.092898] kasan_save_track+0x18/0x40 [ 31.093598] kasan_save_alloc_info+0x3b/0x50 [ 31.094132] __kasan_kmalloc+0xb7/0xc0 [ 31.094295] __kmalloc_noprof+0x1ca/0x510 [ 31.094475] kunit_kmalloc_array+0x25/0x60 [ 31.094679] copy_user_test_oob+0xab/0x10f0 [ 31.094908] kunit_try_run_case+0x1a5/0x480 [ 31.095373] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 31.095796] kthread+0x337/0x6f0 [ 31.096114] ret_from_fork+0x116/0x1d0 [ 31.096264] ret_from_fork_asm+0x1a/0x30 [ 31.096680] [ 31.096781] The buggy address belongs to the object at ffff888105635400 [ 31.096781] which belongs to the cache kmalloc-128 of size 128 [ 31.097502] The buggy address is located 0 bytes inside of [ 31.097502] allocated 120-byte region [ffff888105635400, ffff888105635478) [ 31.098475] [ 31.098764] The buggy address belongs to the physical page: [ 31.099181] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105635 [ 31.099831] flags: 0x200000000000000(node=0|zone=2) [ 31.100003] page_type: f5(slab) [ 31.100171] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 31.100618] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 31.101212] page dumped because: kasan: bad access detected [ 31.101565] [ 31.101678] Memory state around the buggy address: [ 31.101965] ffff888105635300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.102461] ffff888105635380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.102911] >ffff888105635400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 31.103212] ^ [ 31.103673] ffff888105635480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.104159] ffff888105635500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.104567] ==================================================================