GPG Lockfile (concurrency) issue, keyring lost: awarding 300$ for bugfix

Werner Koch wk at gnupg.org
Thu Aug 19 11:55:20 CEST 2004


[Sorry for the delay; you are not subscribed to the ML and no one
moderated until today.]

On Fri, 13 Aug 2004 13:38:17 +0200, Stefan Haller said:

> I used truss to generate some output. Please find it attached. Search for 
> the term "signal".

Is it possible that truss indicates a NULL pointer by ""?

  unlink("/var/tmp/keyring_lost_test/.#lkccaa8.unknown.14156") = 0
  unlink("")					Err#14 EFAULT
      Incurred fault #5, FLTACCESS  %pc = 0xFF0423FC

Then the patch is easy:

diff -u -r1.15.2.3 dotlock.c
--- util/dotlock.c	13 Aug 2004 17:00:02 -0000	1.15.2.3
+++ util/dotlock.c	19 Aug 2004 09:43:00 -0000
@@ -206,9 +206,10 @@
       {
 	if (!h->disable)
           {
-	    if (h->locked)
+	    if (h->locked && h->lockname)
               unlink (h->lockname);
-	    unlink (h->tname);
+            if (h->tname)
+              unlink (h->tname);
 	    m_free (h->tname);
 	    m_free (h->lockname);
           }








More information about the Gnupg-devel mailing list