Accepting request 220669 from Base:System

Prevent a segfault of 'rpcinfo -b' on systems with tuntap devices (bnc#861577).
Added: libtirpc-getbroadifs-crash.patch (forwarded request 220501 from okir)

OBS-URL: https://build.opensuse.org/request/show/220669
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libtirpc?expand=0&rev=35
This commit is contained in:
Stephan Kulow 2014-02-04 20:49:51 +00:00 committed by Git OBS Bridge
commit 25cdd04345
3 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,33 @@
From 5aa9bf181ec1ce900ca4e84c62e3b31346478626 Mon Sep 17 00:00:00 2001
From: Olaf Kirch <okir@suse.de>
Date: Fri, 31 Jan 2014 16:37:25 +0100
Subject: [PATCH] Prevent a segfault of "rpcinfo -b" on systems with tuntap
devices
Linux tuntap devices and other virtual network devices, if not
configured, will be reported by getifaddrs() with a NULL ifa_addr
pointer. __rpc_getifaddrs would trip over that, because it derefenced
the ifa_addr pointer without checking.
Signed-off-by: Olaf Kirch <okir@suse.de>
---
src/clnt_bcast.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/clnt_bcast.c b/src/clnt_bcast.c
index 1055545..6ab0851 100644
--- a/src/clnt_bcast.c
+++ b/src/clnt_bcast.c
@@ -143,7 +143,8 @@ __rpc_getbroadifs(int af, int proto, int socktype, broadlist_t *list)
return 0;
for (ifap = ifp; ifap != NULL; ifap = ifap->ifa_next) {
- if (ifap->ifa_addr->sa_family != af ||
+ if (ifap->ifa_addr == NULL || /* happens for eg tuntap devices */
+ ifap->ifa_addr->sa_family != af ||
!(ifap->ifa_flags & IFF_UP))
continue;
bip = (struct broadif *)malloc(sizeof *bip);
--
1.7.12.4

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jan 31 15:56:16 UTC 2014 - okir@suse.com
- Prevent a segfault of 'rpcinfo -b' on systems with tuntap devices (bnc#861577).
Added: libtirpc-getbroadifs-crash.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jan 10 11:54:35 UTC 2014 - okir@suse.com Fri Jan 10 11:54:35 UTC 2014 - okir@suse.com

View File

@ -46,6 +46,7 @@ Patch35: libtirpc-clntunix_create.patch
Patch36: libtirpc-misc-segfaults.patch Patch36: libtirpc-misc-segfaults.patch
Patch37: libtirpc-new-path-rpcbindsock.patch Patch37: libtirpc-new-path-rpcbindsock.patch
Patch38: libtirpc-taddr2uaddr-local.patch Patch38: libtirpc-taddr2uaddr-local.patch
Patch39: libtirpc-getbroadifs-crash.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define debug_package_requires libtirpc1 = %{version}-%{release} %define debug_package_requires libtirpc1 = %{version}-%{release}
@ -90,6 +91,7 @@ TCP over IPv4
%patch36 -p1 %patch36 -p1
%patch37 -p1 %patch37 -p1
%patch38 -p1 %patch38 -p1
%patch39 -p1
%build %build
autoreconf -fiv autoreconf -fiv