OpenBSD CVS

CVS log for src/usr.bin/ssh/sshbuf.c


[BACK] Up to [local] / src / usr.bin / ssh

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.19 / (download) - annotate - [select for diffs], Fri Dec 2 04:40:27 2022 UTC (17 months, 2 weeks ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.18: +24 -1 lines
Diff to previous 1.18 (colored)

make struct sshbuf private and remove an unused field; ok dtucker

Revision 1.18 / (download) - annotate - [select for diffs], Wed May 25 06:03:44 2022 UTC (23 months, 3 weeks ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.17: +11 -11 lines
Diff to previous 1.17 (colored)

revert previous; it was broken (spotted by Theo)

Revision 1.17 / (download) - annotate - [select for diffs], Wed May 25 00:31:13 2022 UTC (23 months, 3 weeks ago) by djm
Branch: MAIN
Changes since 1.16: +12 -12 lines
Diff to previous 1.16 (colored)

make SSHBUF_DBG/SSHBUF_TELL (off by default and only enabled via
#define) dump to stderr rather than stdout

Revision 1.16 / (download) - annotate - [select for diffs], Fri Apr 8 04:40:40 2022 UTC (2 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.15: +6 -3 lines
Diff to previous 1.15 (colored)

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.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Feb 26 13:40:09 2020 UTC (4 years, 2 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.14: +2 -3 lines
Diff to previous 1.14 (colored)

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@

Revision 1.14 / (download) - annotate - [select for diffs], Thu Jan 23 07:10:22 2020 UTC (4 years, 3 months ago) by dtucker
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

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.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Nov 16 06:10:29 2018 UTC (5 years, 6 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.12: +10 -7 lines
Diff to previous 1.12 (colored)

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

Revision 1.12 / (download) - annotate - [select for diffs], Mon Jul 9 21:56:06 2018 UTC (5 years, 10 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.11: +2 -20 lines
Diff to previous 1.11 (colored)

remove legacy buffer API emulation layer; ok djm@

Revision 1.11 / (download) - annotate - [select for diffs], Thu Jun 1 06:58:25 2017 UTC (6 years, 11 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

unconditionally zero init size of buffer; ok markus@ deraadt@

Revision 1.10 / (download) - annotate - [select for diffs], Wed May 31 09:15:42 2017 UTC (6 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +8 -8 lines
Diff to previous 1.9 (colored)

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

Revision 1.9 / (download) - annotate - [select for diffs], Fri May 26 20:34:49 2017 UTC (6 years, 11 months ago) by markus
Branch: MAIN
Changes since 1.8: +4 -1 lines
Diff to previous 1.8 (colored)

sshbuf_consume: reset empty buffer; ok djm@

Revision 1.8 / (download) - annotate - [select for diffs], Fri Nov 25 23:22:04 2016 UTC (7 years, 5 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.7: +43 -33 lines
Diff to previous 1.7 (colored)

split allocation out of sshbuf_reserve() into a separate
sshbuf_allocate() function; ok markus@

Revision 1.7 / (download) - annotate - [select for diffs], Mon Sep 12 01:22:38 2016 UTC (7 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +4 -4 lines
Diff to previous 1.6 (colored)

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

Revision 1.6 / (download) - annotate - [select for diffs], Tue Jan 12 23:42:54 2016 UTC (8 years, 4 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.5: +5 -5 lines
Diff to previous 1.5 (colored)

use explicit_bzero() more liberally in the buffer code; ok deraadt

Revision 1.5 / (download) - annotate - [select for diffs], Fri Dec 11 04:21:12 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
Changes since 1.4: +3 -5 lines
Diff to previous 1.4 (colored)

Remove NULL-checks before sshbuf_free().

ok djm@

Revision 1.4 / (download) - annotate - [select for diffs], Mon Oct 5 17:11:21 2015 UTC (8 years, 7 months ago) by djm
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

some more bzero->explicit_bzero, from Michael McConville

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jan 20 23:14:00 2015 UTC (9 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

Reduce use of <sys/param.h> and transition to <limits.h> throughout.
ok djm markus

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 25 14:16:09 2014 UTC (9 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

unblock SIGSEGV before raising it
ok djm

Revision 1.1 / (download) - annotate - [select for diffs], Wed Apr 30 05:29:56 2014 UTC (10 years ago) by djm
Branch: MAIN

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.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.