* Tue Jan 21 2020 Miroslav Rezanina <mrezanin@redhat.com> - 4.2.0-7.el8
- kvm-tcp_emu-Fix-oob-access.patch [bz#1791568] - kvm-slirp-use-correct-size-while-emulating-IRC-commands.patch [bz#1791568] - kvm-slirp-use-correct-size-while-emulating-commands.patch [bz#1791568] - kvm-RHEL-hw-i386-disable-nested-PERF_GLOBAL_CTRL-MSR-sup.patch [bz#1559846] - Resolves: bz#1559846 (Nested KVM: limit VMX features according to CPU models - Fast Train) - Resolves: bz#1791568 (CVE-2020-7039 qemu-kvm: QEMU: slirp: OOB buffer access while emulating tcp protocols in tcp_emu() [rhel-av-8.2.0])
This commit is contained in:
parent
686f1d075a
commit
4508bb8a0c
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
/qemu-4.2.0.tar.xz
|
||||
/qemu-*.tar.xz
|
||||
|
@ -0,0 +1,53 @@
|
||||
From 481357ea8ae32b6894860c296cf6a2898260195f Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Date: Fri, 17 Jan 2020 13:18:27 +0100
|
||||
Subject: [PATCH 4/4] RHEL: hw/i386: disable nested PERF_GLOBAL_CTRL MSR
|
||||
support
|
||||
|
||||
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Message-id: <20200117131827.20361-1-pbonzini@redhat.com>
|
||||
Patchwork-id: 93405
|
||||
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH v3] RHEL: hw/i386: disable nested PERF_GLOBAL_CTRL MSR support
|
||||
Bugzilla: 1559846
|
||||
RH-Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
BZ: 1559846
|
||||
BRANCH: rhel-av-8.2.0
|
||||
BREW: 25775160
|
||||
UPSTREAM: RHEL only
|
||||
|
||||
Nested PERF_GLOBAL_CTRL support is not present in the 8.2 kernel. Drop the
|
||||
features via compat properties, they will be moved to 8.2 machine type compat
|
||||
properties in the 8.3 timeframe.
|
||||
|
||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
---
|
||||
No change, for v2 I mistakenly wrote "origin/rhel-av-8.2.0" as the
|
||||
branch. :(
|
||||
|
||||
hw/i386/pc.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/i386/pc.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
|
||||
index 61e70e4..73a0f11 100644
|
||||
--- a/hw/i386/pc.c
|
||||
+++ b/hw/i386/pc.c
|
||||
@@ -351,6 +351,8 @@ const size_t pc_compat_1_4_len = G_N_ELEMENTS(pc_compat_1_4);
|
||||
GlobalProperty pc_rhel_compat[] = {
|
||||
{ TYPE_X86_CPU, "host-phys-bits", "on" },
|
||||
{ TYPE_X86_CPU, "host-phys-bits-limit", "48" },
|
||||
+ { TYPE_X86_CPU, "vmx-entry-load-perf-global-ctrl", "off" },
|
||||
+ { TYPE_X86_CPU, "vmx-exit-load-perf-global-ctrl", "off" },
|
||||
/* bz 1508330 */
|
||||
{ "vfio-pci", "x-no-geforce-quirks", "on" },
|
||||
};
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,77 @@
|
||||
From 0f659af4870f151e25a7d2184b9a383bff58e3ba Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
||||
Date: Fri, 17 Jan 2020 12:07:57 +0100
|
||||
Subject: [PATCH 2/4] slirp: use correct size while emulating IRC commands
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Message-id: <20200117120758.1076549-3-marcandre.lureau@redhat.com>
|
||||
Patchwork-id: 93400
|
||||
O-Subject: [RHEL-AV-8.1.0 qemu-kvm + RHEL-AV-8.2.0 qemu-kvm PATCH 2/3] slirp: use correct size while emulating IRC commands
|
||||
Bugzilla: 1791568
|
||||
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
|
||||
From: Prasad J Pandit <pjp@fedoraproject.org>
|
||||
|
||||
While emulating IRC DCC commands, tcp_emu() uses 'mbuf' size
|
||||
'm->m_size' to write DCC commands via snprintf(3). This may
|
||||
lead to OOB write access, because 'bptr' points somewhere in
|
||||
the middle of 'mbuf' buffer, not at the start. Use M_FREEROOM(m)
|
||||
size to avoid OOB access.
|
||||
|
||||
Reported-by: Vishnu Dev TJ <vishnudevtj@gmail.com>
|
||||
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
|
||||
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
Message-Id: <20200109094228.79764-2-ppandit@redhat.com>
|
||||
|
||||
(cherry picked from libslirp commit ce131029d6d4a405cb7d3ac6716d03e58fb4a5d9)
|
||||
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
slirp/src/tcp_subr.c | 11 ++++++-----
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/slirp/src/tcp_subr.c b/slirp/src/tcp_subr.c
|
||||
index cbecd64..cedbfb2 100644
|
||||
--- a/slirp/src/tcp_subr.c
|
||||
+++ b/slirp/src/tcp_subr.c
|
||||
@@ -778,7 +778,8 @@ int tcp_emu(struct socket *so, struct mbuf *m)
|
||||
return 1;
|
||||
}
|
||||
m->m_len = bptr - m->m_data; /* Adjust length */
|
||||
- m->m_len += snprintf(bptr, m->m_size, "DCC CHAT chat %lu %u%c\n",
|
||||
+ m->m_len += snprintf(bptr, M_FREEROOM(m),
|
||||
+ "DCC CHAT chat %lu %u%c\n",
|
||||
(unsigned long)ntohl(so->so_faddr.s_addr),
|
||||
ntohs(so->so_fport), 1);
|
||||
} else if (sscanf(bptr, "DCC SEND %256s %u %u %u", buff, &laddr, &lport,
|
||||
@@ -788,8 +789,8 @@ int tcp_emu(struct socket *so, struct mbuf *m)
|
||||
return 1;
|
||||
}
|
||||
m->m_len = bptr - m->m_data; /* Adjust length */
|
||||
- m->m_len +=
|
||||
- snprintf(bptr, m->m_size, "DCC SEND %s %lu %u %u%c\n", buff,
|
||||
+ m->m_len += snprintf(bptr, M_FREEROOM(m),
|
||||
+ "DCC SEND %s %lu %u %u%c\n", buff,
|
||||
(unsigned long)ntohl(so->so_faddr.s_addr),
|
||||
ntohs(so->so_fport), n1, 1);
|
||||
} else if (sscanf(bptr, "DCC MOVE %256s %u %u %u", buff, &laddr, &lport,
|
||||
@@ -799,8 +800,8 @@ int tcp_emu(struct socket *so, struct mbuf *m)
|
||||
return 1;
|
||||
}
|
||||
m->m_len = bptr - m->m_data; /* Adjust length */
|
||||
- m->m_len +=
|
||||
- snprintf(bptr, m->m_size, "DCC MOVE %s %lu %u %u%c\n", buff,
|
||||
+ m->m_len += snprintf(bptr, M_FREEROOM(m),
|
||||
+ "DCC MOVE %s %lu %u %u%c\n", buff,
|
||||
(unsigned long)ntohl(so->so_faddr.s_addr),
|
||||
ntohs(so->so_fport), n1, 1);
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
71
kvm-slirp-use-correct-size-while-emulating-commands.patch
Normal file
71
kvm-slirp-use-correct-size-while-emulating-commands.patch
Normal file
@ -0,0 +1,71 @@
|
||||
From dfbfcf02738640ab83f7970e636b72b78f166675 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
||||
Date: Fri, 17 Jan 2020 12:07:58 +0100
|
||||
Subject: [PATCH 3/4] slirp: use correct size while emulating commands
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Message-id: <20200117120758.1076549-4-marcandre.lureau@redhat.com>
|
||||
Patchwork-id: 93401
|
||||
O-Subject: [RHEL-AV-8.1.0 qemu-kvm + RHEL-AV-8.2.0 qemu-kvm PATCH 3/3] slirp: use correct size while emulating commands
|
||||
Bugzilla: 1791568
|
||||
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
|
||||
From: Prasad J Pandit <pjp@fedoraproject.org>
|
||||
|
||||
While emulating services in tcp_emu(), it uses 'mbuf' size
|
||||
'm->m_size' to write commands via snprintf(3). Use M_FREEROOM(m)
|
||||
size to avoid possible OOB access.
|
||||
|
||||
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
|
||||
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
Message-Id: <20200109094228.79764-3-ppandit@redhat.com>
|
||||
|
||||
(cherry picked from commit 82ebe9c370a0e2970fb5695aa19aa5214a6a1c80)
|
||||
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
slirp/src/tcp_subr.c | 9 ++++-----
|
||||
1 file changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/slirp/src/tcp_subr.c b/slirp/src/tcp_subr.c
|
||||
index cedbfb2..954d1a6 100644
|
||||
--- a/slirp/src/tcp_subr.c
|
||||
+++ b/slirp/src/tcp_subr.c
|
||||
@@ -696,7 +696,7 @@ int tcp_emu(struct socket *so, struct mbuf *m)
|
||||
n4 = (laddr & 0xff);
|
||||
|
||||
m->m_len = bptr - m->m_data; /* Adjust length */
|
||||
- m->m_len += snprintf(bptr, m->m_size - m->m_len,
|
||||
+ m->m_len += snprintf(bptr, M_FREEROOM(m),
|
||||
"ORT %d,%d,%d,%d,%d,%d\r\n%s", n1, n2, n3, n4,
|
||||
n5, n6, x == 7 ? buff : "");
|
||||
return 1;
|
||||
@@ -731,8 +731,7 @@ int tcp_emu(struct socket *so, struct mbuf *m)
|
||||
n4 = (laddr & 0xff);
|
||||
|
||||
m->m_len = bptr - m->m_data; /* Adjust length */
|
||||
- m->m_len +=
|
||||
- snprintf(bptr, m->m_size - m->m_len,
|
||||
+ m->m_len += snprintf(bptr, M_FREEROOM(m),
|
||||
"27 Entering Passive Mode (%d,%d,%d,%d,%d,%d)\r\n%s",
|
||||
n1, n2, n3, n4, n5, n6, x == 7 ? buff : "");
|
||||
|
||||
@@ -758,8 +757,8 @@ int tcp_emu(struct socket *so, struct mbuf *m)
|
||||
if (m->m_data[m->m_len - 1] == '\0' && lport != 0 &&
|
||||
(so = tcp_listen(slirp, INADDR_ANY, 0, so->so_laddr.s_addr,
|
||||
htons(lport), SS_FACCEPTONCE)) != NULL)
|
||||
- m->m_len =
|
||||
- snprintf(m->m_data, m->m_size, "%d", ntohs(so->so_fport)) + 1;
|
||||
+ m->m_len = snprintf(m->m_data, M_ROOM(m),
|
||||
+ "%d", ntohs(so->so_fport)) + 1;
|
||||
return 1;
|
||||
|
||||
case EMU_IRC:
|
||||
--
|
||||
1.8.3.1
|
||||
|
59
kvm-tcp_emu-Fix-oob-access.patch
Normal file
59
kvm-tcp_emu-Fix-oob-access.patch
Normal file
@ -0,0 +1,59 @@
|
||||
From 5c2c5496083fa549e1dff903413bb6136fc19d8d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
||||
Date: Fri, 17 Jan 2020 12:07:56 +0100
|
||||
Subject: [PATCH 1/4] tcp_emu: Fix oob access
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Message-id: <20200117120758.1076549-2-marcandre.lureau@redhat.com>
|
||||
Patchwork-id: 93399
|
||||
O-Subject: [RHEL-AV-8.1.0 qemu-kvm + RHEL-AV-8.2.0 qemu-kvm PATCH 1/3] tcp_emu: Fix oob access
|
||||
Bugzilla: 1791568
|
||||
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
|
||||
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
|
||||
The main loop only checks for one available byte, while we sometimes
|
||||
need two bytes.
|
||||
|
||||
[ MA - minor conflict, CHANGELOG.md absent ]
|
||||
(cherry picked from libslirp commit 2655fffed7a9e765bcb4701dd876e9dab975f289)
|
||||
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
slirp/src/tcp_subr.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/slirp/src/tcp_subr.c b/slirp/src/tcp_subr.c
|
||||
index d6dd133..cbecd64 100644
|
||||
--- a/slirp/src/tcp_subr.c
|
||||
+++ b/slirp/src/tcp_subr.c
|
||||
@@ -886,6 +886,9 @@ int tcp_emu(struct socket *so, struct mbuf *m)
|
||||
break;
|
||||
|
||||
case 5:
|
||||
+ if (bptr == m->m_data + m->m_len - 1)
|
||||
+ return 1; /* We need two bytes */
|
||||
+
|
||||
/*
|
||||
* The difference between versions 1.0 and
|
||||
* 2.0 is here. For future versions of
|
||||
@@ -901,6 +904,10 @@ int tcp_emu(struct socket *so, struct mbuf *m)
|
||||
/* This is the field containing the port
|
||||
* number that RA-player is listening to.
|
||||
*/
|
||||
+
|
||||
+ if (bptr == m->m_data + m->m_len - 1)
|
||||
+ return 1; /* We need two bytes */
|
||||
+
|
||||
lport = (((uint8_t *)bptr)[0] << 8) + ((uint8_t *)bptr)[1];
|
||||
if (lport < 6970)
|
||||
lport += 256; /* don't know why */
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -67,7 +67,7 @@ Obsoletes: %1-rhev
|
||||
Summary: QEMU is a machine emulator and virtualizer
|
||||
Name: qemu-kvm
|
||||
Version: 4.2.0
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
# Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped
|
||||
Epoch: 15
|
||||
License: GPLv2 and GPLv2+ and CC-BY
|
||||
@ -135,6 +135,14 @@ Patch26: kvm-virtio-don-t-enable-notifications-during-polling.patch
|
||||
Patch27: kvm-usbredir-Prevent-recursion-in-usbredir_write.patch
|
||||
# For bz#1790844 - USB related fixes
|
||||
Patch28: kvm-xhci-recheck-slot-status.patch
|
||||
# For bz#1791568 - CVE-2020-7039 qemu-kvm: QEMU: slirp: OOB buffer access while emulating tcp protocols in tcp_emu() [rhel-av-8.2.0]
|
||||
Patch29: kvm-tcp_emu-Fix-oob-access.patch
|
||||
# For bz#1791568 - CVE-2020-7039 qemu-kvm: QEMU: slirp: OOB buffer access while emulating tcp protocols in tcp_emu() [rhel-av-8.2.0]
|
||||
Patch30: kvm-slirp-use-correct-size-while-emulating-IRC-commands.patch
|
||||
# For bz#1791568 - CVE-2020-7039 qemu-kvm: QEMU: slirp: OOB buffer access while emulating tcp protocols in tcp_emu() [rhel-av-8.2.0]
|
||||
Patch31: kvm-slirp-use-correct-size-while-emulating-commands.patch
|
||||
# For bz#1559846 - Nested KVM: limit VMX features according to CPU models - Fast Train
|
||||
Patch32: kvm-RHEL-hw-i386-disable-nested-PERF_GLOBAL_CTRL-MSR-sup.patch
|
||||
|
||||
BuildRequires: wget
|
||||
BuildRequires: rpm-build
|
||||
@ -1069,6 +1077,16 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Jan 21 2020 Miroslav Rezanina <mrezanin@redhat.com> - 4.2.0-7.el8
|
||||
- kvm-tcp_emu-Fix-oob-access.patch [bz#1791568]
|
||||
- kvm-slirp-use-correct-size-while-emulating-IRC-commands.patch [bz#1791568]
|
||||
- kvm-slirp-use-correct-size-while-emulating-commands.patch [bz#1791568]
|
||||
- kvm-RHEL-hw-i386-disable-nested-PERF_GLOBAL_CTRL-MSR-sup.patch [bz#1559846]
|
||||
- Resolves: bz#1559846
|
||||
(Nested KVM: limit VMX features according to CPU models - Fast Train)
|
||||
- Resolves: bz#1791568
|
||||
(CVE-2020-7039 qemu-kvm: QEMU: slirp: OOB buffer access while emulating tcp protocols in tcp_emu() [rhel-av-8.2.0])
|
||||
|
||||
* Wed Jan 15 2020 Danilo Cesar Lemes de Paula <ddepaula@redhat.com> - 4.2.0-6.el8
|
||||
- kvm-spapr-Don-t-trigger-a-CAS-reboot-for-XICS-XIVE-mode-.patch [bz#1733893]
|
||||
- kvm-vfio-pci-Don-t-remove-irqchip-notifier-if-not-regist.patch [bz#1782678]
|
||||
|
Loading…
Reference in New Issue
Block a user