CVE-2019-10163-4.1.8-busyloop
authorpdns packagers <pdns@packages.debian.org>
Mon, 12 Oct 2020 12:42:43 +0000 (13:42 +0100)
committerChris Hofstaedtler <zeha@debian.org>
Mon, 12 Oct 2020 12:42:43 +0000 (13:42 +0100)
Gbp-Pq: Name CVE-2019-10163-4.1.8-busyloop.patch

pdns/communicator.cc

index 7db5a3e5b6737a2368059311400d8bd115e95bf5..7fd59e450e3a33a37818f1c15885cbb27dd771a7 100644 (file)
@@ -136,7 +136,10 @@ void CommunicatorClass::mainloop(void)
           if (extraSlaveRefresh)
             slaveRefresh(&P);
         }
-        else { 
+        else {
+          // eat up extra posts to avoid busy looping if many posts were done
+          while (d_any_sem.tryWait() == 0) {
+          }
           break; // something happened
         }
         // this gets executed at least once every second