All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Reject setting system segments from userspace
@ 2023-12-13 16:34 Brian Gerst
  2023-12-13 16:34 ` [PATCH 1/3] x86: Move TSS and LDT to end of the GDT Brian Gerst
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Brian Gerst @ 2023-12-13 16:34 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: Ingo Molnar, Thomas Gleixner, Borislav Petkov, H . Peter Anvin,
	Peter Zijlstra, Linus Torvalds, Brian Gerst

Michal noted[1] that on systems that support UMIP, the instruction
decoder can be tricked into leaking the address of the TSS or LDT by
using ptrace to set the SS segment to a system segment index.  Prevent
this from happening by rejecting attempts to use a system segment in the
ptrace and sigreturn syscalls.

[1] https://lore.kernel.org/lkml/20231206004654.2986026-1-mhal@rbox.co/

Brian Gerst (3):
  x86: Move TSS and LDT to end of the GDT
  x86/ptrace: Reject system segements
  x86/sigreturn: Reject system segements

 arch/x86/include/asm/segment.h | 44 ++++++++++++++++++++++++----------
 arch/x86/kernel/ptrace.c       | 12 ++--------
 arch/x86/kernel/signal_32.c    |  4 ++++
 arch/x86/kernel/signal_64.c    |  4 ++++
 4 files changed, 42 insertions(+), 22 deletions(-)


base-commit: 3d626e0a7be7ddb635791fee18cb40631bc1d0b3
-- 
2.43.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-12-18  8:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13 16:34 [PATCH 0/3] Reject setting system segments from userspace Brian Gerst
2023-12-13 16:34 ` [PATCH 1/3] x86: Move TSS and LDT to end of the GDT Brian Gerst
2023-12-13 18:51   ` Linus Torvalds
2023-12-13 19:08     ` Linus Torvalds
2023-12-16 18:24       ` Vegard Nossum
2023-12-16 18:40         ` Linus Torvalds
2023-12-17 21:09     ` H. Peter Anvin
2023-12-13 16:34 ` [PATCH 2/3] x86/ptrace: Reject system segements Brian Gerst
2023-12-13 16:34 ` [PATCH 3/3] x86/sigreturn: " Brian Gerst
2023-12-13 18:54   ` Linus Torvalds
2023-12-17 21:07     ` H. Peter Anvin
2023-12-17 21:40       ` Linus Torvalds
2023-12-17 21:45         ` H. Peter Anvin
2023-12-18  8:31           ` Li, Xin3

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.