Debian Bug report logs - #534534
libssl0.9.8: valgrind/helgrind reports Possible data race during write

Package: openssl; Maintainer for openssl is Debian OpenSSL Team <pkg-openssl-devel@lists.alioth.debian.org>; Source for openssl is src:openssl.

Reported by: Russell Coker <russell@coker.com.au>

Date: Thu, 25 Jun 2009 06:03:01 UTC

Severity: normal

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian OpenSSL Team <pkg-openssl-devel@lists.alioth.debian.org>:
Bug#534534; Package libssl0.9.8. (Thu, 25 Jun 2009 06:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Russell Coker <russell@coker.com.au>:
New Bug report received and forwarded. Copy sent to Debian OpenSSL Team <pkg-openssl-devel@lists.alioth.debian.org>. (Thu, 25 Jun 2009 06:03:03 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Russell Coker <russell@coker.com.au>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libssl0.9.8: valgrind/helgrind reports Possible data race during write
Date: Thu, 25 Jun 2009 15:59:32 +1000
Package: libssl0.9.8
Version: 0.9.8g-15+lenny1
Severity: normal

==32465== Possible data race during write of size 4 at 0x55D7CE8
==32465==    at 0x52CD88D: CRYPTO_malloc (mem.c:298)
==32465==    by 0x534AC75: asn1_item_ex_combine_new (tasn_new.c:191)
==32465==    by 0x534E184: ASN1_item_ex_d2i (tasn_dec.c:399)
==32465==    by 0x534E253: ASN1_item_d2i (tasn_dec.c:134)
==32465==    by 0x5344B7E: d2i_PUBKEY (x_pubkey.c:388)
==32465==    by 0x40D580: SelectorInfo::Parse(char*) (dkimverify.cpp:1312)

Above is a helgrind error I get on my AMD64 system.

http://etbe.coker.com.au/2009/06/22/valgrindhelgrind-and-stl-string/

Below is a patch I wrote which appears to solve this problem.  According to
the comments on my above blog post it seems possible that this patch will also
slightly improve performance on SMP systems when under heavy load.

--- ../t/openssl-0.9.8g/crypto/mem.c	2003-12-01 23:06:15.000000000 +1100
+++ crypto/mem.c	2009-06-25 10:42:03.000000000 +1000
@@ -254,10 +254,12 @@
 
 	if (num <= 0) return NULL;
 
-	allow_customize = 0;
+	if(allow_customize)
+		allow_customize = 0;
 	if (malloc_debug_func != NULL)
 		{
-		allow_customize_debug = 0;
+		if(allow_customize_debug)
+			allow_customize_debug = 0;
 		malloc_debug_func(NULL, num, file, line, 0);
 		}
 	ret = malloc_locked_ex_func(num,file,line);
@@ -295,10 +297,12 @@
 
 	if (num <= 0) return NULL;
 
-	allow_customize = 0;
+	if(allow_customize)
+		allow_customize = 0;
 	if (malloc_debug_func != NULL)
 		{
-		allow_customize_debug = 0;
+		if(allow_customize_debug)
+			allow_customize_debug = 0;
 		malloc_debug_func(NULL, num, file, line, 0);
 		}
 	ret = malloc_ex_func(num,file,line);




Information forwarded to debian-bugs-dist@lists.debian.org, Debian OpenSSL Team <pkg-openssl-devel@lists.alioth.debian.org>:
Bug#534534; Package libssl0.9.8. (Thu, 25 Jun 2009 21:09:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kurt Roeckx <kurt@roeckx.be>:
Extra info received and forwarded to list. Copy sent to Debian OpenSSL Team <pkg-openssl-devel@lists.alioth.debian.org>. (Thu, 25 Jun 2009 21:09:04 GMT) Full text and rfc822 format available.

Message #10 received at 534534@bugs.debian.org (full text, mbox):

From: Kurt Roeckx <kurt@roeckx.be>
To: Russell Coker <russell@coker.com.au>, 534534@bugs.debian.org
Subject: Re: [Pkg-openssl-devel] Bug#534534: libssl0.9.8: valgrind/helgrind reports Possible data race during write
Date: Thu, 25 Jun 2009 23:05:56 +0200
On Thu, Jun 25, 2009 at 03:59:32PM +1000, Russell Coker wrote:
> Package: libssl0.9.8
> Version: 0.9.8g-15+lenny1
> Severity: normal
> 
> ==32465== Possible data race during write of size 4 at 0x55D7CE8
> ==32465==    at 0x52CD88D: CRYPTO_malloc (mem.c:298)
> ==32465==    by 0x534AC75: asn1_item_ex_combine_new (tasn_new.c:191)
> ==32465==    by 0x534E184: ASN1_item_ex_d2i (tasn_dec.c:399)
> ==32465==    by 0x534E253: ASN1_item_d2i (tasn_dec.c:134)
> ==32465==    by 0x5344B7E: d2i_PUBKEY (x_pubkey.c:388)
> ==32465==    by 0x40D580: SelectorInfo::Parse(char*) (dkimverify.cpp:1312)
> 
> Above is a helgrind error I get on my AMD64 system.
> 
> http://etbe.coker.com.au/2009/06/22/valgrindhelgrind-and-stl-string/
> 
> Below is a patch I wrote which appears to solve this problem.  According to
> the comments on my above blog post it seems possible that this patch will also
> slightly improve performance on SMP systems when under heavy load.

Thanks for the patch.  I will look into it shortly.


Kurt





Information forwarded to debian-bugs-dist@lists.debian.org, Debian OpenSSL Team <pkg-openssl-devel@lists.alioth.debian.org>:
Bug#534534; Package libssl0.9.8. (Fri, 26 Jun 2009 03:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to russell@coker.com.au:
Extra info received and forwarded to list. Copy sent to Debian OpenSSL Team <pkg-openssl-devel@lists.alioth.debian.org>. (Fri, 26 Jun 2009 03:30:02 GMT) Full text and rfc822 format available.

Message #15 received at 534534@bugs.debian.org (full text, mbox):

From: Russell Coker <russell@coker.com.au>
To: 534534@bugs.debian.org
Subject: more info
Date: Fri, 26 Jun 2009 13:26:31 +1000
In a quick test with Valgrind 3.3.1 (the Lenny version) the patch that I 
submitted with this bug report seemed to fix the problem.

Now I'm testing with Valgrind 3.4.1 (backported from Unstable to Lenny) and I 
get error reports again even with my patch applied.

So it seems that at best my patch would fix this for the Lenny version of 
Valgrind but not for Unstable.  I don't expect you to update OpenSSL in Lenny 
for this issue, so therefore my patch is not of any use.





Reply sent to Debian FTP Masters <ftpmaster@ftp-master.debian.org>:
You have taken responsibility. (Sat, 19 Nov 2011 09:50:14 GMT) Full text and rfc822 format available.

Notification sent to Russell Coker <russell@coker.com.au>:
Bug acknowledged by developer. (Sat, 19 Nov 2011 09:50:19 GMT) Full text and rfc822 format available.

Message #20 received at 534534-done@bugs.debian.org (full text, mbox):

From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
To: 351684-done@bugs.debian.org,394107-done@bugs.debian.org,431918-done@bugs.debian.org,511727-done@bugs.debian.org,520021-done@bugs.debian.org,524682-done@bugs.debian.org,526747-done@bugs.debian.org,534534-done@bugs.debian.org,534656-done@bugs.debian.org,534683-done@bugs.debian.org,534685-done@bugs.debian.org,534687-done@bugs.debian.org,534699-done@bugs.debian.org,534706-done@bugs.debian.org,534889-done@bugs.debian.org,534892-done@bugs.debian.org,536229-done@bugs.debian.org,546521-done@bugs.debian.org,556968-done@bugs.debian.org,557261-done@bugs.debian.org,561558-done@bugs.debian.org,645805-done@bugs.debian.org,
Cc: openssl098@packages.debian.org, openssl098@packages.qa.debian.org
Subject: Bug#641975: Removed package(s) from unstable
Date: Sat, 19 Nov 2011 09:44:37 +0000
Version: 0.9.8o-7+rm

Dear submitter,

as the package openssl098 has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see http://bugs.debian.org/641975

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@debian.org.

Debian distribution maintenance software
pp.
Luca Falavigna (the ftpmaster behind the curtain)




Bug No longer marked as fixed in versions 0.9.8o-7+rm and reopened. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 19 Nov 2011 10:57:45 GMT) Full text and rfc822 format available.

Bug reassigned from package 'libssl0.9.8' to 'openssl'. Request was from Kurt Roeckx <kurt@roeckx.be> to control@bugs.debian.org. (Sat, 19 Nov 2011 10:57:57 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions openssl/0.9.8g-15+lenny1. Request was from Kurt Roeckx <kurt@roeckx.be> to control@bugs.debian.org. (Sat, 19 Nov 2011 10:57:58 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 00:45:51 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.