Uploaded image for project: 'DMC - Development'
  1. DMC - Development
  2. DMC-969

davix increments the refcount for OpenSSL structures in a non-atomic way

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: davix 0.6.6
    • Fix Version/s: davix 0.6.7
    • Component/s: Davix
    • Security Level: Public Data (This ticket is visible to anyone on the internet and will be indexed by search engines)
    • Labels:
      None

      Description

      And the award for the most annoying bug to trace, ever, goes to...

      (x defined as X509* )
      x->references++;
      

      which should have been:

          CRYPTO_add(&x->references,1,CRYPTO_LOCK_X509);
      

      The bug was in libneon, and as far I see exists even in their latest vanilla version.

      This causes crashes with a frequency which depends on how often TLS connections are being initialized and destroyed. Hours when heavily recycling sessions, or 1-2 minutes if not. (and using tens / hundreds of threads)

      There might still be something wrong with the refcounting, but this fix alone seems to make things far more stable. To be continued ( ... but hopefully not )

        Attachments

          Activity

            People

            • Assignee:
              gbitzes Georgios Bitzes
              Reporter:
              furano Fabrizio Furano
              Component Watchers:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: