Browse Source

In the incredibly unbelievable circumstance where _rs_init() fails to

allocate pages, don't call abort() because of corefile data leakage
concerns, but simply _exit().  The reasoning is _rs_init() will only
fail if someone finds a way to apply specific pressure against this
failure point, for the purpose of leaking information into a core which
they can read.  We don't need a corefile in this instance to debug that.
So take this "lever" away from whoever in the future wants to do that.
OPENBSD_6_5
deraadt 5 years ago
parent
commit
211859f890
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/lib/libc/crypt/arc4random.c

+ 2
- 2
src/lib/libc/crypt/arc4random.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: arc4random.c,v 1.54 2015/09/13 08:31:47 guenther Exp $ */
/* $OpenBSD: arc4random.c,v 1.55 2019/03/24 17:56:54 deraadt Exp $ */
/* /*
* Copyright (c) 1996, David Mazieres <dm@uun.org> * Copyright (c) 1996, David Mazieres <dm@uun.org>
@ -75,7 +75,7 @@ _rs_init(u_char *buf, size_t n)
if (rs == NULL) { if (rs == NULL) {
if (_rs_allocate(&rs, &rsx) == -1) if (_rs_allocate(&rs, &rsx) == -1)
abort();
_exit(1);
} }
chacha_keysetup(&rsx->rs_chacha, buf, KEYSZ * 8, 0); chacha_keysetup(&rsx->rs_chacha, buf, KEYSZ * 8, 0);


Loading…
Cancel
Save