]> git.baikalelectronics.ru Git - kernel.git/commit
x86/signal: Use fpu::__state_user_size for sigalt stack validation
authorThomas Gleixner <tglx@linutronix.de>
Thu, 21 Oct 2021 22:55:12 +0000 (15:55 -0700)
committerBorislav Petkov <bp@suse.de>
Tue, 26 Oct 2021 08:18:09 +0000 (10:18 +0200)
commit9216d39b080b28f0dee86c1fb96cffe199868689
treef6a57508f14ddcbe80104396373f99cd8df55a2e
parent80c2099a80853648f6c076cd89aebae49d09d3e5
x86/signal: Use fpu::__state_user_size for sigalt stack validation

Use the current->group_leader->fpu to check for pending permissions to use
extended features and validate against the resulting user space size which
is stored in the group leaders fpu struct as well.

This prevents a task from installing a too small sized sigaltstack after
permissions to use dynamically enabled features have been granted, but
the task has not (yet) used a related instruction.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211021225527.10184-9-chang.seok.bae@intel.com
arch/x86/kernel/signal.c