diff options
author | 2019-01-18 05:06:37 +0000 | |
---|---|---|
committer | 2019-01-18 05:06:37 +0000 | |
commit | 1cd39fe86126b028eee228895c3faa4277e450ac (patch) | |
tree | 05af01c526eaa6c980d66ff80e2cb9926a7352ff /lib/libc/sys | |
parent | adjtime(2), settimeofday(2), clock_settime(2): validate input (diff) | |
download | wireguard-openbsd-1cd39fe86126b028eee228895c3faa4277e450ac.tar.xz wireguard-openbsd-1cd39fe86126b028eee228895c3faa4277e450ac.zip |
futex(2): validate relative timeout before sleeping.
Linux does validation.
Document this new failure case as an EINVAL, like Linux.
"stop waiting" deraadt
Diffstat (limited to 'lib/libc/sys')
-rw-r--r-- | lib/libc/sys/futex.2 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libc/sys/futex.2 b/lib/libc/sys/futex.2 index 1fc2d080a95..6dfc12f0617 100644 --- a/lib/libc/sys/futex.2 +++ b/lib/libc/sys/futex.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: futex.2,v 1.4 2018/04/24 17:19:35 pirofti Exp $ +.\" $OpenBSD: futex.2,v 1.5 2019/01/18 05:06:37 cheloha Exp $ .\" .\" Copyright (c) 2017 Martin Pieuchot .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: April 24 2018 $ +.Dd $Mdocdate: January 18 2019 $ .Dt FUTEX 2 .Os .Sh NAME @@ -116,6 +116,11 @@ The value pointed to by .Fa uaddr is not the same as the expected value .Fa val . +.It Bq Er EINVAL +The +.Fa timeout +specified a second value less than zero, +or a nanosecond value less than zero or greater than or equal to 1000 million. .It Bq Er ETIMEDOUT The .Fa timeout |