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.0.5~1^2~1^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ce24c00b7d46d7bed95691af036ad629aa08ad39;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 (cherry picked from commit fba65bff16fd5decaa80df08938873725cbdfe45) --- diff --git a/pdns/mastercommunicator.cc b/pdns/mastercommunicator.cc index 2fd276217..5bd833604 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<