]> granicus.if.org Git - pdns/commit
dnsdist: Protect GnuTLS tickets key rotation with a read-write lock
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 4 Dec 2018 09:27:13 +0000 (10:27 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 4 Dec 2018 09:27:13 +0000 (10:27 +0100)
commit1f65c18c0199164197c6515a737ceaad185790e0
treeeb9eefe8ffe376dd79c350ae42c2a73fbca69de1
parentfb04c3c1bcc956c628b9f891c4ecb2f959b9ec6a
dnsdist: Protect GnuTLS tickets key rotation with a read-write lock

Otherwise a thread can replace the shared pointer hold by the
GnuTLSIOCtx while another thread is accessing it. The usage count
is not incremented since no copy is made, so the content might get
deleted while a thread is still accessing it, leading to
use-after-free and possibly a crash.
pdns/dnsdistdist/tcpiohandler.cc
pdns/dnsdistdist/tcpiohandler.hh