Date
July 24, 2025, 4:41 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 31.108663] ================================================================== [ 31.109149] BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x3c/0x70 [ 31.109530] Read of size 121 at addr ffff888105635400 by task kunit_try_catch/333 [ 31.109870] [ 31.110000] 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.110071] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 31.110088] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 31.110112] Call Trace: [ 31.110126] <TASK> [ 31.110161] dump_stack_lvl+0x73/0xb0 [ 31.110218] print_report+0xd1/0x640 [ 31.110255] ? __virt_addr_valid+0x1db/0x2d0 [ 31.110281] ? _copy_to_user+0x3c/0x70 [ 31.110317] ? kasan_complete_mode_report_info+0x2a/0x200 [ 31.110343] ? _copy_to_user+0x3c/0x70 [ 31.110364] kasan_report+0x141/0x180 [ 31.110387] ? _copy_to_user+0x3c/0x70 [ 31.110411] kasan_check_range+0x10c/0x1c0 [ 31.110437] __kasan_check_read+0x15/0x20 [ 31.110460] _copy_to_user+0x3c/0x70 [ 31.110481] copy_user_test_oob+0x364/0x10f0 [ 31.110507] ? __pfx_copy_user_test_oob+0x10/0x10 [ 31.110531] ? finish_task_switch.isra.0+0x153/0x700 [ 31.110554] ? __switch_to+0x47/0xf80 [ 31.110590] ? __schedule+0x10da/0x2b60 [ 31.110617] ? __pfx_read_tsc+0x10/0x10 [ 31.110639] ? ktime_get_ts64+0x86/0x230 [ 31.110665] kunit_try_run_case+0x1a5/0x480 [ 31.110720] ? __pfx_kunit_try_run_case+0x10/0x10 [ 31.110744] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 31.110770] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 31.110807] ? __kthread_parkme+0x82/0x180 [ 31.110829] ? preempt_count_sub+0x50/0x80 [ 31.110854] ? __pfx_kunit_try_run_case+0x10/0x10 [ 31.110878] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 31.110902] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 31.110926] kthread+0x337/0x6f0 [ 31.110949] ? trace_preempt_on+0x20/0xc0 [ 31.110974] ? __pfx_kthread+0x10/0x10 [ 31.110996] ? _raw_spin_unlock_irq+0x47/0x80 [ 31.111020] ? calculate_sigpending+0x7b/0xa0 [ 31.111045] ? __pfx_kthread+0x10/0x10 [ 31.111068] ret_from_fork+0x116/0x1d0 [ 31.111088] ? __pfx_kthread+0x10/0x10 [ 31.111110] ret_from_fork_asm+0x1a/0x30 [ 31.111142] </TASK> [ 31.111154] [ 31.119449] Allocated by task 333: [ 31.119682] kasan_save_stack+0x45/0x70 [ 31.119957] kasan_save_track+0x18/0x40 [ 31.120260] kasan_save_alloc_info+0x3b/0x50 [ 31.120451] __kasan_kmalloc+0xb7/0xc0 [ 31.120680] __kmalloc_noprof+0x1ca/0x510 [ 31.120921] kunit_kmalloc_array+0x25/0x60 [ 31.121092] copy_user_test_oob+0xab/0x10f0 [ 31.121231] kunit_try_run_case+0x1a5/0x480 [ 31.121367] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 31.121740] kthread+0x337/0x6f0 [ 31.121917] ret_from_fork+0x116/0x1d0 [ 31.122205] ret_from_fork_asm+0x1a/0x30 [ 31.122441] [ 31.122596] The buggy address belongs to the object at ffff888105635400 [ 31.122596] which belongs to the cache kmalloc-128 of size 128 [ 31.123457] The buggy address is located 0 bytes inside of [ 31.123457] allocated 120-byte region [ffff888105635400, ffff888105635478) [ 31.123878] [ 31.123970] The buggy address belongs to the physical page: [ 31.124205] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105635 [ 31.124534] flags: 0x200000000000000(node=0|zone=2) [ 31.124702] page_type: f5(slab) [ 31.124973] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 31.125393] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 31.125767] page dumped because: kasan: bad access detected [ 31.126038] [ 31.126148] Memory state around the buggy address: [ 31.126298] ffff888105635300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.126592] ffff888105635380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.126930] >ffff888105635400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 31.127362] ^ [ 31.127770] ffff888105635480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.128103] ffff888105635500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.128534] ==================================================================