diff options
author | 2020-02-02 18:55:46 +0000 | |
---|---|---|
committer | 2020-02-02 18:55:46 +0000 | |
commit | 0c8b720f3156f1cb14de3a0c8a95857c1f73e0f8 (patch) | |
tree | b9a469c2465c08f9c08b21d6168970b30bcfc77a | |
parent | Back out previous "insert two nop instructions after svc instructions (diff) | |
download | wireguard-openbsd-0c8b720f3156f1cb14de3a0c8a95857c1f73e0f8.tar.xz wireguard-openbsd-0c8b720f3156f1cb14de3a0c8a95857c1f73e0f8.zip |
Reapply post-svc-sled in a repaired fashion. The SYS_sigreturn-related
sigcoderet label must point directly after the svc instruction, because the
sigreturn() checks it as SROP mitigation, so place the sled after the label.
tested by naddy
-rw-r--r-- | sys/arch/arm64/arm64/locore.S | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/arm64/arm64/locore.S b/sys/arch/arm64/arm64/locore.S index 1b6e90dfe06..849604ece00 100644 --- a/sys/arch/arm64/arm64/locore.S +++ b/sys/arch/arm64/arm64/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.27 2020/02/02 18:01:39 naddy Exp $ */ +/* $OpenBSD: locore.S,v 1.28 2020/02/02 18:55:46 deraadt Exp $ */ /*- * Copyright (c) 2012-2014 Andrew Turner * All rights reserved. @@ -349,10 +349,14 @@ _C_LABEL(sigcode): svc 0 .globl _C_LABEL(sigcoderet) _C_LABEL(sigcoderet): + nop + nop /* sigreturn failed, exit */ mov x8, #SYS_exit svc 0 + nop + nop b 1b END(sigcode) |