Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-3664

SASL support in inetd mode caused SIGSEGV during shutdown

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.x
    • 1.7.0
    • svnserve

    Description

      When running svnserve in inetd mode and using SASL authentication, a
      segmentation violation occurs.  
      
      When running in inetd mode, svnserve doesn't allocate a new pool for processing
      a request.  In other modes, svnserve uses a new pool for each request.  Using a
      single pool causes all cleanup callbacks to be registered on the same pool. 
      During APR shutdown, these callbacks are called in registration order.  This
      results in sasl_done() being called prior to sasl_dispose(), which violates the
      API requirements for sasl_done(), which should always be the last sasl_ function
      called.  The net result is that sasl_done() calls dlclose() for any
      authentication modules loaded by sasl, and then sasl_dispose() tries to call
      module-specific shutdown functions which are unaccessable.  This results in a
      SIGSEGV.
      
      I believe that if APR called the pool cleanup functions in the reverse of the
      registration order, this issue would go away.  It can be worked around in
      Subversion itself by allocating a subpool for handling the single inetd request.
      

      Original issue reported by ajkloss

      Attachments

        Activity

          People

            stsp Stefan Sperling
            subversion-importer Subversion Importer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: