Commit 01a8c586 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Yang Yingliang
Browse files

x86/fpu: Limit xstate copy size in xstateregs_set()



stable inclusion
from linux-4.19.198
commit fecb9b7b06ee288103f0f687b57cb033c96c54ca

--------------------------------

[ Upstream commit 07d6688b ]

If the count argument is larger than the xstate size, this will happily
copy beyond the end of xstate.

Fixes: 91c3dba7 ("x86/fpu/xstate: Fix PTRACE frames for XSAVES")
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Reviewed-by: default avatarAndy Lutomirski <luto@kernel.org>
Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210623121452.120741557@linutronix.de


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent d0c60a4e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment