Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Clean up after arc4random u_int32_t uint32_t change | beck | 2014-07-09 | 1 | -5/+5 | |
| | | | | ok jsing@ | |||||
* | changes to improve portability | bcook | 2014-07-09 | 1 | -10/+11 | |
| | | | | ok beck@ deraadt@ jsing@ guenther@ | |||||
* | re-init and init code paths are now more shared, so the getpid()-based | deraadt | 2014-06-27 | 1 | -2/+3 | |
| | | | | portable code path must handle that; with brent cook | |||||
* | extra evil spaces snuck in over the last while | deraadt | 2014-06-27 | 1 | -20/+20 | |
| | ||||||
* | Move to a smaller rbytes buffer and skip a random part. Not to | otto | 2014-06-27 | 1 | -3/+4 | |
| | | | | | | 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@ | |||||
* | Add back an #ifndef MAP_INHERIT_ZERO chunk to support the old getpid() | deraadt | 2014-06-26 | 1 | -1/+13 | |
| | | | | | mechanism, to aid in portability to other systems as requested. ok matthew | |||||
* | document why we explicit_bzero | deraadt | 2014-06-25 | 1 | -2/+2 | |
| | ||||||
* | loosen the spec for timingsafe functions slightly, so as to not | tedu | 2014-06-21 | 1 | -10/+5 | |
| | | | | artificially constrain alternative implementations. ok deraadt | |||||
* | Protect explicit_bzero() from link-time optimization | matthew | 2014-06-21 | 1 | -7/+10 | |
| | | | | | | | | | | | | | | | | | | | | 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 | |||||
* | arc4random: hard fail with raise(SIGKILL) if getentropy() returns -1 | matthew | 2014-06-20 | 1 | -3/+4 | |
| | | | | | | | 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 | |||||
* | Move rs_chacha and rs_buf into the same memory page and don't mark it | matthew | 2014-06-19 | 1 | -22/+31 | |
| | | | | | | | | | 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 | |||||
* | Always call atexit handlers as if they were registered with __cxa_atexit. | kettenis | 2014-06-18 | 2 | -14/+8 | |
| | | | | | | | | | | | 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@ | |||||
* | Use MAP_INHERIT_ZERO in arc4random(3) | matthew | 2014-06-17 | 1 | -37/+44 | |
| | | | | | | | | 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 | |||||
* | oops, typo. James Hartley is fast at trying -current | deraadt | 2014-06-15 | 1 | -2/+2 | |
| | ||||||
* | In srandomdev(), use arc4random_buf() instead of from the kernel. | deraadt | 2014-06-15 | 1 | -4/+3 | |
| | | | | discussion with matthew | |||||
* | For now... assume success of getentropy() just like we assumed success | deraadt | 2014-06-13 | 1 | -3/+3 | |
| | | | | of sysctl(). Mark it with XXX while we consider. | |||||
* | Remove deprecated RFC2292 ancillary data convenience functions. | chrisz | 2014-06-13 | 2 | -488/+2 | |
| | | | | | | They are obsoleted by the RFC3542 api. ok mpi@ | |||||
* | use getgentropy() call. If it fails, things are pretty bad -- | deraadt | 2014-06-13 | 1 | -8/+3 | |
| | | | | | call abort(). this direction discussed at length with miod beck tedu matthew etc | |||||
* | use getentropy; from matthew | deraadt | 2014-06-13 | 1 | -5/+2 | |
| | ||||||
* | Add timingsafe_memcmp(). | matthew | 2014-06-13 | 5 | -33/+152 | |
| | | | | ok deraadt, jmc, tedu | |||||
* | Disable the "switch to insertion sort" optimization to avoid quadratic | millert | 2014-06-12 | 1 | -13/+2 | |
| | | | | behavior for certain inputs. From NetBSD. OK tedu@ | |||||
* | Really remove the obsolete manpages left by earlier commit | chrisz | 2014-06-11 | 2 | -0/+0 | |
| | | | | which just emptied the file but didn't remove it. | |||||
* | Remove manpages about deprecated RFC2292 ancillary data convenience functions. | chrisz | 2014-06-11 | 4 | -769/+4 | |
| | | | | | | They are obsoleted by the RFC3542 api. ok mpi@ | |||||
* | mop up ifndef KERNEL goo; ok miod | deraadt | 2014-06-10 | 12 | -60/+12 | |
| | ||||||
* | move random bytes buffer to be part of mmaped pages; ok tedu@ | otto | 2014-06-02 | 1 | -21/+18 | |
| | ||||||
* | Delete the extraneous "return" statement at the end of a void function. | jca | 2014-05-31 | 1 | -2/+1 | |
| | | | | From Fritjof Bornebusch. | |||||
* | move all stats collecting under MALLOC_STATS; ok krw@ | otto | 2014-05-26 | 1 | -28/+33 | |
| | ||||||
* | fix MALLOC_STATS (not compiled in by default); ok tedu@ | otto | 2014-05-21 | 1 | -18/+19 | |
| | ||||||
* | factor out a bit of the chunk index code and use it to make sure that a | tedu | 2014-05-18 | 1 | -14/+33 | |
| | | | | | freed chunk is actually freeable immediately. catch more errors. hints/ok otto | |||||
* | correctly match size and buffer. from enh at google | tedu | 2014-05-17 | 1 | -3/+3 | |
| | ||||||
* | Add missing header needed by isdigit(). | chl | 2014-05-17 | 1 | -4/+5 | |
| | | | | | | While there, sort headers. ok tedu@ | |||||
* | refactor some of the des crypt code to use fewer globals. | tedu | 2014-05-17 | 2 | -42/+45 | |
| | | | | ok miod | |||||
* | update NAME and MLINKS for previous; | jmc | 2014-05-16 | 2 | -5/+7 | |
| | ||||||
* | document crypt_checkpass | tedu | 2014-05-16 | 1 | -1/+14 | |
| | ||||||
* | use $2b in the bcrypt example, ok tedu | sthen | 2014-05-16 | 1 | -3/+3 | |
| | ||||||
* | stop flushing streams in abort(). it's hackish and unsafe, and no longer | tedu | 2014-05-14 | 2 | -21/+13 | |
| | | | | | required. try to document this fact and some of the history. with feedback from deraadt guenther millert | |||||
* | remove md5crypt. | tedu | 2014-05-12 | 5 | -195/+65 | |
| | | | | | | while changing things, add a crypt_checkpass wrapper that handles most of the edge cases. (not quite ready for production, though.) ok deraadt | |||||
* | change to having four freelists per size, to reduce another source of | tedu | 2014-05-12 | 1 | -16/+20 | |
| | | | | | deterministic behavior. four selected because it's more than three, less than five. i.e., no particular reason. | |||||
* | fix MALLOC_STATS code that was broken in rev 1.159, not compiled in by default | otto | 2014-05-10 | 1 | -2/+2 | |
| | ||||||
* | Add a bit more detail about dot notation from the old inet(3) manpage. | guenther | 2014-05-09 | 1 | -3/+11 | |
| | | | | ok jmc@ | |||||
* | move reallocarray() to a seperate file so that -portable applications | deraadt | 2014-05-08 | 3 | -18/+46 | |
| | | | | | can avoid reinventing the wheel ok guenther schwarze | |||||
* | comment style fix | halex | 2014-05-07 | 1 | -2/+3 | |
| | | | | ok crickets@ | |||||
* | missing NULL checks to see if init is needed. found hard way by deraadt. | tedu | 2014-05-06 | 1 | -3/+3 | |
| | ||||||
* | fix stupid commit | tedu | 2014-05-06 | 1 | -5/+5 | |
| | ||||||
* | use explicit_bzero | tedu | 2014-05-06 | 1 | -5/+5 | |
| | ||||||
* | clear a stack buffer with explicit_bzero | tedu | 2014-05-06 | 1 | -2/+2 | |
| | ||||||
* | move chacha context and buffer out of bss and allow mmap to place them | tedu | 2014-05-06 | 1 | -6/+16 | |
| | | | | wherever it decides it would like them. first step. ok deraadt dlg djm | |||||
* | delete useless test code | deraadt | 2014-05-04 | 1 | -23/+1 | |
| | ||||||
* | now that 5.5 has been released with compatibility for 2b hashes, | tedu | 2014-05-03 | 1 | -2/+2 | |
| | | | | switch to generating them by default. prodded by deraadt and sthen | |||||
* | 1. Drop support for no minor. This variant doesn't exist anymore. | tedu | 2014-05-03 | 1 | -44/+30 | |
| | | | | | | | | | | 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 |