<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/x509, 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-08T15:06:42+00:00</updated>
<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>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>
<entry>
<title>Use X509_V_OK instead of 0.</title>
<updated>2020-11-16T17:43:37+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2020-11-16T17:43:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=405976d31ae6b14d18567c95b7b569a4f840959c'/>
<id>urn:sha1:405976d31ae6b14d18567c95b7b569a4f840959c</id>
<content type='text'>
ok beck@ tb@
</content>
</entry>
<entry>
<title>Add back an X509_STORE_CTX error code assignment.</title>
<updated>2020-11-16T17:42:35+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2020-11-16T17:42:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=6d683ad99d2d002b7d27f3685fa75523eca88ce3'/>
<id>urn:sha1:6d683ad99d2d002b7d27f3685fa75523eca88ce3</id>
<content type='text'>
This was inadvertently removed in r1.19.

Spotted by tb@

ok beck@ tb@
</content>
</entry>
<entry>
<title>Return the specific failure for a "self signed certificate" in the chain</title>
<updated>2020-11-15T17:54:49+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2020-11-15T17:54:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=80b086a4acc51fd3fe6aa757d59578dbe416f61d'/>
<id>urn:sha1:80b086a4acc51fd3fe6aa757d59578dbe416f61d</id>
<content type='text'>
in order to be compatible with the openssl error craziness in the legacy
verifier case.

This will fix a regress problem noticed by znc

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