diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-05-11 17:59:59 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-05-11 17:59:59 +0000 |
commit | a77a47c2b34d9910418f91c7eb9f5e822ac75878 (patch) | |
tree | 6f2ee985bda5448a0fbddf02489239caa51abbfe /sys | |
parent | 8918d07b11cb6179ace1211306e77f55ff2cf88a (diff) |
Add the sigcontext cookie clearing block, which was missed in the previous
commit.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/alpha/alpha/machdep.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c index 944ae9705e7..97c12d9ba81 100644 --- a/sys/arch/alpha/alpha/machdep.c +++ b/sys/arch/alpha/alpha/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.172 2016/05/10 18:39:40 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.173 2016/05/11 17:59:58 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */ /*- @@ -1570,6 +1570,12 @@ sys_sigreturn(p, v, retval) return (EFAULT); } + /* Prevent reuse of the sigcontext cookie */ + ksc.sc_cookie = 0; + (void)copyout(&ksc.sc_cookie, (caddr_t)scp + + offsetof(struct sigcontext, sc_cookie), + sizeof (ksc.sc_cookie)); + if (ksc.sc_regs[R_ZERO] != 0xACEDBADE) /* magic number */ return (EINVAL); /* |