[openldap/f14/master] fix: possible null pointer dereference in NSS implementation

jvcelak jvcelak at fedoraproject.org
Fri Mar 18 23:59:43 UTC 2011


commit 35ee4acc2f5e3db4eb4b9d629baafb05b50a6b5f
Author: Jan Vcelak <jvcelak at redhat.com>
Date:   Fri Mar 18 20:09:39 2011 +0100

    fix: possible null pointer dereference in NSS implementation
    
    Resolves: #684035 (RHEL)

 openldap-nss-non-blocking.patch |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/openldap-nss-non-blocking.patch b/openldap-nss-non-blocking.patch
index 38508f3..e6c069d 100644
--- a/openldap-nss-non-blocking.patch
+++ b/openldap-nss-non-blocking.patch
@@ -6,7 +6,7 @@ Author: Rich Megginson (rmeggins at redhat.com)
 
 diff -u -uNPrp openldap-2.4.23/libraries/libldap/tls_m.c openldap-2.4.23.new/libraries/libldap/tls_m.c
 --- openldap-2.4.23/libraries/libldap/tls_m.c	2010-11-22 15:50:48.752386500 +0100
-+++ openldap-2.4.23.new/libraries/libldap/tls_m.c	2010-11-22 15:53:44.936512466 +0100
++++ openldap-2.4.23.new/libraries/libldap/tls_m.c	2011-03-14 11:48:21.007830179 +0100
 @@ -2105,49 +2105,74 @@ struct tls_data {
  	   we will just see if the IO op returns EAGAIN or EWOULDBLOCK,
  	   and just set this flag */
@@ -96,7 +96,7 @@ diff -u -uNPrp openldap-2.4.23/libraries/libldap/tls_m.c openldap-2.4.23.new/lib
 -	if (out_flags) {
 -		*out_flags = polldesc.out_flags;
 +	if ( p->firsttag == LBER_SEQUENCE ) {
-+		if ( *thebyte ) {
++		if ( thebyte ) {
 +			*thebyte = p->firsttag;
 +		}
 +		return 1;
@@ -333,15 +333,18 @@ diff -u -uNPrp openldap-2.4.23/libraries/libldap/tls_m.c openldap-2.4.23.new/lib
  
  	if ( p == NULL || p->sbiod == NULL ) {
  		return PR_FAILURE;
-@@ -2669,7 +2658,7 @@ static PRStatus PR_CALLBACK
+@@ -2669,9 +2658,9 @@ static PRStatus PR_CALLBACK
  tlsm_PR_GetSocketOption(PRFileDesc *fd, PRSocketOptionData *data)
  {
  	struct tls_data		*p;
 -	p = (struct tls_data *)fd->secret;
 + 	p = tlsm_get_pvt_tls_data( fd );
  
- 	if ( !data ) {
+-	if ( !data ) {
++	if ( p == NULL || data == NULL ) {
  		return PR_FAILURE;
+ 	}
+ 
 @@ -2804,6 +2793,7 @@ tlsm_sb_setup( Sockbuf_IO_Desc *sbiod, v
  	fd->secret = (PRFilePrivate *)p;
  	p->session = session;


More information about the scm-commits mailing list