]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix possible race in isc__nm_tcpconnect.
authorWitold Kręcicki <wpk@isc.org>
Mon, 29 Jun 2020 06:43:54 +0000 (08:43 +0200)
committerOndřej Surý <ondrej@isc.org>
Thu, 1 Oct 2020 14:44:43 +0000 (16:44 +0200)
commit5a0fbc41ecfb3be53eada71f4f1dd4346280d667
tree7028671b2b76730050b57a8708f87312f69d6f4c
parentebb4d506d6ae9c4d6c32ace8bab9c6552e34b5b6
Fix possible race in isc__nm_tcpconnect.

There's a possibility of race in isc__nm_tcpconnect if the asynchronous
connect operation finishes with all the callbacks before we exit the
isc__nm_tcpconnect itself we might access an already freed memory.
Fix it by creating an additional reference to the socket freed at the
end of isc__nm_tcpconnect.

(cherry picked from commit 896db0f41988f66bd06d6fa840b18be66a22200a)
lib/isc/netmgr/tcp.c