From: Pieter Lexis Date: Thu, 9 Nov 2017 10:09:32 +0000 (+0100) Subject: Check return value of getTSIGKey and B64Decode X-Git-Tag: auth-4.1.0-rc3~3^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fba65bff16fd5decaa80df08938873725cbdfe45;p=pdns Check return value of getTSIGKey and B64Decode This would lead to crashes if the TSIG key was referenced in TSIG-ALLOW-FROM but the key was not in the tsigkeys table. Closes #5931 --- diff --git a/pdns/mastercommunicator.cc b/pdns/mastercommunicator.cc index 667cb7648..456957a80 100644 --- a/pdns/mastercommunicator.cc +++ b/pdns/mastercommunicator.cc @@ -238,7 +238,10 @@ void CommunicatorClass::sendNotification(int sock, const DNSName& domain, const pw.getHeader()->aa = true; if (tsigkeyname.empty() == false) { - B.getTSIGKey(tsigkeyname, &tsigalgorithm, &tsigsecret64); + if (!B.getTSIGKey(tsigkeyname, &tsigalgorithm, &tsigsecret64)) { + L<