#
b691e04f |
| 14-Aug-2024 |
tobias <tobias@openbsd.org> |
Reorder calloc arguments
The first argument should be the amount, the second argument should be the element size. Fixing this also silences some gcc compiler warnings for portable.
Spotted with Ben
Reorder calloc arguments
The first argument should be the amount, the second argument should be the element size. Fixing this also silences some gcc compiler warnings for portable.
Spotted with Benny Baumann (BenBE at geshi dot org).
ok djm@
show more ...
|
#
2afef00e |
| 14-Aug-2024 |
tobias <tobias@openbsd.org> |
Extend sshbuf validation
Multiple sshbuf structs can be linked through a parent/child relationship. Make sure that a single sshbuf cannot be its own parent. If this would ever happen, it would resul
Extend sshbuf validation
Multiple sshbuf structs can be linked through a parent/child relationship. Make sure that a single sshbuf cannot be its own parent. If this would ever happen, it would result in reference counting issues.
This is a cheap way of testing this with very little overhead. It does not detect A->B->A linkages though for performance reason and the fact that it takes a programming error for this to occur anyway.
Authored with Benny Baumann (BenBE at geshi dot org).
ok djm@
show more ...
|
#
413e8297 |
| 14-Aug-2024 |
tobias <tobias@openbsd.org> |
Use freezero for better readability
It has the same meaning as the current pair of calling explicit_bzero and free. Spotted with Benny Baumann (BenBE at geshi dot org).
ok djm@
|
#
52a90c04 |
| 14-Aug-2024 |
tobias <tobias@openbsd.org> |
Fix typo in comment
Spotted with Benny Baumann (BenBE at geshi dot org).
ok djm@
|
#
60dd6e7e |
| 02-Dec-2022 |
djm <djm@openbsd.org> |
make struct sshbuf private and remove an unused field; ok dtucker
|
#
a8cbed27 |
| 25-May-2022 |
djm <djm@openbsd.org> |
revert previous; it was broken (spotted by Theo)
|
#
15df1c5d |
| 25-May-2022 |
djm <djm@openbsd.org> |
make SSHBUF_DBG/SSHBUF_TELL (off by default and only enabled via #define) dump to stderr rather than stdout
|
#
fe1380ca |
| 08-Apr-2022 |
djm <djm@openbsd.org> |
two defensive changes from Tobias Stoeckmann via GHPR287
enforce stricter invarient for sshbuf_set_parent() - never allow a buffer to have a previously-set parent changed.
In sshbuf_reset(), if the
two defensive changes from Tobias Stoeckmann via GHPR287
enforce stricter invarient for sshbuf_set_parent() - never allow a buffer to have a previously-set parent changed.
In sshbuf_reset(), if the reallocation fails, then zero the entire buffer and not the (potentially smaller) default initial alloc size.
show more ...
|
#
c9831b39 |
| 26-Feb-2020 |
jsg <jsg@openbsd.org> |
change explicit_bzero();free() to freezero()
While freezero() returns early if the pointer is NULL the tests for NULL in callers are left to avoid warnings about passing an uninitialised size argume
change explicit_bzero();free() to freezero()
While freezero() returns early if the pointer is NULL the tests for NULL in callers are left to avoid warnings about passing an uninitialised size argument across a function boundry.
ok deraadt@ djm@
show more ...
|
#
e9716d4d |
| 23-Jan-2020 |
dtucker <dtucker@openbsd.org> |
Replace all calls to signal(2) with a wrapper around sigaction(2). This wrapper blocks all other signals during the handler preventing races between handlers, and sets SA_RESTART which should reduce
Replace all calls to signal(2) with a wrapper around sigaction(2). This wrapper blocks all other signals during the handler preventing races between handlers, and sets SA_RESTART which should reduce the potential for short read/write operations.
show more ...
|
#
27871900 |
| 16-Nov-2018 |
djm <djm@openbsd.org> |
make grandparent-parent-child sshbuf chains robust to use-after-free faults if the ancestors are freed before the descendents. Nothing in OpenSSH uses this deallocation pattern. Reported by Jann Horn
|
#
a74252e9 |
| 09-Jul-2018 |
markus <markus@openbsd.org> |
remove legacy buffer API emulation layer; ok djm@
|
#
327b1c69 |
| 01-Jun-2017 |
djm <djm@openbsd.org> |
unconditionally zero init size of buffer; ok markus@ deraadt@
|
#
eaf8e3f6 |
| 31-May-2017 |
deraadt <deraadt@openbsd.org> |
Switch to recallocarray() for a few operations. Both growth and shrinkage are handled safely, and there also is no need for preallocation dances. Future changes in this area will be less error prone
Switch to recallocarray() for a few operations. Both growth and shrinkage are handled safely, and there also is no need for preallocation dances. Future changes in this area will be less error prone. Review and one bug found by markus
show more ...
|
#
49ae696b |
| 26-May-2017 |
markus <markus@openbsd.org> |
sshbuf_consume: reset empty buffer; ok djm@
|
#
66d9cecc |
| 25-Nov-2016 |
djm <djm@openbsd.org> |
split allocation out of sshbuf_reserve() into a separate sshbuf_allocate() function; ok markus@
|
#
03db5a1f |
| 12-Sep-2016 |
deraadt <deraadt@openbsd.org> |
Add MAXIMUM(), MINIMUM(), and ROUNDUP() to misc.h, then use those definitions rather than pulling <sys/param.h> and unknown namespace pollution. ok djm markus dtucker
|
#
5c47a739 |
| 12-Jan-2016 |
djm <djm@openbsd.org> |
use explicit_bzero() more liberally in the buffer code; ok deraadt
|
#
860b8821 |
| 11-Dec-2015 |
mmcc <mmcc@openbsd.org> |
Remove NULL-checks before sshbuf_free().
ok djm@
|
#
10ed5436 |
| 05-Oct-2015 |
djm <djm@openbsd.org> |
some more bzero->explicit_bzero, from Michael McConville
|
#
ace78deb |
| 20-Jan-2015 |
deraadt <deraadt@openbsd.org> |
Reduce use of <sys/param.h> and transition to <limits.h> throughout. ok djm markus
|
#
e2862f1c |
| 25-Jun-2014 |
deraadt <deraadt@openbsd.org> |
unblock SIGSEGV before raising it ok djm
|
#
15b55dae |
| 30-Apr-2014 |
djm <djm@openbsd.org> |
New buffer API; the first installment of the conversion/replacement of OpenSSH's internals to make them usable as a standalone library.
This includes a set of wrappers to make it compatible with the
New buffer API; the first installment of the conversion/replacement of OpenSSH's internals to make them usable as a standalone library.
This includes a set of wrappers to make it compatible with the existing buffer API so replacement can occur incrementally.
With and ok markus@
Thanks also to Ben Hawkes, David Tomaschik, Ivan Fratric, Matthew Dempsky and Ron Bowes for a detailed review.
show more ...
|