[openssl/openssl] 0996f9: ssl/bio_ssl.c: report EOF on SSL BIOs after receiv...

0 views
Skip to first unread message

Mounir IDRASSI

unread,
2:09 PM (8 hours ago) 2:09 PM
to openssl...@openssl.org
Branch: refs/heads/openssl-3.5
Home: https://github.openssl.org/openssl/openssl
Commit: 0996f978dc33a1271b4517c74c809de56543a051
https://github.openssl.org/openssl/openssl/commit/0996f978dc33a1271b4517c74c809de56543a051
Author: Igor Ustinov <igu...@gmail.com>
Date: 2026-11-24 (Tue, 24 Nov 2026)

Changed paths:
M ssl/bio_ssl.c

Log Message:
-----------
ssl/bio_ssl.c: report EOF on SSL BIOs after receiving close_notify

BIO_get_line() can consume the final line of a TLS stream
and return 0 if the line doesn't end with a newline. After reading
close_notify, libssl doesn't read from the socket again.
Even if the peer has closed the socket, the socket BIO hasn't observed
EOF when the SSL BIO forwards BIO_eof() to it.

Backport the SSL BIO part of #29401. Record EOF
when SSL_get_error() reports SSL_ERROR_ZERO_RETURN for a read so callers
can see the clean TLS shutdown through BIO_eof().

Resolves: https://github.com/openssl/openssl/issues/33913
Original-Commit: f17230ae6c9f "Fix of EOF and retry handling in BIO implementations"
Original-PR: https://github.com/openssl/openssl/pull/29401
Reviewed-by: Tomas Mraz <to...@openssl.foundation>
Reviewed-by: Eugene Syromiatnikov <es...@openssl.org>
Merge-date: Tue Nov 24 19:08:02 2026
Merged-from: https://github.com/openssl/openssl/pull/33918


Commit: 906f55c2199f543702480c0499fb889df4fecb03
https://github.openssl.org/openssl/openssl/commit/906f55c2199f543702480c0499fb889df4fecb03
Author: Mounir IDRASSI <mounir....@idrix.fr>
Date: 2026-11-24 (Tue, 24 Nov 2026)

Changed paths:
M test/sslapitest.c

Log Message:
-----------
test/sslapitest.cL test SSL BIO EOF after close_notify on TLS 1.2 and 1.3

A read with no data available should be retryable. Once the peer
sends close_notify, the next read should return 0 and the SSL BIO
should report EOF while the transport stays open.

Use a BIO pair for the transport. An empty memory BIO already
reports EOF on 3.5 and would hide the regression.

Assisted-by: Codex:gpt-6-astra
Reviewed-by: Tomas Mraz <to...@openssl.foundation>
Reviewed-by: Eugene Syromiatnikov <es...@openssl.org>
Merge-date: Tue Nov 24 19:08:03 2026
Merged-from: https://github.com/openssl/openssl/pull/33918


Compare: https://github.openssl.org/openssl/openssl/compare/12a9bec2e54a...906f55c2199f

To unsubscribe from these emails, change your notification settings at https://github.openssl.org/openssl/openssl/settings/notifications
Reply all
Reply to author
Forward
0 new messages