summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2016-09-12 00:54:30 +0000
committerschwarze <schwarze@openbsd.org>2016-09-12 00:54:30 +0000
commitf2a4299fa906908036cdf2fb6a77f5b8da01385c (patch)
treee3569ad88230414bf440a3d98e1eaec8e5a017b2 /lib/libc/sys
parentWhen trying to run an ELF binary marked PT_OPENBSD_WXNEEDED from a (diff)
downloadwireguard-openbsd-f2a4299fa906908036cdf2fb6a77f5b8da01385c.tar.xz
wireguard-openbsd-f2a4299fa906908036cdf2fb6a77f5b8da01385c.zip
document that running a W^X violating binary from file system mounted
without wxallowed causes EACCES
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/execve.213
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2
index 177ac515c4e..8ed94b3e789 100644
--- a/lib/libc/sys/execve.2
+++ b/lib/libc/sys/execve.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: execve.2,v 1.48 2016/03/27 02:07:46 millert Exp $
+.\" $OpenBSD: execve.2,v 1.49 2016/09/12 00:54:30 schwarze Exp $
.\" $NetBSD: execve.2,v 1.9 1995/02/27 12:32:25 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)execve.2 8.3 (Berkeley) 1/24/94
.\"
-.Dd $Mdocdate: March 27 2016 $
+.Dd $Mdocdate: September 12 2016 $
.Dt EXECVE 2
.Os
.Sh NAME
@@ -264,6 +264,15 @@ disabled
.Pf ( Dv MNT_NOEXEC
in
.In sys/mount.h ) .
+.It Bq Er EACCES
+The new process file is marked with
+.Xr ld 1
+.Fl z Cm wxneeded
+to perform W^X violating operations, but it is located on a file
+system not allowing such operations, being mounted without the
+.Xr mount 8
+.Fl o Cm wxallowed
+flag.
.It Bq Er ENOEXEC
The new process file has the appropriate access
permission, but has an invalid magic number in its header.