Accepting request 220501 from home:okir:branches:Base:System
Prevent a segfault of 'rpcinfo -b' on systems with tuntap devices (bnc#861577). Added: libtirpc-getbroadifs-crash.patch OBS-URL: https://build.opensuse.org/request/show/220501 OBS-URL: https://build.opensuse.org/package/show/Base:System/libtirpc?expand=0&rev=39
This commit is contained in:
parent
6705ba4caf
commit
74e28149ed
33
libtirpc-getbroadifs-crash.patch
Normal file
33
libtirpc-getbroadifs-crash.patch
Normal 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
|
||||
|
@ -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
|
||||
|
||||
|
@ -46,6 +46,7 @@ Patch35: libtirpc-clntunix_create.patch
|
||||
Patch36: libtirpc-misc-segfaults.patch
|
||||
Patch37: libtirpc-new-path-rpcbindsock.patch
|
||||
Patch38: libtirpc-taddr2uaddr-local.patch
|
||||
Patch39: libtirpc-getbroadifs-crash.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%define debug_package_requires libtirpc1 = %{version}-%{release}
|
||||
|
||||
@ -90,6 +91,7 @@ TCP over IPv4
|
||||
%patch36 -p1
|
||||
%patch37 -p1
|
||||
%patch38 -p1
|
||||
%patch39 -p1
|
||||
|
||||
%build
|
||||
autoreconf -fiv
|
||||
|
Loading…
Reference in New Issue
Block a user