Date
March 19, 2025, 10:35 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 28.900051] ================================================================== [ 28.900811] BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x4a/0x70 [ 28.901558] Read of size 121 at addr ffff88810305ae00 by task kunit_try_catch/306 [ 28.902458] [ 28.902801] CPU: 0 UID: 0 PID: 306 Comm: kunit_try_catch Tainted: G B N 6.14.0-rc7-next-20250319 #1 PREEMPT(voluntary) [ 28.902962] Tainted: [B]=BAD_PAGE, [N]=TEST [ 28.903057] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 28.903159] Call Trace: [ 28.903199] <TASK> [ 28.903238] dump_stack_lvl+0x73/0xb0 [ 28.903318] print_report+0xd1/0x660 [ 28.903384] ? __virt_addr_valid+0x1db/0x2d0 [ 28.903628] ? kasan_complete_mode_report_info+0x2a/0x200 [ 28.903714] kasan_report+0x104/0x140 [ 28.903810] ? _copy_to_user+0x4a/0x70 [ 28.903940] ? _copy_to_user+0x4a/0x70 [ 28.904077] kasan_check_range+0x10c/0x1c0 [ 28.904196] __kasan_check_read+0x15/0x20 [ 28.904345] _copy_to_user+0x4a/0x70 [ 28.904497] copy_user_test_oob+0x364/0x1130 [ 28.904643] ? __pfx_copy_user_test_oob+0x10/0x10 [ 28.904790] ? finish_task_switch.isra.0+0x153/0x730 [ 28.904894] ? __switch_to+0x5d9/0xf70 [ 28.904975] ? __schedule+0xd46/0x29c0 [ 28.905013] ? __pfx_read_tsc+0x10/0x10 [ 28.905046] ? ktime_get_ts64+0x86/0x240 [ 28.905087] kunit_try_run_case+0x1b2/0x490 [ 28.905146] ? __pfx_kunit_try_run_case+0x10/0x10 [ 28.905182] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 28.905216] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 28.905250] ? __kthread_parkme+0x82/0x160 [ 28.905283] ? preempt_count_sub+0x50/0x80 [ 28.905320] ? __pfx_kunit_try_run_case+0x10/0x10 [ 28.905357] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 28.905393] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 28.905428] kthread+0x323/0x710 [ 28.905460] ? trace_preempt_on+0x20/0xc0 [ 28.905495] ? __pfx_kthread+0x10/0x10 [ 28.905528] ? _raw_spin_unlock_irq+0x47/0x80 [ 28.905559] ? calculate_sigpending+0x7b/0xa0 [ 28.905592] ? __pfx_kthread+0x10/0x10 [ 28.905626] ret_from_fork+0x41/0x80 [ 28.905659] ? __pfx_kthread+0x10/0x10 [ 28.905692] ret_from_fork_asm+0x1a/0x30 [ 28.905777] </TASK> [ 28.905797] [ 28.919705] Allocated by task 306: [ 28.920171] kasan_save_stack+0x3d/0x60 [ 28.920520] kasan_save_track+0x18/0x40 [ 28.921043] kasan_save_alloc_info+0x3b/0x50 [ 28.921551] __kasan_kmalloc+0xb7/0xc0 [ 28.921900] __kmalloc_noprof+0x1c3/0x500 [ 28.922356] kunit_kmalloc_array+0x25/0x60 [ 28.922725] copy_user_test_oob+0xab/0x1130 [ 28.924037] kunit_try_run_case+0x1b2/0x490 [ 28.925159] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 28.925671] kthread+0x323/0x710 [ 28.927496] ret_from_fork+0x41/0x80 [ 28.929210] ret_from_fork_asm+0x1a/0x30 [ 28.929933] [ 28.930135] The buggy address belongs to the object at ffff88810305ae00 [ 28.930135] which belongs to the cache kmalloc-128 of size 128 [ 28.931352] The buggy address is located 0 bytes inside of [ 28.931352] allocated 120-byte region [ffff88810305ae00, ffff88810305ae78) [ 28.932492] [ 28.932826] The buggy address belongs to the physical page: [ 28.933369] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10305a [ 28.934068] flags: 0x200000000000000(node=0|zone=2) [ 28.934656] page_type: f5(slab) [ 28.935153] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 28.935835] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 28.936361] page dumped because: kasan: bad access detected [ 28.936952] [ 28.937165] Memory state around the buggy address: [ 28.937627] ffff88810305ad00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.938177] ffff88810305ad80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.938889] >ffff88810305ae00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 28.939489] ^ [ 28.940098] ffff88810305ae80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.940666] ffff88810305af00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.941318] ==================================================================