diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/arc4random/arc4random_linux.h | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/crypto/arc4random_linux.h | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/libcrypto/arc4random/arc4random_linux.h b/src/lib/libcrypto/arc4random/arc4random_linux.h index 3296fdeca1..303deb5786 100644 --- a/src/lib/libcrypto/arc4random/arc4random_linux.h +++ b/src/lib/libcrypto/arc4random/arc4random_linux.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: arc4random_linux.h,v 1.9 2015/01/15 06:57:18 deraadt Exp $ */ | 1 | /* $OpenBSD: arc4random_linux.h,v 1.10 2016/01/04 02:04:56 bcook Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> |
@@ -60,7 +60,8 @@ _rs_forkdetect(void) | |||
60 | static pid_t _rs_pid = 0; | 60 | static pid_t _rs_pid = 0; |
61 | pid_t pid = getpid(); | 61 | pid_t pid = getpid(); |
62 | 62 | ||
63 | if (_rs_pid == 0 || _rs_pid != pid || _rs_forked) { | 63 | /* XXX unusual calls to clone() can bypass checks */ |
64 | if (_rs_pid == 0 || _rs_pid == 1 || _rs_pid != pid || _rs_forked) { | ||
64 | _rs_pid = pid; | 65 | _rs_pid = pid; |
65 | _rs_forked = 0; | 66 | _rs_forked = 0; |
66 | if (rs) | 67 | if (rs) |
diff --git a/src/lib/libcrypto/crypto/arc4random_linux.h b/src/lib/libcrypto/crypto/arc4random_linux.h index 3296fdeca1..303deb5786 100644 --- a/src/lib/libcrypto/crypto/arc4random_linux.h +++ b/src/lib/libcrypto/crypto/arc4random_linux.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: arc4random_linux.h,v 1.9 2015/01/15 06:57:18 deraadt Exp $ */ | 1 | /* $OpenBSD: arc4random_linux.h,v 1.10 2016/01/04 02:04:56 bcook Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> |
@@ -60,7 +60,8 @@ _rs_forkdetect(void) | |||
60 | static pid_t _rs_pid = 0; | 60 | static pid_t _rs_pid = 0; |
61 | pid_t pid = getpid(); | 61 | pid_t pid = getpid(); |
62 | 62 | ||
63 | if (_rs_pid == 0 || _rs_pid != pid || _rs_forked) { | 63 | /* XXX unusual calls to clone() can bypass checks */ |
64 | if (_rs_pid == 0 || _rs_pid == 1 || _rs_pid != pid || _rs_forked) { | ||
64 | _rs_pid = pid; | 65 | _rs_pid = pid; |
65 | _rs_forked = 0; | 66 | _rs_forked = 0; |
66 | if (rs) | 67 | if (rs) |