Date
May 12, 2025, 6:12 p.m.
Environment | |
---|---|
qemu-x86_64 |
[ 16.268205] ================================================================== [ 16.268587] BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x4a/0x70 [ 16.268927] Read of size 121 at addr ffff888102adde00 by task kunit_try_catch/293 [ 16.269284] [ 16.269384] CPU: 0 UID: 0 PID: 293 Comm: kunit_try_catch Tainted: G B N 6.14.7-rc1 #1 [ 16.269433] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.269447] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 16.269470] Call Trace: [ 16.269492] <TASK> [ 16.269515] dump_stack_lvl+0x73/0xb0 [ 16.269544] print_report+0xd1/0x650 [ 16.269568] ? __virt_addr_valid+0x1db/0x2d0 [ 16.269591] ? _copy_to_user+0x4a/0x70 [ 16.269612] ? kasan_complete_mode_report_info+0x2a/0x200 [ 16.269639] ? _copy_to_user+0x4a/0x70 [ 16.269660] kasan_report+0x140/0x180 [ 16.269682] ? _copy_to_user+0x4a/0x70 [ 16.269707] kasan_check_range+0x10c/0x1c0 [ 16.269732] __kasan_check_read+0x15/0x20 [ 16.269761] _copy_to_user+0x4a/0x70 [ 16.269783] copy_user_test_oob+0x365/0x10f0 [ 16.269809] ? __pfx_copy_user_test_oob+0x10/0x10 [ 16.269832] ? finish_task_switch.isra.0+0x153/0x700 [ 16.269868] ? __switch_to+0x5d9/0xf60 [ 16.269896] ? __schedule+0xce8/0x2840 [ 16.269923] ? __pfx_read_tsc+0x10/0x10 [ 16.269946] ? ktime_get_ts64+0x86/0x230 [ 16.269973] kunit_try_run_case+0x1a6/0x480 [ 16.269997] ? __pfx_kunit_try_run_case+0x10/0x10 [ 16.270019] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 16.270041] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 16.270067] ? __kthread_parkme+0x82/0x160 [ 16.270092] ? preempt_count_sub+0x50/0x80 [ 16.270116] ? __pfx_kunit_try_run_case+0x10/0x10 [ 16.270140] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.270167] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 16.270194] kthread+0x324/0x6e0 [ 16.270216] ? trace_preempt_on+0x20/0xc0 [ 16.270241] ? __pfx_kthread+0x10/0x10 [ 16.270264] ? _raw_spin_unlock_irq+0x47/0x80 [ 16.270304] ? calculate_sigpending+0x7b/0xa0 [ 16.270329] ? __pfx_kthread+0x10/0x10 [ 16.270353] ret_from_fork+0x41/0x80 [ 16.270373] ? __pfx_kthread+0x10/0x10 [ 16.270396] ret_from_fork_asm+0x1a/0x30 [ 16.270429] </TASK> [ 16.270442] [ 16.277447] Allocated by task 293: [ 16.277632] kasan_save_stack+0x45/0x70 [ 16.277854] kasan_save_track+0x18/0x40 [ 16.278057] kasan_save_alloc_info+0x3b/0x50 [ 16.278280] __kasan_kmalloc+0xb7/0xc0 [ 16.278460] __kmalloc_noprof+0x1ca/0x500 [ 16.278603] kunit_kmalloc_array+0x25/0x60 [ 16.278811] copy_user_test_oob+0xac/0x10f0 [ 16.279029] kunit_try_run_case+0x1a6/0x480 [ 16.279244] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.279468] kthread+0x324/0x6e0 [ 16.279642] ret_from_fork+0x41/0x80 [ 16.279810] ret_from_fork_asm+0x1a/0x30 [ 16.280012] [ 16.280141] The buggy address belongs to the object at ffff888102adde00 [ 16.280141] which belongs to the cache kmalloc-128 of size 128 [ 16.280591] The buggy address is located 0 bytes inside of [ 16.280591] allocated 120-byte region [ffff888102adde00, ffff888102adde78) [ 16.281058] [ 16.281157] The buggy address belongs to the physical page: [ 16.281402] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102add [ 16.281738] flags: 0x200000000000000(node=0|zone=2) [ 16.281935] page_type: f5(slab) [ 16.282159] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 16.282471] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 16.282762] page dumped because: kasan: bad access detected [ 16.283009] [ 16.283128] Memory state around the buggy address: [ 16.283323] ffff888102addd00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 16.283605] ffff888102addd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.283891] >ffff888102adde00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 16.284167] ^ [ 16.284384] ffff888102adde80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.284602] ffff888102addf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.284816] ==================================================================