| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
improve the random stream itself (it doesn't), but to introduce
noise in the arc4random calling pattern. Thanks to matthew@ who
pointed out bias in a previous diff, ok deraadt@ matthew@
|
|
|
|
|
| |
mechanism, to aid in portability to other systems as requested.
ok matthew
|
| |
|
|
|
|
| |
artificially constrain alternative implementations. ok deraadt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modern compiler toolchains are capable of optimizing even across
translation unit boundaries, so simply moving the memory clearing into
a separate function is not guaranteed to clear memory.
To avoid this, we take advantage of ELF weak symbol semantics, and
insert a call to an empty, weakly named function. The semantics of
calling this function aren't determinable until load time, so the
compiler and linker need to keep the memset() call.
There are still ways a toolchain might defeat this trick (e.g.,
optimistically expecting the weak symbol to not be overloaded, and
only calling memset() if it is; promoting weak symbols to strong
symbols at link-time when emitting a static binary because they won't
be interposed; implementing load-time optimizations). But at least
for the foreseeable future, these seem unlikely.
ok deraadt
|
|
|
|
|
|
|
| |
Allow other non-zero return values in case we change our mind to
return an ssize_t byte count instead of simple success/fail.
ok deraadt, djm
|
|
|
|
|
|
|
|
|
| |
MAP_INHERIT_ZERO anymore. This restores arc4random's previous
behavior where fork children would mix in some randomness from the
parent process.
New behavior noticed by deraadt
ok deraadt, tedu
|
|
|
|
|
|
|
|
|
|
|
| |
The extra argument doesn't hurt genuine atexit handlers and this fixes a
bug where we didn't provide the argument (effectively passing garbage) for
functions registered with __cxa_atexit in the main executable.
Pointed out by Dmitriy Ivanov <dimitry@google.com> and Elliott Hughes
<enh@google.com>.
ok matthew@
|
|
|
|
|
|
|
|
| |
Now instead of calling getpid() each time a user invokes arc4random(),
we're able to rely on the kernel zero'ing out the RNG state if the
process forks.
ok deraadt, djm
|
| |
|
|
|
|
| |
discussion with matthew
|
|
|
|
| |
of sysctl(). Mark it with XXX while we consider.
|
|
|
|
|
|
| |
They are obsoleted by the RFC3542 api.
ok mpi@
|
|
|
|
|
| |
call abort().
this direction discussed at length with miod beck tedu matthew etc
|
| |
|
|
|
|
| |
ok deraadt, jmc, tedu
|
|
|
|
| |
behavior for certain inputs. From NetBSD. OK tedu@
|
|
|
|
| |
which just emptied the file but didn't remove it.
|
|
|
|
|
|
| |
They are obsoleted by the RFC3542 api.
ok mpi@
|
| |
|
| |
|
|
|
|
| |
From Fritjof Bornebusch.
|
| |
|
| |
|
|
|
|
|
| |
freed chunk is actually freeable immediately. catch more errors.
hints/ok otto
|
| |
|
|
|
|
|
|
| |
While there, sort headers.
ok tedu@
|
|
|
|
| |
ok miod
|
| |
|
| |
|
| |
|
|
|
|
|
| |
required. try to document this fact and some of the history.
with feedback from deraadt guenther millert
|
|
|
|
|
|
| |
while changing things, add a crypt_checkpass wrapper that handles most of
the edge cases. (not quite ready for production, though.)
ok deraadt
|
|
|
|
|
| |
deterministic behavior. four selected because it's more than three, less
than five. i.e., no particular reason.
|
| |
|
|
|
|
| |
ok jmc@
|
|
|
|
|
| |
can avoid reinventing the wheel
ok guenther schwarze
|
|
|
|
| |
ok crickets@
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
wherever it decides it would like them. first step. ok deraadt dlg djm
|
| |
|
|
|
|
| |
switch to generating them by default. prodded by deraadt and sthen
|
|
|
|
|
|
|
|
|
|
| |
2. Pull up the actual minor processing code into the switch that
parses it.
3. atoi is actually simpler than strtonum in this case, but check the
input beforehand so we don't get unexpected results.
4. Slightly more consistent style between various parse and check and
increment operations on salt.
ok deraadt
|
| |
|
|
|
|
|
| |
a free chunk at random and may allow to increase delayed chunk array.
ok otto
|
|
|
|
| |
default and the new 'j' option to disable this; ok jmc@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a getaddrinfo() flag that is defined thusly in RFC 3493:
If the AI_ADDRCONFIG flag is specified, IPv4 addresses shall be
returned only if an IPv4 address is configured on the local system,
and IPv6 addresses shall be returned only if an IPv6 address is
configured on the local system. The loopback address is not
considered for this case as valid as a configured address.
For example, when using the DNS, a query for AAAA records should
occur only if the node has at least one IPv6 address configured
(other than IPv6 loopback) and a query for A records should occur
only if the node has at least one IPv4 address configured (other
than the IPv4 loopback).
The flag is set by default when hints is NULL.
ok Eric Faurot, Jason McIntyre
|