]> 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:16:50 +0000 (15:16 +0000)
commitc6daaa4b8cc139c6582fe9c89fdb7fec027d869a
tree1be05e4ec71e64878f712ba8908921068d9df017
parentd8d49c93401bfab05b3e5f1e4655d4f0ce8f1919
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