<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto, branch libressl-v3.3.1</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=libressl-v3.3.1</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=libressl-v3.3.1'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2020-12-08T17:39:06+00:00</updated>
<entry>
<title>LibreSSL 3.3.1</title>
<updated>2020-12-08T17:39:06+00:00</updated>
<author>
<name>bcook</name>
<email></email>
</author>
<published>2020-12-08T17:39:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=3a8e5b1810653b07037a5ff1e5b46554bb430ac2'/>
<id>urn:sha1:3a8e5b1810653b07037a5ff1e5b46554bb430ac2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix a NULL dereference in GENERAL_NAME_cmp()</title>
<updated>2020-12-08T15:06:42+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-12-08T15:06:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=9b6213a4c1c3792c23b8d5da5d4d7ef1cae15e50'/>
<id>urn:sha1:9b6213a4c1c3792c23b8d5da5d4d7ef1cae15e50</id>
<content type='text'>
Comparing two GENERAL_NAME structures containing an EDIPARTYNAME can lead
to a crash. This enables a denial of service attack for an attacker who can
control both sides of the comparison.

Issue reported to OpenSSL on Nov 9 by David Benjamin.
OpenSSL shared the information with us on Dec 1st.
Fix from Matt Caswell (OpenSSL) with a few small tweaks.

ok jsing
</content>
</entry>
<entry>
<title>Move point-on-curve check to set_affine_coordinates</title>
<updated>2020-12-04T08:55:30+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-12-04T08:55:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=19beb136cce42fbe56d004577d27ddc0ca69f793'/>
<id>urn:sha1:19beb136cce42fbe56d004577d27ddc0ca69f793</id>
<content type='text'>
Bad API design makes it possible to set an EC_KEY public key to
a point not on the curve. As a consequence, it was possible to
have bogus ECDSA signatures validated. In practice, all software
uses either EC_POINT_oct2point*() to unmarshal public keys or
issues a call to EC_KEY_check_key() after setting it. This way,
a point on curve check is performed and the problem is mitigated.

In OpenSSL commit 1e2012b7ff4a5f12273446b281775faa5c8a1858, Emilia
Kasper moved the point-on-curve check from EC_POINT_oct2point to
EC_POINT_set_affine_coordinates_*, which results in more checking.
In addition to this commit, we also check in the currently unused
codepath of a user set callback for setting compressed coordinates,
just in case this will be used at some point in the future.

The documentation of EC_KEY_check_key() is very vague on what it
checks and when checks are needed.  It could certainly be improved
a lot. It's also strange that EC_KEY_set_key() performs no checks,
while EC_KEY_set_public_key_affine_coordinates() implicitly calls
EC_KEY_check_key().

It's a mess.

Issue found and reported by Guido Vranken who also tested an earlier
version of this fix.

ok jsing
</content>
</entry>
<entry>
<title>grammar fixes from Varik "The Genuine Article!!!" Valefor;</title>
<updated>2020-12-03T22:47:22+00:00</updated>
<author>
<name>jmc</name>
<email></email>
</author>
<published>2020-12-03T22:47:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=bf90c7348aa11c405e8d6a2e0bceeb937623d4b8'/>
<id>urn:sha1:bf90c7348aa11c405e8d6a2e0bceeb937623d4b8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Avoid undefined behavior due to memcpy(NULL, NULL, 0)</title>
<updated>2020-11-25T21:17:52+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-11-25T21:17:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=143c67355191b6f6ff2cfccb3f876320138a37fb'/>
<id>urn:sha1:143c67355191b6f6ff2cfccb3f876320138a37fb</id>
<content type='text'>
This happens if name-&gt;der_len == 0. Since we already have a length
check, we can malloc and memcpy inside the conditional.  This also
makes the code easier to read.

agreement from millert
ok jsing
</content>
</entry>
<entry>
<title>Plug leak in x509_verify_chain_dup()</title>
<updated>2020-11-18T17:54:46+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-11-18T17:54:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=d7ea65d1de4c5d0528a68eb9b33a6ef17ca79f14'/>
<id>urn:sha1:d7ea65d1de4c5d0528a68eb9b33a6ef17ca79f14</id>
<content type='text'>
x509_verify_chain_new() allocates a few members of a certificate chain:
an empty stack of certificates, a list of errors encountered while
validating the chain, and a list of name constraints.  The function to
copy a chain would allocate a new chain using x509_verify_chain_new()
and then clobber its members by copies of the old chain.  Fix this by
replacing x509_verify_chain_new() with calloc().

Found by review while investigating the report by Hanno Zysik who
found the same leak using valgrind. This is a cleaner version of
my initial fix from jsing.

ok jsing
</content>
</entry>
<entry>
<title>Plug a big memory leak in the new validator</title>
<updated>2020-11-18T17:40:42+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-11-18T17:40:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=fa7f97be6a425fa454c92d146ea0a205a46da2a0'/>
<id>urn:sha1:fa7f97be6a425fa454c92d146ea0a205a46da2a0</id>
<content type='text'>
The legacy validator would only call x509_vfy_check_policy() once at
the very end after cobbling together a chain.  Therefore it didn't
matter that X509_policy_check() always allocates a new tree on top of
the one that might have been passed in.  This is in stark contrast to
other, similar APIs in this code base.  The new validator calls this
function several times over while building its chains.  This adds up
to a sizable leak in the new validator.

Reported with a reproducer by Hanno Zysik on github, who also bisected
this to the commit enabling the new validator.

Narrowed down to x509_vfy_check_policy() by jsing.
We simultaenously came up with a functionally identical fix.

ok jsing
</content>
</entry>
<entry>
<title>zap ugly empty line before closing brace</title>
<updated>2020-11-18T17:13:55+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-11-18T17:13:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=644cb0c3bf194db22125d9f1f2bb4fbdad279d65'/>
<id>urn:sha1:644cb0c3bf194db22125d9f1f2bb4fbdad279d65</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move freeing of the verify context to its natural place instead of</title>
<updated>2020-11-18T17:08:59+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-11-18T17:08:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=3bc85c50efd5da6e970a3a4b0bf1d312386c6327'/>
<id>urn:sha1:3bc85c50efd5da6e970a3a4b0bf1d312386c6327</id>
<content type='text'>
a few lines after.

stylistic nit from jsing
</content>
</entry>
<entry>
<title>KNF (whitespace)</title>
<updated>2020-11-18T17:00:59+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-11-18T17:00:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=05555ab1add6e7a31798831da9ff788048d1b3cf'/>
<id>urn:sha1:05555ab1add6e7a31798831da9ff788048d1b3cf</id>
<content type='text'>
</content>
</entry>
</feed>
