qemu: fix CVE-2021-3592
PATCH 1/8 qemu: fix CVE-2021-3592
--- meta/recipes-devtools/qemu/qemu.inc | 3 + .../qemu/qemu/CVE-2021-3592_1.patch | 58 ++++++ .../qemu/qemu/CVE-2021-3592_2.patch | 165 ++++++++++++++++++ .../qemu/qemu/CVE-2021-3592_3.patch | 40 +++++ 4 files changed, 266 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3592_1.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3592_2.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3592_3.patch
meta/recipes-devtools/qemu/qemu.inc +3 -0
@@ -70,6 +70,9 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2021-3607.patch \ file://CVE-2021-3608.patch \ file://CVE-2021-3682.patch \ + file://CVE-2021-3592_1.patch \ + file://CVE-2021-3592_2.patch \ + file://CVE-2021-3592_3.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
meta/recipes-devtools/qemu/qemu/CVE-2021-3592_1.patch new file +58 -0
58 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2021-3592_2.patch new file +165 -0
165 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2021-3592_3.patch new file +40 -0
@@ -0,0 +1,40 @@ +From d175694c607273b6c8f09717de9c455891d6765d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <[email protected]> +Date: Fri, 4 Jun 2021 16:15:14 +0400 +Subject: [PATCH 03/12] bootp: check bootp_input buffer size +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: CVE-2021-3592 +Fixes: https://gitlab.freedesktop.org/slirp/libslirp/-/issues/44 + +Signed-off-by: Marc-André Lureau <[email protected]> + +Upstream-Status: Backport [2eca0838eee1da96204545e22cdaed860d9d7c6c] +CVE: CVE-2021-3592 + +Signed-off-by: Sakib Sajal <[email protected]> +--- + slirp/src/bootp.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/slirp/src/bootp.c b/slirp/src/bootp.c +index e0db8d196..cafa1eb1f 100644 +--- a/slirp/src/bootp.c ++++ b/slirp/src/bootp.c +@@ -365,9 +365,9 @@ static void bootp_reply(Slirp *slirp, + + void bootp_input(struct mbuf *m) + { +- struct bootp_t *bp = mtod(m, struct bootp_t *); ++ struct bootp_t *bp = mtod_check(m, sizeof(struct bootp_t)); + +- if (bp->bp_op == BOOTP_REQUEST) { ++ if (bp && bp->bp_op == BOOTP_REQUEST) { + bootp_reply(m->slirp, bp, m_end(m)); + } + } +-- +2.31.1 +
Signature · 1 line
2.33.0
PATCH 2/8 qemu: fix CVE-2021-3593
--- meta/recipes-devtools/qemu/qemu.inc | 1 + .../qemu/qemu/CVE-2021-3593.patch | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3593.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
@@ -73,6 +73,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2021-3592_1.patch \ file://CVE-2021-3592_2.patch \ file://CVE-2021-3592_3.patch \ + file://CVE-2021-3593.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
meta/recipes-devtools/qemu/qemu/CVE-2021-3593.patch new file +40 -0
@@ -0,0 +1,40 @@ +From fe99634066e1074aaf55e83b576385877d7e4bcc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <[email protected]> +Date: Fri, 4 Jun 2021 16:32:55 +0400 +Subject: [PATCH 04/12] upd6: check udp6_input buffer size +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: CVE-2021-3593 +Fixes: https://gitlab.freedesktop.org/slirp/libslirp/-/issues/45 + +Signed-off-by: Marc-André Lureau <[email protected]> + +Upstream-Status: Backport [de71c15de66ba9350bf62c45b05f8fbff166517b] +CVE: CVE-2021-3593 + +Signed-off-by: Sakib Sajal <[email protected]> +--- + slirp/src/udp6.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/slirp/src/udp6.c b/slirp/src/udp6.c +index 6f9486bbc..8c490e4d1 100644 +--- a/slirp/src/udp6.c ++++ b/slirp/src/udp6.c +@@ -28,7 +28,10 @@ void udp6_input(struct mbuf *m) + ip = mtod(m, struct ip6 *); + m->m_len -= iphlen; + m->m_data += iphlen; +- uh = mtod(m, struct udphdr *); ++ uh = mtod_check(m, sizeof(struct udphdr)); ++ if (uh == NULL) { ++ goto bad; ++ } + m->m_len += iphlen; + m->m_data -= iphlen; + +-- +2.31.1 +
Signature · 1 line
2.33.0
PATCH 4/8 qemu: fix CVE-2021-3594
In reply to Sakib Sajal--- meta/recipes-devtools/qemu/qemu.inc | 1 + .../qemu/qemu/CVE-2021-3594.patch | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3594.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
@@ -76,6 +76,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2021-3593.patch \ file://CVE-2021-3595_1.patch \ file://CVE-2021-3595_2.patch \ + file://CVE-2021-3594.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
meta/recipes-devtools/qemu/qemu/CVE-2021-3594.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 7a5ffd5475f2cbfe3cf91d9584893f1a4b3b4dff Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <[email protected]> +Date: Fri, 4 Jun 2021 16:40:23 +0400 +Subject: [PATCH 07/12] udp: check upd_input buffer size +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: CVE-2021-3594 +Fixes: https://gitlab.freedesktop.org/slirp/libslirp/-/issues/47 + +Signed-off-by: Marc-André Lureau <[email protected]> + +Upstream-Status: Backport [74572be49247c8c5feae7c6e0b50c4f569ca9824] +CVE: CVE-2021-3594 + +Signed-off-by: Sakib Sajal <[email protected]> +--- + slirp/src/udp.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/slirp/src/udp.c b/slirp/src/udp.c +index 0ad44d7c0..18b4acdfa 100644 +--- a/slirp/src/udp.c ++++ b/slirp/src/udp.c +@@ -93,7 +93,10 @@ void udp_input(register struct mbuf *m, int iphlen) + /* + * Get IP and UDP header together in first mbuf. + */ +- ip = mtod(m, struct ip *); ++ ip = mtod_check(m, iphlen + sizeof(struct udphdr)); ++ if (ip == NULL) { ++ goto bad; ++ } + uh = (struct udphdr *)((char *)ip + iphlen); + + /* +-- +2.31.1 +
Signature · 1 line
2.33.0
PATCH 6/8 qemu: fix CVE-2021-3748
In reply to Sakib Sajal--- meta/recipes-devtools/qemu/qemu.inc | 1 + .../qemu/qemu/CVE-2021-3748.patch | 127 ++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3748.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
@@ -78,6 +78,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2021-3595_2.patch \ file://CVE-2021-3594.patch \ file://CVE-2021-3713.patch \ + file://CVE-2021-3748.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
meta/recipes-devtools/qemu/qemu/CVE-2021-3748.patch new file +127 -0
127 lines not on this page · raw message
Signature · 1 line
2.33.0
PATCH 8/8 qemu: fix CVE-2021-20196
In reply to Sakib Sajal--- meta/recipes-devtools/qemu/qemu.inc | 2 + .../qemu/qemu/CVE-2021-20196_1.patch | 54 +++++++++++++++ .../qemu/qemu/CVE-2021-20196_2.patch | 67 +++++++++++++++++++ 3 files changed, 123 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-20196_1.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-20196_2.patch
meta/recipes-devtools/qemu/qemu.inc +2 -0
@@ -80,6 +80,8 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2021-3713.patch \ file://CVE-2021-3748.patch \ file://CVE-2021-3930.patch \ + file://CVE-2021-20196_1.patch \ + file://CVE-2021-20196_2.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
meta/recipes-devtools/qemu/qemu/CVE-2021-20196_1.patch new file +54 -0
54 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2021-20196_2.patch new file +67 -0
67 lines not on this page · raw message
Signature · 1 line
2.33.0
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [OE-core] [hardknott][PATCH 4/8] qemu: fix CVE-2021-3594
Please disregard, sorry for the barrage of incomplete patch set.
Quoted 74 lines · Sakib Sajal
Signed-off-by Sakib Sajal <[email protected]>--- meta/recipes-devtools/qemu/qemu.inc | 1 + .../qemu/qemu/CVE-2021-3594.patch | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+)create mode 100644
meta/recipes-devtools/qemu/qemu/CVE-2021-3594.patchmeta/recipes-devtools/qemu/qemu.inc +1
-0@@ -76,6 +76,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2021-3593.patch \ file://CVE-2021-3595_1.patch \ file://CVE-2021-3595_2.patch \ + file://CVE-2021-3594.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"meta/recipes-devtools/qemu/qemu/CVE-2021-3594.patch new file +40
-1@@ -0,0 +1,40 @@ +From 7a5ffd5475f2cbfe3cf91d9584893f1a4b3b4dff Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <[email protected]> +Date: Fri, 4 Jun 2021 16:40:23 +0400 +Subject: [PATCH 07/12] udp: check upd_input buffer size +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: CVE-2021-3594 +Fixes: https://gitlab.freedesktop.org/slirp/libslirp/-/issues/47 + +Signed-off-by: Marc-André Lureau <[email protected]> + +Upstream-Status: Backport [74572be49247c8c5feae7c6e0b50c4f569ca9824] +CVE: CVE-2021-3594 + +Signed-off-by: Sakib Sajal <[email protected]> +--- + slirp/src/udp.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/slirp/src/udp.c b/slirp/src/udp.c +index 0ad44d7c0..18b4acdfa 100644 +--- a/slirp/src/udp.c ++++ b/slirp/src/udp.c +@@ -93,7 +93,10 @@ void udp_input(register struct mbuf *m, int iphlen) + /* + * Get IP and UDP header together in first mbuf. + */ +- ip = mtod(m, struct ip *); ++ ip = mtod_check(m, iphlen + sizeof(struct udphdr)); ++ if (ip == NULL) { ++ goto bad; ++ } + uh = (struct udphdr *)((char *)ip + iphlen); + + /* +-- +2.31.1 + -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#160576): https://lists.openembedded.org/g/openembedded-core/message/160576
Mute This Topic: https://lists.openembedded.org/mt/88426915/4422444
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [OE-core] [hardknott][PATCH 2/8] qemu: fix CVE-2021-3593
Please disregard, sorry for the barrage of incomplete patch set.
Quoted 74 lines · Sakib Sajal
Signed-off-by Sakib Sajal <[email protected]>--- meta/recipes-devtools/qemu/qemu.inc | 1 + .../qemu/qemu/CVE-2021-3593.patch | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+)create mode 100644
meta/recipes-devtools/qemu/qemu/CVE-2021-3593.patchmeta/recipes-devtools/qemu/qemu.inc +1
-0@@ -73,6 +73,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2021-3592_1.patch \ file://CVE-2021-3592_2.patch \ file://CVE-2021-3592_3.patch \ + file://CVE-2021-3593.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"meta/recipes-devtools/qemu/qemu/CVE-2021-3593.patch new file +40
-1@@ -0,0 +1,40 @@ +From fe99634066e1074aaf55e83b576385877d7e4bcc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <[email protected]> +Date: Fri, 4 Jun 2021 16:32:55 +0400 +Subject: [PATCH 04/12] upd6: check udp6_input buffer size +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: CVE-2021-3593 +Fixes: https://gitlab.freedesktop.org/slirp/libslirp/-/issues/45 + +Signed-off-by: Marc-André Lureau <[email protected]> + +Upstream-Status: Backport [de71c15de66ba9350bf62c45b05f8fbff166517b] +CVE: CVE-2021-3593 + +Signed-off-by: Sakib Sajal <[email protected]> +--- + slirp/src/udp6.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/slirp/src/udp6.c b/slirp/src/udp6.c +index 6f9486bbc..8c490e4d1 100644 +--- a/slirp/src/udp6.c ++++ b/slirp/src/udp6.c +@@ -28,7 +28,10 @@ void udp6_input(struct mbuf *m) + ip = mtod(m, struct ip6 *); + m->m_len -= iphlen; + m->m_data += iphlen; +- uh = mtod(m, struct udphdr *); ++ uh = mtod_check(m, sizeof(struct udphdr)); ++ if (uh == NULL) { ++ goto bad; ++ } + m->m_len += iphlen; + m->m_data -= iphlen; + +-- +2.31.1 + -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#160575): https://lists.openembedded.org/g/openembedded-core/message/160575
Mute This Topic: https://lists.openembedded.org/mt/88426914/4422444
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [hardknott][PATCH 2/8] qemu: fix CVE-2021-3593
Quoted 1 line · Sakib Sajal
Please disregard, sorry for the barrage of incomplete patch set.
Do you also have a branch on contrib that I can pull these patches from?
Thanks,
Anuj
Quoted 91 lines · Sakib Sajal
Quoted 73 lines
Signed-off-by Sakib Sajal <[email protected]>---
meta/recipes-devtools/qemu/qemu.inc | 1 +
.../qemu/qemu/CVE-2021-3593.patch | 40
+++++++++++++++++++2 files changed, 41 insertions(+)create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021- 3593.patch
meta/recipes- renamed from meta/recipes-devtools/qemu/qemu.inc +0
-0devtools/qemu/qemu.inc
index6c00bf274b..6b544a4344100644meta/recipes-devtools/qemu/qemu.inc +1
-0@@ -73,6 +73,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2021-3592_1.patch \ file://CVE-2021-3592_2.patch \ file://CVE-2021-3592_3.patch \ + file://CVE-2021-3593.patch \"
UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"meta/recipes-devtools/qemu/qemu/CVE-2021-3593.patch new file +1
-0@@ -0,0 +1,40 @@ +From fe99634066e1074aaf55e83b576385877d7e4bcc Mon Sep 17 00:00:002001
+From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?=
<[email protected]>meta/recipes-devtools/qemu/qemu/CVE-2021-3593.patch new file +12
-0+Date: Fri, 4 Jun 2021 16:32:55 +0400 +Subject: [PATCH 04/12] upd6: check udp6_input buffer size +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: CVE-2021-3593 +Fixes: https://gitlab.freedesktop.org/slirp/libslirp/-/issues/45 + +Signed-off-by: Marc-André Lureau <[email protected]> + +Upstream-Status: Backport[
de71c15de66ba9350bf62c45b05f8fbff166517b]meta/recipes-devtools/qemu/qemu/CVE-2021-3593.patch new file +26
-0+CVE: CVE-2021-3593 + +Signed-off-by: Sakib Sajal <[email protected]> +--- + slirp/src/udp6.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/slirp/src/udp6.c b/slirp/src/udp6.c +index 6f9486bbc..8c490e4d1 100644 +--- a/slirp/src/udp6.c ++++ b/slirp/src/udp6.c +@@ -28,7 +28,10 @@ void udp6_input(struct mbuf *m) + ip = mtod(m, struct ip6 *); + m->m_len -= iphlen; + m->m_data += iphlen; +- uh = mtod(m, struct udphdr *); ++ uh = mtod_check(m, sizeof(struct udphdr)); ++ if (uh == NULL) { ++ goto bad; ++ } + m->m_len += iphlen; + m->m_data -= iphlen; + +-- +2.31.1 +Quoted 4 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#160583):
https://lists.openembedded.org/g/openembedded-core/message/160583
Mute This Topic: https://lists.openembedded.org/mt/88427080/3616702
Group Owner: [email protected] Unsubscribe:
https://lists.openembedded.org/g/openembedded-core/unsub [
[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-