Deadlock in DcmTLSSCU::initNetwork()

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
jogerh
Posts: 37
Joined: Mon, 2022-02-28, 08:55

Deadlock in DcmTLSSCU::initNetwork()

#1 Post by jogerh »

OFCondition DcmTLSSCU::initNetwork() seems to deadlock if addTrustedCertDir was called first.

The reason seems to be a missing iterator increment.

Code: Select all

diff --git a/dcmtls/libsrc/tlsscu.cc b/dcmtls/libsrc/tlsscu.cc
index ba7e913c0..86bc625a0 100644
--- a/dcmtls/libsrc/tlsscu.cc
+++ b/dcmtls/libsrc/tlsscu.cc
@@ -107,6 +107,7 @@ OFCondition DcmTLSSCU::initNetwork()
   {
     if (m_tLayer->addTrustedCertificateDir( (*certDir).c_str(), m_certKeyFileFormat).bad())
       DCMNET_WARN("Unable to load certificates from directory '" << *certDir<< "', ignoring");
+      certDir++;
   }

   /* If authentication of both sides (and not only encryption) is desired,
   
  

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1437
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

Re: Deadlock in DcmTLSSCU::initNetwork()

#2 Post by Marco Eichelberg »

Thank you for the bug report. I have created a corresponding issue in our issue tracker: https://support.dcmtk.org/redmine/issues/1020.
This seems to be fairly straightforward to fix, but I need to test a fix anyway before committing it.

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1437
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

Re: Deadlock in DcmTLSSCU::initNetwork()

#3 Post by Marco Eichelberg »

I have today committed the fix to our testing branch. It will appear in the public git once it has successfully passed our nightly builds.

jogerh
Posts: 37
Joined: Mon, 2022-02-28, 08:55

Re: Deadlock in DcmTLSSCU::initNetwork()

#4 Post by jogerh »

Thank you Marco!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Baidu [Spider], Bing [Bot] and 1 guest