Blame SOURCES/nss-pam-ldapd-0.8.13-Fix-use-after-free-in-read_hostent-and-read_netent.patch

c82b94
From e34fccc883e1fb6e7c0e1663e11ff9f96191971f Mon Sep 17 00:00:00 2001
c82b94
From: Lukas Slebodnik <lslebodn@redhat.com>
c82b94
Date: Mon, 27 Jan 2014 17:04:32 +0100
c82b94
Subject: [PATCH 1/2] Fix use after free in read_hostent and read_netent.
c82b94
c82b94
if NSS_STATUS_TRYAGAIN is returned from read_one_hostent or
c82b94
read_one_netent function tio_skipall will be called with NULL pointer
c82b94
It could happend in functions:
c82b94
	 _nss_ldap_getnetbyname_r
c82b94
	_nss_ldap_getnetbyaddr_r
c82b94
	_nss_ldap_gethostbyname2_r
c82b94
	_nss_ldap_gethostbyaddr_r
c82b94
---
c82b94
 nss/hosts.c    | 2 --
c82b94
 nss/networks.c | 2 --
c82b94
 2 files changed, 4 deletions(-)
c82b94
c82b94
diff --git a/nss/hosts.c b/nss/hosts.c
c82b94
index 86b6a77..0e7027e 100644
c82b94
--- a/nss/hosts.c
c82b94
+++ b/nss/hosts.c
c82b94
@@ -51,8 +51,6 @@
c82b94
 
c82b94
 #undef ERROR_OUT_BUFERROR
c82b94
 #define ERROR_OUT_BUFERROR(fp) \
c82b94
-  (void)tio_close(fp); \
c82b94
-  fp=NULL; \
c82b94
   *errnop=ERANGE; \
c82b94
   *h_errnop=TRY_AGAIN; \
c82b94
   return NSS_STATUS_TRYAGAIN;
c82b94
diff --git a/nss/networks.c b/nss/networks.c
c82b94
index 859ef0e..1403b45 100644
c82b94
--- a/nss/networks.c
c82b94
+++ b/nss/networks.c
c82b94
@@ -51,8 +51,6 @@
c82b94
 
c82b94
 #undef ERROR_OUT_BUFERROR
c82b94
 #define ERROR_OUT_BUFERROR(fp) \
c82b94
-  (void)tio_close(fp); \
c82b94
-  fp=NULL; \
c82b94
   *errnop=ERANGE; \
c82b94
   *h_errnop=TRY_AGAIN; \
c82b94
   return NSS_STATUS_TRYAGAIN;
c82b94
-- 
c82b94
1.8.5.3
c82b94