|
|
73f313 |
From d4913063320e52d9c3716732d8c6b7396a2288b5 Mon Sep 17 00:00:00 2001
|
|
|
73f313 |
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
|
|
73f313 |
Date: Tue, 28 Jan 2020 13:32:53 +0100
|
|
|
73f313 |
Subject: [PATCH 3/6] slirp: disable tcp_emu()
|
|
|
73f313 |
MIME-Version: 1.0
|
|
|
73f313 |
Content-Type: text/plain; charset=UTF-8
|
|
|
73f313 |
Content-Transfer-Encoding: 8bit
|
|
|
73f313 |
|
|
|
73f313 |
Message-id: <20200128133253.794107-2-marcandre.lureau@redhat.com>
|
|
|
73f313 |
Patchwork-id: 93569
|
|
|
73f313 |
O-Subject: [RHEL-8.2.0 qemu-kvm + RHEL-7.7 qemu-kvm + RHEL-6.11 qemu-kvm PATCH 1/1] slirp: disable tcp_emu()
|
|
|
73f313 |
Bugzilla: 1791679
|
|
|
73f313 |
RH-Acked-by: Danilo de Paula <ddepaula@redhat.com>
|
|
|
73f313 |
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
73f313 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
73f313 |
|
|
|
73f313 |
Since libslirp 4.1, tcp_emu() is disabled by default because it is
|
|
|
73f313 |
known to cause several CVEs and is not useful today in most
|
|
|
73f313 |
cases. Qemu upstream doesn't have an option to enable it back at this
|
|
|
73f313 |
point, it's not clear if we ever want to expose that option anyway.
|
|
|
73f313 |
|
|
|
73f313 |
See also upstream commit 07c2a44b67e ("emu: disable by default")
|
|
|
73f313 |
|
|
|
73f313 |
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1791677
|
|
|
73f313 |
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
73f313 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
73f313 |
---
|
|
|
73f313 |
slirp/tcp_subr.c | 4 ++--
|
|
|
73f313 |
slirp/udp.c | 2 +-
|
|
|
73f313 |
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
73f313 |
|
|
|
73f313 |
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
|
|
|
73f313 |
index 8dae0cc..0ca7f02 100644
|
|
|
73f313 |
--- a/slirp/tcp_subr.c
|
|
|
73f313 |
+++ b/slirp/tcp_subr.c
|
|
|
73f313 |
@@ -516,7 +516,7 @@ tcp_tos(struct socket *so)
|
|
|
73f313 |
while(tcptos[i].tos) {
|
|
|
73f313 |
if ((tcptos[i].fport && (ntohs(so->so_fport) == tcptos[i].fport)) ||
|
|
|
73f313 |
(tcptos[i].lport && (ntohs(so->so_lport) == tcptos[i].lport))) {
|
|
|
73f313 |
- so->so_emu = tcptos[i].emu;
|
|
|
73f313 |
+ so->so_emu = 0; /* disabled */
|
|
|
73f313 |
return tcptos[i].tos;
|
|
|
73f313 |
}
|
|
|
73f313 |
i++;
|
|
|
73f313 |
@@ -526,7 +526,7 @@ tcp_tos(struct socket *so)
|
|
|
73f313 |
for (emup = tcpemu; emup; emup = emup->next) {
|
|
|
73f313 |
if ((emup->fport && (ntohs(so->so_fport) == emup->fport)) ||
|
|
|
73f313 |
(emup->lport && (ntohs(so->so_lport) == emup->lport))) {
|
|
|
73f313 |
- so->so_emu = emup->emu;
|
|
|
73f313 |
+ so->so_emu = 0; /* disabled */
|
|
|
73f313 |
return emup->tos;
|
|
|
73f313 |
}
|
|
|
73f313 |
}
|
|
|
73f313 |
diff --git a/slirp/udp.c b/slirp/udp.c
|
|
|
73f313 |
index 2188176..ee92790 100644
|
|
|
73f313 |
--- a/slirp/udp.c
|
|
|
73f313 |
+++ b/slirp/udp.c
|
|
|
73f313 |
@@ -339,7 +339,7 @@ udp_tos(struct socket *so)
|
|
|
73f313 |
while(udptos[i].tos) {
|
|
|
73f313 |
if ((udptos[i].fport && ntohs(so->so_fport) == udptos[i].fport) ||
|
|
|
73f313 |
(udptos[i].lport && ntohs(so->so_lport) == udptos[i].lport)) {
|
|
|
73f313 |
- so->so_emu = udptos[i].emu;
|
|
|
73f313 |
+ so->so_emu = 0; /* disabled */
|
|
|
73f313 |
return udptos[i].tos;
|
|
|
73f313 |
}
|
|
|
73f313 |
i++;
|
|
|
73f313 |
--
|
|
|
73f313 |
1.8.3.1
|
|
|
73f313 |
|