summaryrefslogtreecommitdiff
path: root/sys/arch/sh/include
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2016-05-10 18:39:54 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2016-05-10 18:39:54 +0000
commit869ce5a1007a9d00bbac5121d825c80be70f9dde (patch)
tree26cd16954837176d7032fd1841853c34c5b32f99 /sys/arch/sh/include
parent24ed245ec22671d3d288d52c91f39a81a24637bf (diff)
SROP mitigation. sendsig() stores a (per-process ^ &sigcontext) cookie
inside the sigcontext. sigreturn(2) checks syscall entry was from the exact PC addr in the (per-process ASLR) sigtramp, verifies the cookie, and clears it to prevent sigcontext reuse. not yet tested on landisk, sparc, *88k, socppc. ok kettenis
Diffstat (limited to 'sys/arch/sh/include')
-rw-r--r--sys/arch/sh/include/signal.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/sh/include/signal.h b/sys/arch/sh/include/signal.h
index e5152d73cf2..24fca36829b 100644
--- a/sys/arch/sh/include/signal.h
+++ b/sys/arch/sh/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.6 2012/12/02 07:03:31 guenther Exp $ */
+/* $OpenBSD: signal.h,v 1.7 2016/05/10 18:39:47 deraadt Exp $ */
/* $NetBSD: signal.h,v 1.12 2005/12/11 12:18:58 christos Exp $ */
/*
@@ -52,12 +52,12 @@ struct sigcontext {
int sc_reg[21];
int sc_fpreg[34];
- int __sc_unused;
+ long sc_cookie;
int sc_expevt; /* XXX should be above */
int sc_err;
- unsigned int sc_mask; /* signal mask to restore */
+ int sc_mask; /* signal mask to restore */
};
#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */