<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libssl/bs_cbb.c, branch OPENBSD_6_8_BASE</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_6_8_BASE</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_6_8_BASE'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2020-09-16T05:52:04+00:00</updated>
<entry>
<title>Avoid memset() before memcpy() for CBB_add_bytes().</title>
<updated>2020-09-16T05:52:04+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2020-09-16T05:52:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=cdfaa096c0627eb79cb2944893d873d3aa00f2fc'/>
<id>urn:sha1:cdfaa096c0627eb79cb2944893d873d3aa00f2fc</id>
<content type='text'>
CBB_add_bytes() calls CBB_add_space(), which now explicitly zeros memory
to avoid information leaks. However CBB_add_bytes() calls memcpy() for the
same memory region, so the memset() is unnecessary. Avoid this by inlining
part of CBB_add_space() rather than calling it directly.

ok beck@ tb@
</content>
</entry>
<entry>
<title>Ensure that CBB_add_space() always provides zeroed memory.</title>
<updated>2020-03-13T15:54:34+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2020-03-13T15:54:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=13b054b349060ec4ab6863bdeb5c18f1992b6e5e'/>
<id>urn:sha1:13b054b349060ec4ab6863bdeb5c18f1992b6e5e</id>
<content type='text'>
ok tb@
</content>
</entry>
<entry>
<title>Use calloc() rather than malloc() when allocating initial CBB buffer.</title>
<updated>2020-03-12T17:17:12+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2020-03-12T17:17:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=5bd2365f596fdaf1fd5d5feb218d8a3e4c99a2f1'/>
<id>urn:sha1:5bd2365f596fdaf1fd5d5feb218d8a3e4c99a2f1</id>
<content type='text'>
CBB uses recallocarray() to expand buffers, however was still using
malloc() for the initial buffer, which could result in memory being leaked
in incorrect use cases.

While here also use calloc() to allocate internal structs.

ok inoguchi@ tb@
</content>
</entry>
<entry>
<title>assert.h is often misused. It should not be used in a library</title>
<updated>2019-01-23T22:20:40+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2019-01-23T22:20:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=5f0a8a144321350e4fbf1de6dd8937ff85055a6d'/>
<id>urn:sha1:5f0a8a144321350e4fbf1de6dd8937ff85055a6d</id>
<content type='text'>
ok bcook@ jsing@
</content>
</entry>
<entry>
<title>Provide CBB_add_u32(), as needed for an upcoming conversion.</title>
<updated>2018-08-16T18:39:37+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2018-08-16T18:39:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=376676d240a487534ae7527150946472cd5c131b'/>
<id>urn:sha1:376676d240a487534ae7527150946472cd5c131b</id>
<content type='text'>
ok tb@
</content>
</entry>
<entry>
<title>Add CBB_discard_child(), which allows for a child CBB to be discarded.</title>
<updated>2017-11-28T16:34:20+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2017-11-28T16:34:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=76849a9caf0c93472d0fa91e5211a18f1b3afd18'/>
<id>urn:sha1:76849a9caf0c93472d0fa91e5211a18f1b3afd18</id>
<content type='text'>
Based on BoringSSL.
</content>
</entry>
<entry>
<title>Clear the child pointer in CBB_cleanup(), so that we have fewer pointers</title>
<updated>2017-08-12T02:50:05+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2017-08-12T02:50:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=b316f9f277648e3f7b8d4b8e8c5efe957a0fd85c'/>
<id>urn:sha1:b316f9f277648e3f7b8d4b8e8c5efe957a0fd85c</id>
<content type='text'>
hanging around to potentially invalid address space.

Discussed with beck@ and doug@
</content>
</entry>
<entry>
<title>Instead of starting a 'zero-sized' CBB at the size of the first addition</title>
<updated>2017-05-07T05:03:41+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2017-05-07T05:03:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=b238007c9db07d24cda00ffe301ec662ec5e1cc3'/>
<id>urn:sha1:b238007c9db07d24cda00ffe301ec662ec5e1cc3</id>
<content type='text'>
to the CBB, then doubling, start with an initial size of 64 bytes. Almost
all uses will exceed this size and we avoid multiple small recallocarray()
calls during the initial usage.

ok beck@
</content>
</entry>
<entry>
<title>Use freezero(3) in the CBB clean up path, since this could hold sensitive</title>
<updated>2017-04-14T15:20:55+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2017-04-14T15:20:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=20fe51a87fb3b0e34b655fb34fa44eb6a33f33c9'/>
<id>urn:sha1:20fe51a87fb3b0e34b655fb34fa44eb6a33f33c9</id>
<content type='text'>
information (such as master keys).
</content>
</entry>
<entry>
<title>Switch CBB to use recallocarray() - this ensures that we do not leak</title>
<updated>2017-03-10T15:16:20+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2017-03-10T15:16:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=80ffcb28d3d130a0e90e846f64c44e610b999acf'/>
<id>urn:sha1:80ffcb28d3d130a0e90e846f64c44e610b999acf</id>
<content type='text'>
secrets via realloc().

ok inoguchi@
</content>
</entry>
</feed>
