Backport fix for CVE-2017-9214

Use %autosetup instead of %setup

Resolves: #1456797
f38
Timothy Redaelli 8 years ago
parent bf95546864
commit cd5e53c2ab

@ -0,0 +1,30 @@
From 7b7b186a8d40fc6f287cef2582702181da74bdc3 Mon Sep 17 00:00:00 2001
From: Ben Pfaff <blp@ovn.org>
Date: Sat, 20 May 2017 16:38:24 -0700
Subject: [PATCH] ofp-util: Fix buffer overread in
ofputil_pull_queue_get_config_reply10().
msg->size isn't the relevant measurement here because we're only supposed
to read 'len' bytes. Reading more than that causes 'len' to underflow to a
large number at the end of the loop.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Greg Rose <gvrose8192@gmail.com>
---
lib/ofp-util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index db27abf8bc..a6dd5dbddf 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -2598,7 +2598,7 @@ ofputil_pull_queue_get_config_reply10(struct ofpbuf *msg,
hdr = ofpbuf_at_assert(msg, 0, sizeof *hdr);
prop_len = ntohs(hdr->len);
- if (prop_len < sizeof *hdr || prop_len > msg->size || prop_len % 8) {
+ if (prop_len < sizeof *hdr || prop_len > len || prop_len % 8) {
return OFPERR_OFPBRC_BAD_LEN;
}

@ -30,7 +30,7 @@
Name: openvswitch Name: openvswitch
Version: 2.7.0 Version: 2.7.0
Release: 2%{?snapshot}%{?dist} Release: 3%{?snapshot}%{?dist}
Summary: Open vSwitch daemon/database/utilities Summary: Open vSwitch daemon/database/utilities
# Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the
@ -42,6 +42,8 @@ Source0: http://openvswitch.org/releases/%{name}-%{version}%{?snap_gitsha}.tar.g
Source1: http://fast.dpdk.org/rel/dpdk-%{dpdkver}.tar.gz Source1: http://fast.dpdk.org/rel/dpdk-%{dpdkver}.tar.gz
Source2: ovs-snapshot.sh Source2: ovs-snapshot.sh
Patch1: openvswitch-CVE-2017-9214.patch
%if %{with dpdk} %if %{with dpdk}
%define dpdkarches x86_64 i686 aarch64 ppc64le %define dpdkarches x86_64 i686 aarch64 ppc64le
@ -194,7 +196,7 @@ Requires: openvswitch openvswitch-ovn-common python2-openvswitch
Docker network plugins for OVN. Docker network plugins for OVN.
%prep %prep
%setup -q -n %{name}-%{version}%{?snap_gitsha} -a 1 %autosetup -n %{name}-%{version}%{?snap_gitsha} -a 1 -p 1
%build %build
%if %{with dpdk} %if %{with dpdk}
@ -648,6 +650,10 @@ rm -rf $RPM_BUILD_ROOT
%{_unitdir}/ovn-controller-vtep.service %{_unitdir}/ovn-controller-vtep.service
%changelog %changelog
* Wed May 31 2017 Timothy Redaelli <tredaelli@redhat.com> - 2.7.0-3
- Backport fix for CVE-2017-9214 (#1456797)
- Use %%autosetup instead of %%setup
* Mon May 29 2017 Timothy Redaelli <tredaelli@redhat.com> - 2.7.0-2 * Mon May 29 2017 Timothy Redaelli <tredaelli@redhat.com> - 2.7.0-2
- Install OVN firewalld rules - Install OVN firewalld rules

Loading…
Cancel
Save