diff options
author | tb <> | 2021-02-03 07:06:14 +0000 |
---|---|---|
committer | tb <> | 2021-02-03 07:06:14 +0000 |
commit | 70029edfad38276befdaee62f4fe7e084070c0cd (patch) | |
tree | 9f524641600313fef6d235a1c7bfeced27fbe075 /src/lib/libssl/tls13_legacy.c | |
parent | 7708b34c3988d3cd2e01b8bd5d4f1a64461e6464 (diff) | |
download | openbsd-70029edfad38276befdaee62f4fe7e084070c0cd.tar.gz openbsd-70029edfad38276befdaee62f4fe7e084070c0cd.tar.bz2 openbsd-70029edfad38276befdaee62f4fe7e084070c0cd.zip |
This is errata/6.8/013_libressl.patch.siglibressl-v3.2.4
Various interoperability issues and memory leaks were discovered in
libcrypto and libssl.
The new verifier is not bug compatible with the old verifier and caused
many issues by failing to propagate errors correctly, returning different
error codes than some software was trained to expect and otherwise failing
when it shouldn't. While much of this is fixed in -current, it's still not
perfect, so switching back to the legacy verifier is preferable at this
point.
Other included fixes:
* Unbreak DTLS retransmissions for flights that include a CCS
* Only check BIO_should_read() on read and BIO_should_write() on write
* Implement autochain for the TLSv1.3 server
* Use the legacy verifier for AUTO_CHAIN
* Implement exporter for TLSv1.3
* Free alert_data and phh_data in tls13_record_layer_free()
* Plug leak in x509_verify_chain_dup()
* Free the policy tree in x509_vfy_check_policy()
Original commits by jsing and tb
ok inoguchi jsing
Diffstat (limited to 'src/lib/libssl/tls13_legacy.c')
-rw-r--r-- | src/lib/libssl/tls13_legacy.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib/libssl/tls13_legacy.c b/src/lib/libssl/tls13_legacy.c index 317a1cb0f5..468f4edfc4 100644 --- a/src/lib/libssl/tls13_legacy.c +++ b/src/lib/libssl/tls13_legacy.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_legacy.c,v 1.13 2020/09/13 15:04:35 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_legacy.c,v 1.13.4.1 2021/02/03 07:06:14 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -40,8 +40,6 @@ tls13_legacy_wire_read(SSL *ssl, uint8_t *buf, size_t len) | |||
40 | if ((n = BIO_read(ssl->rbio, buf, len)) <= 0) { | 40 | if ((n = BIO_read(ssl->rbio, buf, len)) <= 0) { |
41 | if (BIO_should_read(ssl->rbio)) | 41 | if (BIO_should_read(ssl->rbio)) |
42 | return TLS13_IO_WANT_POLLIN; | 42 | return TLS13_IO_WANT_POLLIN; |
43 | if (BIO_should_write(ssl->rbio)) | ||
44 | return TLS13_IO_WANT_POLLOUT; | ||
45 | if (n == 0) | 43 | if (n == 0) |
46 | return TLS13_IO_EOF; | 44 | return TLS13_IO_EOF; |
47 | 45 | ||
@@ -79,8 +77,6 @@ tls13_legacy_wire_write(SSL *ssl, const uint8_t *buf, size_t len) | |||
79 | errno = 0; | 77 | errno = 0; |
80 | 78 | ||
81 | if ((n = BIO_write(ssl->wbio, buf, len)) <= 0) { | 79 | if ((n = BIO_write(ssl->wbio, buf, len)) <= 0) { |
82 | if (BIO_should_read(ssl->wbio)) | ||
83 | return TLS13_IO_WANT_POLLIN; | ||
84 | if (BIO_should_write(ssl->wbio)) | 80 | if (BIO_should_write(ssl->wbio)) |
85 | return TLS13_IO_WANT_POLLOUT; | 81 | return TLS13_IO_WANT_POLLOUT; |
86 | 82 | ||