Re: [patch V3 12/66] x86/fpu: Reject invalid MXCSR values in copy_kernel_to_xstate()

From: Borislav Petkov
Date: Mon Jun 21 2021 - 06:01:17 EST


On Fri, Jun 18, 2021 at 04:18:35PM +0200, Thomas Gleixner wrote:
> Instead of masking out reserved bits, check them and reject the provided
> state as invalid if not zero.
>
> Suggested-by: Andy Lutomirski <luto@xxxxxxxxxx>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> ---
> V3: Validate MXCSR when FP|SSE|YMM are set. The quirk check is only
> correct for the copy function.
> V2: New patch
> ---
> arch/x86/kernel/fpu/xstate.c | 19 ++++++++++++++++---
> 1 file changed, 16 insertions(+), 3 deletions(-)

Reviewed-by: Borislav Petkov <bp@xxxxxxx>

--
Regards/Gruss,
Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg