]> git.ipfire.org Git - thirdparty/bind9.git/commit
Attach/detach to the listening child socket when accepting TLS
authorOndřej Surý <ondrej@isc.org>
Wed, 7 Aug 2024 06:43:12 +0000 (08:43 +0200)
committerOndřej Surý <ondrej@isc.org>
Wed, 7 Aug 2024 15:20:03 +0000 (17:20 +0200)
commit875755d9ea153c15b2f0d4ef060691c7b7772a7e
tree268bc120587aafe56ecab545bbb9460a472ac61c
parent0d1953d7a8df7feb3a94b935e68cd1ba821458c9
Attach/detach to the listening child socket when accepting TLS

When TLS connection (TLSstream) connection was accepted, the children
listening socket was not attached to sock->server and thus it could have
been freed before all the accepted connections were actually closed.

In turn, this would cause us to call isc_tls_free() too soon - causing
cascade errors in pending SSL_read_ex() in the accepted connections.

Properly attach and detach the children listening socket when accepting
and closing the server connections.

(cherry picked from commit 684f3eb8e62fb2dd2e6adf3272e87b1fd4b08579)
lib/isc/netmgr/tlsstream.c