update to libtirpc-1.2.6

This commit is contained in:
lunankun 2020-07-28 18:18:40 +08:00
parent dbbbc7ead8
commit 918aacb9e7
4 changed files with 58 additions and 1 deletions

View File

@ -0,0 +1,50 @@
From c300af4954948019eb58bd2cefdf373cb2994eff Mon Sep 17 00:00:00 2001
From: srinivasa rao cheruku <srinivascheruku@yahoo.com>
Date: Thu, 28 May 2020 12:38:54 -0400
Subject: [PATCH 3/5] __svc_vc_dodestroy: fix double free of xp_ltaddr.buf
In svc_fd_create(), upon error, freeing xp_ltaddr.buf and null
is returned to the caller as expected. The allocated SVCXPRT is
added to svc_pollfd and during destroy __svc_vc_dodestroy(),
xp_ltaddr.buf is being freed again causing double free.
Fix is to reset the pointer when ever freed first.
Reported-by: Sreedharbabu Vykuntam <sreedharbabu.vykuntam@quest.com>
Reviewed-by: Ian Kent <raven@themaw.net>
Signed-off-by: Srinivasarao Cheruku <srinivascheruku@yahoo.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
---
src/svc_vc.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/svc_vc.c b/src/svc_vc.c
index c23cd36..f1d9f00 100644
--- a/src/svc_vc.c
+++ b/src/svc_vc.c
@@ -243,7 +243,7 @@ svc_fd_create(fd, sendsize, recvsize)
goto freedata;
}
if (!__rpc_set_netbuf(&ret->xp_rtaddr, &ss, sizeof(ss))) {
- warnx("svc_fd_create: no mem for local addr");
+ warnx("svc_fd_create: no mem for remote addr");
goto freedata;
}
@@ -253,9 +253,10 @@ svc_fd_create(fd, sendsize, recvsize)
return ret;
freedata:
- if (ret->xp_ltaddr.buf != NULL)
+ if (ret->xp_ltaddr.buf != NULL) {
mem_free(ret->xp_ltaddr.buf, rep->xp_ltaddr.maxlen);
-
+ ret->xp_ltaddr.buf = NULL;
+ }
return NULL;
}
--
1.8.3.1

Binary file not shown.

BIN
libtirpc-1.2.6.tar.bz2 Normal file

Binary file not shown.

View File

@ -1,11 +1,12 @@
Name: libtirpc Name: libtirpc
Version: 1.1.4 Version: 1.2.6
Release: 1 Release: 1
Summary: Transport-independent RPC library Summary: Transport-independent RPC library
License: SISSL and BSD License: SISSL and BSD
URL: http://git.linux-nfs.org/?p=steved/libtirpc.git;a=summary URL: http://git.linux-nfs.org/?p=steved/libtirpc.git;a=summary
Source0: http://downloads.sourceforge.net/libtirpc/%{name}-%{version}.tar.bz2 Source0: http://downloads.sourceforge.net/libtirpc/%{name}-%{version}.tar.bz2
Patch01: 0001-update-libtirpc-to-enable-tcp-port-listening.patch Patch01: 0001-update-libtirpc-to-enable-tcp-port-listening.patch
Patch02: 0003-__svc_vc_dodestroy-fix-double-free-of-xp_ltaddr.buf.patch
BuildRequires: automake autoconf libtool pkgconfig krb5-devel BuildRequires: automake autoconf libtool pkgconfig krb5-devel
%description %description
@ -63,5 +64,11 @@ mv %{buildroot}%{_mandir}/man3 %{buildroot}%{_mandir}/man3t
%{_mandir}/*/* %{_mandir}/*/*
%changelog %changelog
* Tue Jul 28 2020 lunankun <lunankun@huawei.com> -1.2.6-1
- Type:update
- Id:NA
- SUG:NA
- DESC:update to libtirpc-1.2.6
* Thu Aug 29 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.1.4-1 * Thu Aug 29 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.1.4-1
- Package init - Package init