Skip to content

Reject setting system segments from userspace

Brian Gerst lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3x86: Move TSS and LDT to end of the GDTarch/x86/include/asm/segment.h+21 -125 replies
2/3x86/ptrace: Reject system segementsarch/x86/include/asm/segment.h arch/x86/kernel/ptrace.c+13 -100 replies
3/3x86/sigreturn: Reject system segementsarch/x86/kernel/signal_32.c arch/x86/kernel/signal_64.c+8 -05 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Reject setting system segments from userspace

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/[email protected]/

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

Signature · 1 line
2.43.0