• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Farhan/openssh


Commit MetaInfo

Revision7d4e4745a7dbe29f6c737ee62a36771ede20d09e (tree)
Time2015-11-17 03:14:54
AuthorGreg Hartman <ghartman@goog...>
CommiterGreg Hartman

Log Message

makes certain libcrypto implementations cache a /dev/urandom fd
in preparation of sandboxing.

Upstream patch is:

https://anongit.mindrot.org/openssh.git/patch/?id=07889c75926c040b8e095949c724e66af26441cb

BUG=25695426

Change-Id: I0f746c30e31e7d938c70bcebe402f472c4649919

Change Summary

Incremental Difference

--- a/sshd.c
+++ b/sshd.c
@@ -623,6 +623,8 @@ privsep_preauth_child(void)
623623 arc4random_buf(rnd, sizeof(rnd));
624624 #ifdef WITH_OPENSSL
625625 RAND_seed(rnd, sizeof(rnd));
626+ if ((RAND_bytes((u_char *)rnd, 1)) != 1)
627+ fatal("%s: RAND_bytes failed", __func__);
626628 #endif
627629 explicit_bzero(rnd, sizeof(rnd));
628630
@@ -766,6 +768,8 @@ privsep_postauth(Authctxt *authctxt)
766768 arc4random_buf(rnd, sizeof(rnd));
767769 #ifdef WITH_OPENSSL
768770 RAND_seed(rnd, sizeof(rnd));
771+ if ((RAND_bytes((u_char *)rnd, 1)) != 1)
772+ fatal("%s: RAND_bytes failed", __func__);
769773 #endif
770774 explicit_bzero(rnd, sizeof(rnd));
771775
@@ -1430,6 +1434,8 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
14301434 arc4random_buf(rnd, sizeof(rnd));
14311435 #ifdef WITH_OPENSSL
14321436 RAND_seed(rnd, sizeof(rnd));
1437+ if ((RAND_bytes((u_char *)rnd, 1)) != 1)
1438+ fatal("%s: RAND_bytes failed", __func__);
14331439 #endif
14341440 explicit_bzero(rnd, sizeof(rnd));
14351441 }