Date
June 3, 2025, 7:38 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 19.814114] ================================================================== [ 19.814477] BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x3c/0x70 [ 19.814669] Read of size 121 at addr ffff888103341c00 by task kunit_try_catch/302 [ 19.814989] [ 19.815190] CPU: 1 UID: 0 PID: 302 Comm: kunit_try_catch Tainted: G B N 6.15.0-next-20250603 #1 PREEMPT(voluntary) [ 19.815255] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.815271] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 19.815298] Call Trace: [ 19.815325] <TASK> [ 19.815362] dump_stack_lvl+0x73/0xb0 [ 19.815416] print_report+0xd1/0x650 [ 19.815445] ? __virt_addr_valid+0x1db/0x2d0 [ 19.815490] ? _copy_to_user+0x3c/0x70 [ 19.815515] ? kasan_complete_mode_report_info+0x2a/0x200 [ 19.815541] ? _copy_to_user+0x3c/0x70 [ 19.815579] kasan_report+0x141/0x180 [ 19.815605] ? _copy_to_user+0x3c/0x70 [ 19.815647] kasan_check_range+0x10c/0x1c0 [ 19.815675] __kasan_check_read+0x15/0x20 [ 19.815707] _copy_to_user+0x3c/0x70 [ 19.815736] copy_user_test_oob+0x364/0x10f0 [ 19.815766] ? __pfx_copy_user_test_oob+0x10/0x10 [ 19.815805] ? finish_task_switch.isra.0+0x153/0x700 [ 19.815833] ? __switch_to+0x47/0xf50 [ 19.815862] ? __schedule+0x10cc/0x2b60 [ 19.815889] ? __pfx_read_tsc+0x10/0x10 [ 19.815913] ? ktime_get_ts64+0x86/0x230 [ 19.815942] kunit_try_run_case+0x1a5/0x480 [ 19.815967] ? __pfx_kunit_try_run_case+0x10/0x10 [ 19.815990] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 19.816018] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 19.816045] ? __kthread_parkme+0x82/0x180 [ 19.816069] ? preempt_count_sub+0x50/0x80 [ 19.816095] ? __pfx_kunit_try_run_case+0x10/0x10 [ 19.816121] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 19.816147] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 19.816189] kthread+0x337/0x6f0 [ 19.816212] ? trace_preempt_on+0x20/0xc0 [ 19.816252] ? __pfx_kthread+0x10/0x10 [ 19.816277] ? _raw_spin_unlock_irq+0x47/0x80 [ 19.816333] ? calculate_sigpending+0x7b/0xa0 [ 19.816362] ? __pfx_kthread+0x10/0x10 [ 19.816388] ret_from_fork+0x116/0x1d0 [ 19.816410] ? __pfx_kthread+0x10/0x10 [ 19.816435] ret_from_fork_asm+0x1a/0x30 [ 19.816487] </TASK> [ 19.816503] [ 19.823412] Allocated by task 302: [ 19.823729] kasan_save_stack+0x45/0x70 [ 19.824040] kasan_save_track+0x18/0x40 [ 19.824379] kasan_save_alloc_info+0x3b/0x50 [ 19.824511] __kasan_kmalloc+0xb7/0xc0 [ 19.824620] __kmalloc_noprof+0x1c9/0x500 [ 19.824729] kunit_kmalloc_array+0x25/0x60 [ 19.824929] copy_user_test_oob+0xab/0x10f0 [ 19.825265] kunit_try_run_case+0x1a5/0x480 [ 19.825613] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 19.826030] kthread+0x337/0x6f0 [ 19.826277] ret_from_fork+0x116/0x1d0 [ 19.826489] ret_from_fork_asm+0x1a/0x30 [ 19.826718] [ 19.826886] The buggy address belongs to the object at ffff888103341c00 [ 19.826886] which belongs to the cache kmalloc-128 of size 128 [ 19.827686] The buggy address is located 0 bytes inside of [ 19.827686] allocated 120-byte region [ffff888103341c00, ffff888103341c78) [ 19.827943] [ 19.828012] The buggy address belongs to the physical page: [ 19.828219] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103341 [ 19.828808] flags: 0x200000000000000(node=0|zone=2) [ 19.829371] page_type: f5(slab) [ 19.829650] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 19.829956] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 19.830311] page dumped because: kasan: bad access detected [ 19.830444] [ 19.830521] Memory state around the buggy address: [ 19.830645] ffff888103341b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.831060] ffff888103341b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.831822] >ffff888103341c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 19.832178] ^ [ 19.832586] ffff888103341c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.832907] ffff888103341d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.833259] ==================================================================