diff --git a/0001-common-security-fix-Make-sure-sockets-only-listen-lo.patch b/0001-common-security-fix-Make-sure-sockets-only-listen-lo.patch deleted file mode 100644 index 73cd3dc..0000000 --- a/0001-common-security-fix-Make-sure-sockets-only-listen-lo.patch +++ /dev/null @@ -1,34 +0,0 @@ -From df1f5c4d70d0c19ad40072f5246ca457e7f9849e Mon Sep 17 00:00:00 2001 -From: Joshua Hill -Date: Tue, 29 Dec 2015 22:27:17 +0100 -Subject: [PATCH] common: [security fix] Make sure sockets only listen locally - ---- - common/socket.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/common/socket.c b/common/socket.c -index b276864..e2968a6 100644 ---- a/common/socket.c -+++ b/common/socket.c -@@ -172,7 +172,7 @@ int socket_create(uint16_t port) - - memset((void *) &saddr, 0, sizeof(saddr)); - saddr.sin_family = AF_INET; -- saddr.sin_addr.s_addr = htonl(INADDR_ANY); -+ saddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - saddr.sin_port = htons(port); - - if (0 > bind(sfd, (struct sockaddr *) &saddr, sizeof(saddr))) { -@@ -329,7 +329,7 @@ int socket_accept(int fd, uint16_t port) - - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; -- addr.sin_addr.s_addr = htonl(INADDR_ANY); -+ addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - addr.sin_port = htons(port); - - addr_len = sizeof(addr); --- -2.5.0 - diff --git a/CVE-2016-5104.patch b/CVE-2016-5104.patch new file mode 100644 index 0000000..7a00cfe --- /dev/null +++ b/CVE-2016-5104.patch @@ -0,0 +1,31 @@ +From df1f5c4d70d0c19ad40072f5246ca457e7f9849e Mon Sep 17 00:00:00 2001 +From: Joshua Hill +Date: Tue, 29 Dec 2015 22:27:17 +0100 +Subject: [PATCH] common: [security fix] Make sure sockets only listen locally + +--- + common/socket.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/common/socket.c b/common/socket.c +index b276864..e2968a6 100644 +--- a/common/socket.c ++++ b/common/socket.c +@@ -172,7 +172,7 @@ int socket_create(uint16_t port) + + memset((void *) &saddr, 0, sizeof(saddr)); + saddr.sin_family = AF_INET; +- saddr.sin_addr.s_addr = htonl(INADDR_ANY); ++ saddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + saddr.sin_port = htons(port); + + if (0 > bind(sfd, (struct sockaddr *) &saddr, sizeof(saddr))) { +@@ -329,7 +329,7 @@ int socket_accept(int fd, uint16_t port) + + memset(&addr, 0, sizeof(addr)); + addr.sin_family = AF_INET; +- addr.sin_addr.s_addr = htonl(INADDR_ANY); ++ addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + addr.sin_port = htons(port); + + addr_len = sizeof(addr); diff --git a/libimobiledevice.spec b/libimobiledevice.spec index c7e5041..f18ec07 100644 --- a/libimobiledevice.spec +++ b/libimobiledevice.spec @@ -7,7 +7,7 @@ Name: libimobiledevice Version: 1.2.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Library for connecting to mobile devices Group: System Environment/Libraries @@ -17,7 +17,7 @@ Source0: http://www.libimobiledevice.org/downloads/%{name}-%{version}.tar. # Fix the build with gnutls 3.4 Patch0: 0001-Updated-cert-callback-to-gnutls3-API.patch Patch1: 0001-Fix-installation_proxy-when-using-GnuTLS-instead-of-.patch -Patch2: 0001-common-security-fix-Make-sure-sockets-only-listen-lo.patch +Patch2: CVE-2016-5104.patch BuildRequires: glib2-devel BuildRequires: gnutls-devel @@ -115,6 +115,9 @@ find %{buildroot} -type f -name "*.la" -delete %endif %changelog +* Fri May 27 2016 Peter Robinson 1.2.0-7 +- Fix CVE-2016-5104 + * Mon Mar 14 2016 Bastien Nocera 1.2.0-6 - Add fix for potential security issue