[Libreoffice-commits] core.git: external/neon

Thorsten Behrens (via logerrit) logerrit at kemper.freedesktop.org
Fri Dec 20 21:09:03 UTC 2019


 external/neon/UnpackedTarball_neon.mk             |    1 +
 external/neon/neon_fix_sspi_session_timeout.patch |   22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+)

New commits:
commit df52a213277827a16793791fecc33139582c84c2
Author:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
AuthorDate: Fri Dec 20 07:03:47 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Fri Dec 20 22:07:45 2019 +0100

    tdf#129519 Fix crash during WebDAV lock refresh
    
    - NeonSession is shared amongst several files (if on the same server
      instance)
      - there's explicit code in DAVSessionFactory::createDAVSession()
        to share sessions for same host/target
    - so then after a while, locks get refreshed, and session timeout
      hits
    - first lock -> no prob, ne_auth.c:ah_post_send() has
      auth_challenge() failing, returning error, which puts that lock
      into m_aRemoveDeferred list
    - _but_ ah_post_send() then does a clean_session(), and the next
      lock refresh from the same session hits NULLPTR session host
    
    -> so let's delay any sspi_host cleanup until session object gets
       freed, instead of just cleaned
    
    Change-Id: Ie257310c47913aef9fcfec92c1722d64b28c4f89
    Reviewed-on: https://gerrit.libreoffice.org/85614
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/external/neon/UnpackedTarball_neon.mk b/external/neon/UnpackedTarball_neon.mk
index dacf425fa80f..74ac2eb38c97 100644
--- a/external/neon/UnpackedTarball_neon.mk
+++ b/external/neon/UnpackedTarball_neon.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,neon,\
 	external/neon/ubsan.patch \
 	external/neon/neon_fix_lock_token_on_if.patch \
 	external/neon/neon_fix_lock_timeout_windows.patch \
+	external/neon/neon_fix_sspi_session_timeout.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/neon/neon_fix_sspi_session_timeout.patch b/external/neon/neon_fix_sspi_session_timeout.patch
new file mode 100644
index 000000000000..5003fda35022
--- /dev/null
+++ b/external/neon/neon_fix_sspi_session_timeout.patch
@@ -0,0 +1,22 @@
+--- src/ne_auth.c~	2019-12-05 15:38:50.246997951 +0100
++++ src/ne_auth.c	2019-12-20 06:54:31.555836285 +0100
+@@ -300,8 +300,6 @@
+     sess->sspi_token = NULL;
+     ne_sspi_destroy_context(sess->sspi_context);
+     sess->sspi_context = NULL;
+-    if (sess->sspi_host) ne_free(sess->sspi_host);
+-    sess->sspi_host = NULL;
+ #endif
+ #ifdef HAVE_NTLM
+     if (sess->ntlm_context) {
+@@ -1599,6 +1597,10 @@
+     }
+ 
+     clean_session(sess);
++#ifdef HAVE_SSPI
++    if (sess->sspi_host) ne_free(sess->sspi_host);
++    sess->sspi_host = NULL;
++#endif
+     ne_free(sess);
+ }
+ 


More information about the Libreoffice-commits mailing list