openssl/ssl/record/methods
Matt Caswell a23d5e20f1 Drop empty app data records in DTLS
App data records with 0 bytes of payload will confuse callers of SSL_read().
This will cause a successful read and return 0 bytes as read. Unfortunately
a 0 return from SSL_read() is considered a failure response. A subsequent
call to SSL_get_error() will then give the wrong result.

Zero length app data records are actually allowed by the spec, but have
never been handled correctly by OpenSSL. We already disallow creating such
empty app data records. Since the SSL_read() API does not have a good way to
handle this type of read, we simply ignore them.

Partial fix for #27316

Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27541)
2025-05-07 14:35:47 +02:00
..
build.info Move tls_pad.c into ssl/record/methods 2022-11-14 07:51:17 +00:00
dtls_meth.c Drop empty app data records in DTLS 2025-05-07 14:35:47 +02:00
ktls_meth.c Memory leak fix ktls_meth.c 2025-03-25 20:22:23 +01:00
recmethod_local.h open brace '{' following struct go on the same line 2024-07-22 06:55:35 -04:00
ssl3_cbc.c Copyright year updates 2023-09-07 09:59:15 +01:00
ssl3_meth.c Copyright year updates 2024-04-09 13:43:26 +02:00
tls1_meth.c Copyright year updates 2024-04-09 13:43:26 +02:00
tls13_meth.c Fix typos found by codespell 2024-08-07 19:09:43 +02:00
tls_common.c tls_common.c: Align the calculation of maximal alignment value 2024-10-24 15:24:52 +02:00
tls_multib.c Copyright year updates 2023-09-07 09:59:15 +01:00
tls_pad.c Copyright year updates 2023-09-07 09:59:15 +01:00
tlsany_meth.c Copyright year updates 2025-03-12 13:35:59 +00:00