x86/shstk: ban ia32 sigreturn
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | x86/shstk: ban ia32 sigreturn when shadow stack is enabledarch/ | +4 | 8 replies | |
| 2/3 | selftests/x86: test shadow stack sigreturn protectiontools/ | +110 | 0 replies | |
| 3/3 | selftests/x86: skip shstk tests where perf_event_open() failstools/ | +8 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] x86/shstk: ban ia32 sigreturn
User shadow stacks protect only the x64 and x32 rt_sigreturn syscalls. Calling ia32 rt_sigreturn, which lacks return address validation, is still possible via int $0x80. The bypass also requires the executable is mapped into low 32-bit address space. (This scenario is basically impossible to occur in the wild, but it's probably worth fixing nonetheless.)
Since user shadow stacks explicitly only support 64-bit mode, the simplest fix is to fault attempts to do 32-bit rt_sigreturn.
Richard Patel (3):
x86/shstk: ban ia32 sigreturn when shadow stack is enabled selftests/x86: test shadow stack sigreturn protection selftests/x86: skip shstk tests where perf_event_open() fails
arch/x86/kernel/signal_32.c | 4 + .../testing/selftests/x86/test_shadow_stack.c | 120 +++++++++++++++++- 2 files changed, 122 insertions(+), 2 deletions(-)
--
2.52.0