Patch review
cover Patch review
Please have reviews back by Saturday
The following changes since commit 9e60d30669a2ad0598e9abf0cd15ee06b523986b:
sanlock: Replace cp -a with cp -R --no-dereference (2020-03-15 13:30:34 -0700)
are available in the Git repository at:
git://git.openembedded.org/meta-openembedded-contrib stable/zeus-nut
http://cgit.openembedded.org/meta-openembedded-contrib/log/?h=stable/zeus-nut
Armin Kuster (1):
tremor: update SRC_URI as project moved to gitlab
Haiqing Bai (2):
gd: fix CVE-2017-6363 python-urllib3/python3-urllib3: fix CVE-2020-7212
Wang Mingyu (2):
libssh2: CVE-2019-17498.patch
opensc: CVE-2019-19479 CVE-2019-19480
Wenlin Kang (1):
ipmitool: fix CVE-2020-5208
.../tremor/tremor_20180319.bb | 2 +- ...-Fix-buffer-overflow-vulnerabilities.patch | 133 ++++++++++++++++ ...uffer-overflow-in-ipmi_spd_print_fru.patch | 53 +++++++ ...er-overflow-in-ipmi_get_session_info.patch | 53 +++++++ .../0004-channel-Fix-buffer-overflow.patch | 69 +++++++++ ...er-overflows-in-get_lan_param_select.patch | 94 ++++++++++++ ...u-sdr-Fix-id_string-buffer-overflows.patch | 142 ++++++++++++++++++ .../ipmitool/ipmitool_1.8.18.bb | 6 + .../recipes-support/gd/gd/CVE-2017-6363.patch | 35 +++++ meta-oe/recipes-support/gd/gd_2.2.5.bb | 1 + .../libssh2/libssh2/CVE-2019-17498.patch | 131 ++++++++++++++++ .../recipes-support/libssh2/libssh2_1.8.2.bb | 1 + .../opensc/opensc/CVE-2019-19479.patch | 30 ++++ .../opensc/opensc/CVE-2019-19480.patch | 34 +++++ .../recipes-support/opensc/opensc_0.19.0.bb | 2 + .../python/python-urllib3/CVE-2020-7212.patch | 54 +++++++ .../python/python-urllib3_1.25.6.bb | 2 + .../python3-urllib3/CVE-2020-7212.patch | 54 +++++++ .../python/python3-urllib3_1.25.6.bb | 2 + 19 files changed, 897 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0001-fru-Fix-buffer-overflow-vulnerabilities.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0002-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0003-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0004-channel-Fix-buffer-overflow.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0005-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0006-fru-sdr-Fix-id_string-buffer-overflows.patch create mode 100644 meta-oe/recipes-support/gd/gd/CVE-2017-6363.patch create mode 100644 meta-oe/recipes-support/libssh2/libssh2/CVE-2019-17498.patch create mode 100644 meta-oe/recipes-support/opensc/opensc/CVE-2019-19479.patch create mode 100644 meta-oe/recipes-support/opensc/opensc/CVE-2019-19480.patch create mode 100644 meta-python/recipes-devtools/python/python-urllib3/CVE-2020-7212.patch create mode 100644 meta-python/recipes-devtools/python/python3-urllib3/CVE-2020-7212.patch
Signature · 1 line
2.17.1
PATCH 1/6 gd: fix CVE-2017-6363
From: Haiqing Bai <[email protected]>
Backport the CVE patch from the upstream to fix the heap-based buffer over-read in tiffWriter.
--- .../recipes-support/gd/gd/CVE-2017-6363.patch | 35 +++++++++++++++++++ meta-oe/recipes-support/gd/gd_2.2.5.bb | 1 + 2 files changed, 36 insertions(+) create mode 100644 meta-oe/recipes-support/gd/gd/CVE-2017-6363.patch
meta-oe/recipes-support/gd/gd/CVE-2017-6363.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 8f7b60ea7db87de5df76169e3f3918e401ef8bf7 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <[email protected]> +Date: Wed, 31 Jan 2018 14:50:16 -0500 +Subject: [PATCH] gd/gd2: make sure transparent palette index is within bounds + #383 + +The gd image formats allow for a palette of 256 colors, +so if the transparent index is out of range, disable it. + +Upstream-Status: Backport +[https://github.com/libgd/libgd.git commit:0be86e1926939a98afbd2f3a23c673dfc4df2a7c] +CVE-2017-6363 + +Signed-off-by: Haiqing Bai <[email protected]> +--- + src/gd_gd.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/gd_gd.c b/src/gd_gd.c +index f8d39cb..5a86fc3 100644 +--- a/src/gd_gd.c ++++ b/src/gd_gd.c +@@ -54,7 +54,8 @@ _gdGetColors (gdIOCtx * in, gdImagePtr im, int gd2xFlag) + if (!gdGetWord (&im->transparent, in)) { + goto fail1; + } +- if (im->transparent == 257) { ++ /* Make sure transparent index is within bounds of the palette. */ ++ if (im->transparent >= 256 || im->transparent < 0) { + im->transparent = (-1); + } + } +-- +1.9.1 +
meta-oe/recipes-support/gd/gd_2.2.5.bb +1 -0
@@ -17,6 +17,7 @@ SRC_URI = "git://github.com/libgd/libgd.git;branch=GD-2.2 \ file://0001-annotate.c-gdft.c-Replace-strncpy-with-memccpy-to-fi.patch \ file://CVE-2018-1000222.patch \ file://CVE-2019-6978.patch \ + file://CVE-2017-6363.patch \ " SRCREV = "8255231b68889597d04d451a72438ab92a405aba"
Signature · 1 line
2.17.1
PATCH 2/6 python-urllib3/python3-urllib3: fix CVE-2020-7212
In reply to akusterFrom: Haiqing Bai <[email protected]>
Optimize _encode_invalid_chars for a denial of service (CPU consumption)
--- .../python/python-urllib3/CVE-2020-7212.patch | 54 +++++++++++++++++++ .../python/python-urllib3_1.25.6.bb | 2 + .../python3-urllib3/CVE-2020-7212.patch | 54 +++++++++++++++++++ .../python/python3-urllib3_1.25.6.bb | 2 + 4 files changed, 112 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python-urllib3/CVE-2020-7212.patch create mode 100644 meta-python/recipes-devtools/python/python3-urllib3/CVE-2020-7212.patch
meta-python/recipes-devtools/python/python-urllib3/CVE-2020-7212.patch new file +54 -0
@@ -0,0 +1,54 @@ +From aff951b7a41eb5b958b32c49eaa00da02adc9c2d Mon Sep 17 00:00:00 2001 +From: Quentin Pradet <[email protected]> +Date: Tue, 21 Jan 2020 22:32:56 +0400 +Subject: [PATCH] Optimize _encode_invalid_chars (#1787) + +Co-authored-by: Seth Michael Larson <[email protected]> + +Upstream-Status: Backport +[from git://github.com/urllib3/urllib3.git commit:a2697e7c6b] +Signed-off-by: Haiqing Bai <[email protected]> +--- + src/urllib3/util/url.py | 15 ++++++--------- + 1 file changed, 6 insertions(+), 9 deletions(-) + +diff --git a/src/urllib3/util/url.py b/src/urllib3/util/url.py +index 9675f74..e353937 100644 +--- a/src/urllib3/util/url.py ++++ b/src/urllib3/util/url.py +@@ -216,18 +216,15 @@ def _encode_invalid_chars(component, allowed_chars, encoding="utf-8"): + + component = six.ensure_text(component) + ++ # Normalize existing percent-encoded bytes. + # Try to see if the component we're encoding is already percent-encoded + # so we can skip all '%' characters but still encode all others. +- percent_encodings = PERCENT_RE.findall(component) +- +- # Normalize existing percent-encoded bytes. +- for enc in percent_encodings: +- if not enc.isupper(): +- component = component.replace(enc, enc.upper()) ++ component, percent_encodings = PERCENT_RE.subn( ++ lambda match: match.group(0).upper(), component ++ ) + + uri_bytes = component.encode("utf-8", "surrogatepass") +- is_percent_encoded = len(percent_encodings) == uri_bytes.count(b"%") +- ++ is_percent_encoded = percent_encodings == uri_bytes.count(b"%") + encoded_component = bytearray() + + for i in range(0, len(uri_bytes)): +@@ -237,7 +234,7 @@ def _encode_invalid_chars(component, allowed_chars, encoding="utf-8"): + if (is_percent_encoded and byte == b"%") or ( + byte_ord < 128 and byte.decode() in allowed_chars + ): +- encoded_component.extend(byte) ++ encoded_component += byte + continue + encoded_component.extend(b"%" + (hex(byte_ord)[2:].encode().zfill(2).upper())) + +-- +2.23.0 +
meta-python/recipes-devtools/python/python-urllib3_1.25.6.bb +2 -0
@@ -1,2 +1,4 @@ inherit pypi setuptools require python-urllib3.inc + +SRC_URI += "file://CVE-2020-7212.patch"
meta-python/recipes-devtools/python/python3-urllib3/CVE-2020-7212.patch new file +54 -0
54 lines not on this page · raw message
meta-python/recipes-devtools/python/python3-urllib3_1.25.6.bb +2 -0
@@ -1,2 +1,4 @@ inherit pypi setuptools3 require python-urllib3.inc + +SRC_URI += "file://CVE-2020-7212.patch"
Signature · 1 line
2.17.1
PATCH 3/6 libssh2: CVE-2019-17498.patch
In reply to akusterFrom: Wang Mingyu <[email protected]>
Security Advisory
References:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17498
--- .../libssh2/libssh2/CVE-2019-17498.patch | 131 ++++++++++++++++++ .../recipes-support/libssh2/libssh2_1.8.2.bb | 1 + 2 files changed, 132 insertions(+) create mode 100644 meta-oe/recipes-support/libssh2/libssh2/CVE-2019-17498.patch
meta-oe/recipes-support/libssh2/libssh2/CVE-2019-17498.patch new file +131 -0
@@ -0,0 +1,131 @@ +From dedcbd106f8e52d5586b0205bc7677e4c9868f9c Mon Sep 17 00:00:00 2001 +From: Will Cosgrove <[email protected]> +Date: Fri, 30 Aug 2019 09:57:38 -0700 +Subject: [PATCH] packet.c: improve message parsing (#402) + +* packet.c: improve parsing of packets + +file: packet.c + +notes: +Use _libssh2_get_string API in SSH_MSG_DEBUG/SSH_MSG_DISCONNECT. Additional uint32 bounds check in SSH_MSG_GLOBAL_REQUEST. + +Upstream-Status: Accepted +CVE: CVE-2019-17498 + +Reference to upstream patch: +https://github.com/libssh2/libssh2/commit/dedcbd106f8e52d5586b0205bc7677e4c9868f9c + +--- + src/packet.c | 68 ++++++++++++++++++++++------------------------------ + 1 file changed, 29 insertions(+), 39 deletions(-) + +diff --git a/src/packet.c b/src/packet.c +index 38ab6294..2e01bfc5 100644 +--- a/src/packet.c ++++ b/src/packet.c +@@ -416,8 +416,8 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, + size_t datalen, int macstate) + { + int rc = 0; +- char *message = NULL; +- char *language = NULL; ++ unsigned char *message = NULL; ++ unsigned char *language = NULL; + size_t message_len = 0; + size_t language_len = 0; + LIBSSH2_CHANNEL *channelp = NULL; +@@ -469,33 +469,23 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, + + case SSH_MSG_DISCONNECT: + if(datalen >= 5) { +- size_t reason = _libssh2_ntohu32(data + 1); ++ uint32_t reason = 0; ++ struct string_buf buf; ++ buf.data = (unsigned char *)data; ++ buf.dataptr = buf.data; ++ buf.len = datalen; ++ buf.dataptr++; /* advance past type */ + +- if(datalen >= 9) { +- message_len = _libssh2_ntohu32(data + 5); ++ _libssh2_get_u32(&buf, &reason); ++ _libssh2_get_string(&buf, &message, &message_len); ++ _libssh2_get_string(&buf, &language, &language_len); + +- if(message_len < datalen-13) { +- /* 9 = packet_type(1) + reason(4) + message_len(4) */ +- message = (char *) data + 9; +- +- language_len = +- _libssh2_ntohu32(data + 9 + message_len); +- language = (char *) data + 9 + message_len + 4; +- +- if(language_len > (datalen-13-message_len)) { +- /* bad input, clear info */ +- language = message = NULL; +- language_len = message_len = 0; +- } +- } +- else +- /* bad size, clear it */ +- message_len = 0; +- } + if(session->ssh_msg_disconnect) { +- LIBSSH2_DISCONNECT(session, reason, message, +- message_len, language, language_len); ++ LIBSSH2_DISCONNECT(session, reason, (const char *)message, ++ message_len, (const char *)language, ++ language_len); + } ++ + _libssh2_debug(session, LIBSSH2_TRACE_TRANS, + "Disconnect(%d): %s(%s)", reason, + message, language); +@@ -534,23 +526,24 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, + int always_display = data[1]; + + if(datalen >= 6) { +- message_len = _libssh2_ntohu32(data + 2); +- +- if(message_len <= (datalen - 10)) { +- /* 6 = packet_type(1) + display(1) + message_len(4) */ +- message = (char *) data + 6; +- language_len = _libssh2_ntohu32(data + 6 + +- message_len); +- +- if(language_len <= (datalen - 10 - message_len)) +- language = (char *) data + 10 + message_len; +- } ++ struct string_buf buf; ++ buf.data = (unsigned char *)data; ++ buf.dataptr = buf.data; ++ buf.len = datalen; ++ buf.dataptr += 2; /* advance past type & always display */ ++ ++ _libssh2_get_string(&buf, &message, &message_len); ++ _libssh2_get_string(&buf, &language, &language_len); + } + + if(session->ssh_msg_debug) { +- LIBSSH2_DEBUG(session, always_display, message, +- message_len, language, language_len); ++ LIBSSH2_DEBUG(session, always_display, ++ (const char *)message, ++ message_len, (const char *)language, ++ language_len); + } + } ++ + /* + * _libssh2_debug will actually truncate this for us so + * that it's not an inordinate about of data +@@ -576,7 +566,7 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, + uint32_t len = 0; + unsigned char want_reply = 0; + len = _libssh2_ntohu32(data + 1); +- if(datalen >= (6 + len)) { ++ if((len <= (UINT_MAX - 6)) && (datalen >= (6 + len))) { + want_reply = data[5 + len]; + _libssh2_debug(session, + LIBSSH2_TRACE_CONN,
meta-oe/recipes-support/libssh2/libssh2_1.8.2.bb +1 -0
@@ -17,6 +17,7 @@ inherit autotools pkgconfig EXTRA_OECONF += "\ --with-libz \ --with-libz-prefix=${STAGING_LIBDIR} \ + file://CVE-2019-17498.patch \ " # only one of openssl and gcrypt could be set
Signature · 1 line
2.17.1
PATCH 4/6 opensc: CVE-2019-19479 CVE-2019-19480
In reply to akusterFrom: Wang Mingyu <[email protected]>
Security Advisory
References
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19479
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19480
--- .../opensc/opensc/CVE-2019-19479.patch | 30 ++++++++++++++++ .../opensc/opensc/CVE-2019-19480.patch | 34 +++++++++++++++++++ .../recipes-support/opensc/opensc_0.19.0.bb | 2 ++ 3 files changed, 66 insertions(+) create mode 100644 meta-oe/recipes-support/opensc/opensc/CVE-2019-19479.patch create mode 100644 meta-oe/recipes-support/opensc/opensc/CVE-2019-19480.patch
meta-oe/recipes-support/opensc/opensc/CVE-2019-19479.patch new file +30 -0
@@ -0,0 +1,30 @@ +From c3f23b836e5a1766c36617fe1da30d22f7b63de2 Mon Sep 17 00:00:00 2001 +From: Frank Morgner <[email protected]> +Date: Sun, 3 Nov 2019 04:45:28 +0100 +Subject: [PATCH] fixed UNKNOWN READ + +Upstream-Status: Accepted <or Backport> +CVE: CVE-2019-19479 + +Reported by OSS-Fuzz +https://oss-fuzz.com/testcase-detail/5681169970757632 + +Reference to upstream patch: +https://github.com/OpenSC/OpenSC/commit/c3f23b836e5a1766c36617fe1da30d22f7b63de2 +--- + src/libopensc/card-setcos.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libopensc/card-setcos.c b/src/libopensc/card-setcos.c +index 4cf328ad6a..1b4e8f3e23 100644 +--- a/src/libopensc/card-setcos.c ++++ b/src/libopensc/card-setcos.c +@@ -868,7 +868,7 @@ static void parse_sec_attr_44(sc_file_t *file, const u8 *buf, size_t len) + } + + /* Encryption key present ? */ +- iPinCount = iACLen - 1; ++ iPinCount = iACLen > 0 ? iACLen - 1 : 0; + + if (buf[iOffset] & 0x20) { + int iSC;
meta-oe/recipes-support/opensc/opensc/CVE-2019-19480.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 6ce6152284c47ba9b1d4fe8ff9d2e6a3f5ee02c7 Mon Sep 17 00:00:00 2001 +From: Jakub Jelen <[email protected]> +Date: Wed, 23 Oct 2019 09:22:44 +0200 +Subject: [PATCH] pkcs15-prkey: Simplify cleaning memory after failure + +https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18478 + +Upstream-Status: Accepted +CVE: CVE-2019-19480 + +Reference to upstream patch: +https://github.com/OpenSC/OpenSC/commit/6ce6152284c47ba9b1d4fe8ff9d2e6a3f5ee02c7 +--- + src/libopensc/pkcs15-prkey.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/libopensc/pkcs15-prkey.c b/src/libopensc/pkcs15-prkey.c +index d3eee983..4b249582 100644 +--- a/src/libopensc/pkcs15-prkey.c ++++ b/src/libopensc/pkcs15-prkey.c +@@ -258,6 +258,10 @@ int sc_pkcs15_decode_prkdf_entry(struct sc_pkcs15_card *p15card, + memset(gostr3410_params, 0, sizeof(gostr3410_params)); + + r = sc_asn1_decode_choice(ctx, asn1_prkey, *buf, *buflen, buf, buflen); ++ if (r < 0) { ++ /* This might have allocated something. If so, clear it now */ ++ free(info.subject.value); ++ } + if (r == SC_ERROR_ASN1_END_OF_CONTENTS) + return r; + LOG_TEST_RET(ctx, r, "PrKey DF ASN.1 decoding failed"); +-- +2.17.1 +
meta-oe/recipes-support/opensc/opensc_0.19.0.bb +2 -0
@@ -15,6 +15,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" SRCREV = "f1691fc91fc113191c3a8aaf5facd6983334ec47" SRC_URI = "git://github.com/OpenSC/OpenSC \ file://0001-Remove-redundant-logging.patch \ + file://CVE-2019-19479.patch \ + file://CVE-2019-19480.patch \ " DEPENDS = "openct pcsc-lite virtual/libiconv openssl"
Signature · 1 line
2.17.1
PATCH 5/6 ipmitool: fix CVE-2020-5208
In reply to akusterFrom: Wenlin Kang <[email protected]>
Fix CVE-2020-5208
--- ...-Fix-buffer-overflow-vulnerabilities.patch | 133 ++++++++++++++++ ...uffer-overflow-in-ipmi_spd_print_fru.patch | 53 +++++++ ...er-overflow-in-ipmi_get_session_info.patch | 53 +++++++ .../0004-channel-Fix-buffer-overflow.patch | 69 +++++++++ ...er-overflows-in-get_lan_param_select.patch | 94 ++++++++++++ ...u-sdr-Fix-id_string-buffer-overflows.patch | 142 ++++++++++++++++++ .../ipmitool/ipmitool_1.8.18.bb | 6 + 7 files changed, 550 insertions(+) create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0001-fru-Fix-buffer-overflow-vulnerabilities.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0002-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0003-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0004-channel-Fix-buffer-overflow.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0005-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0006-fru-sdr-Fix-id_string-buffer-overflows.patch
meta-oe/recipes-kernel/ipmitool/ipmitool/0001-fru-Fix-buffer-overflow-vulnerabilities.patch new file +133 -0
@@ -0,0 +1,133 @@ +From 2542bade29c192370ca897eab67c40f27b8912f8 Mon Sep 17 00:00:00 2001 +From: Chrostoper Ertl <[email protected]> +Date: Wed, 12 Feb 2020 12:32:00 +0800 +Subject: [PATCH 1/6] fru: Fix buffer overflow vulnerabilities + +Partial fix for CVE-2020-5208, see +https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp + +The `read_fru_area_section` function only performs size validation of +requested read size, and falsely assumes that the IPMI message will not +respond with more than the requested amount of data; it uses the +unvalidated response size to copy into `frubuf`. If the response is +larger than the request, this can result in overflowing the buffer. + +The same issue affects the `read_fru_area` function. + +Upstream-Status: Backport[https://github.com/ipmitool/ipmitool/commit/e824c23316ae50beb7f7488f2055ac65e8b341f2] +CVE: CVE-2020-5208 + +Signed-off-by: Wenlin Kang <[email protected]> +--- + lib/ipmi_fru.c | 33 +++++++++++++++++++++++++++++++-- + 1 file changed, 31 insertions(+), 2 deletions(-) + +diff --git a/lib/ipmi_fru.c b/lib/ipmi_fru.c +index cf00eff..af99aa9 100644 +--- a/lib/ipmi_fru.c ++++ b/lib/ipmi_fru.c +@@ -615,7 +615,10 @@ int + read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + uint32_t offset, uint32_t length, uint8_t *frubuf) + { +- uint32_t off = offset, tmp, finish; ++ uint32_t off = offset; ++ uint32_t tmp; ++ uint32_t finish; ++ uint32_t size_left_in_buffer; + struct ipmi_rs * rsp; + struct ipmi_rq req; + uint8_t msg_data[4]; +@@ -628,10 +631,12 @@ read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + + finish = offset + length; + if (finish > fru->size) { ++ memset(frubuf + fru->size, 0, length - fru->size); + finish = fru->size; + lprintf(LOG_NOTICE, "Read FRU Area length %d too large, " + "Adjusting to %d", + offset + length, finish - offset); ++ length = finish - offset; + } + + memset(&req, 0, sizeof(req)); +@@ -667,6 +672,7 @@ read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + } + } + ++ size_left_in_buffer = length; + do { + tmp = fru->access ? off >> 1 : off; + msg_data[0] = id; +@@ -707,9 +713,18 @@ read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + } + + tmp = fru->access ? rsp->data[0] << 1 : rsp->data[0]; ++ if(rsp->data_len < 1 ++ || tmp > rsp->data_len - 1 ++ || tmp > size_left_in_buffer) ++ { ++ printf(" Not enough buffer size"); ++ return -1; ++ } ++ + memcpy(frubuf, rsp->data + 1, tmp); + off += tmp; + frubuf += tmp; ++ size_left_in_buffer -= tmp; + /* sometimes the size returned in the Info command + * is too large. return 0 so higher level function + * still attempts to parse what was returned */ +@@ -742,7 +757,9 @@ read_fru_area_section(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + uint32_t offset, uint32_t length, uint8_t *frubuf) + { + static uint32_t fru_data_rqst_size = 20; +- uint32_t off = offset, tmp, finish; ++ uint32_t off = offset; ++ uint32_t tmp, finish; ++ uint32_t size_left_in_buffer; + struct ipmi_rs * rsp; + struct ipmi_rq req; + uint8_t msg_data[4]; +@@ -755,10 +772,12 @@ read_fru_area_section(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + + finish = offset + length; + if (finish > fru->size) { ++ memset(frubuf + fru->size, 0, length - fru->size); + finish = fru->size; + lprintf(LOG_NOTICE, "Read FRU Area length %d too large, " + "Adjusting to %d", + offset + length, finish - offset); ++ length = finish - offset; + } + + memset(&req, 0, sizeof(req)); +@@ -773,6 +792,8 @@ read_fru_area_section(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + if (fru->access && fru_data_rqst_size > 16) + #endif + fru_data_rqst_size = 16; ++ ++ size_left_in_buffer = length; + do { + tmp = fru->access ? off >> 1 : off; + msg_data[0] = id; +@@ -804,8 +825,16 @@ read_fru_area_section(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + } + + tmp = fru->access ? rsp->data[0] << 1 : rsp->data[0]; ++ if(rsp->data_len < 1 ++ || tmp > rsp->data_len - 1 ++ || tmp > size_left_in_buffer) ++ { ++ printf(" Not enough buffer size"); ++ return -1; ++ } + memcpy((frubuf + off)-offset, rsp->data + 1, tmp); + off += tmp; ++ size_left_in_buffer -= tmp; + + /* sometimes the size returned in the Info command + * is too large. return 0 so higher level function +-- +2.23.0 +
meta-oe/recipes-kernel/ipmitool/ipmitool/0002-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch new file +53 -0
53 lines not on this page · raw message
meta-oe/recipes-kernel/ipmitool/ipmitool/0003-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch new file +53 -0
53 lines not on this page · raw message
meta-oe/recipes-kernel/ipmitool/ipmitool/0004-channel-Fix-buffer-overflow.patch new file +69 -0
69 lines not on this page · raw message
meta-oe/recipes-kernel/ipmitool/ipmitool/0005-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch new file +94 -0
94 lines not on this page · raw message
meta-oe/recipes-kernel/ipmitool/ipmitool/0006-fru-sdr-Fix-id_string-buffer-overflows.patch new file +142 -0
142 lines not on this page · raw message
meta-oe/recipes-kernel/ipmitool/ipmitool_1.8.18.bb +6 -0
@@ -24,6 +24,12 @@ DEPENDS = "openssl readline ncurses" SRC_URI = "${SOURCEFORGE_MIRROR}/ipmitool/ipmitool-${PV}.tar.bz2 \ file://0001-Migrate-to-openssl-1.1.patch \ + file://0001-fru-Fix-buffer-overflow-vulnerabilities.patch \ + file://0002-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch \ + file://0003-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch \ + file://0004-channel-Fix-buffer-overflow.patch \ + file://0005-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch \ + file://0006-fru-sdr-Fix-id_string-buffer-overflows.patch \ " SRC_URI[md5sum] = "bab7ea104c7b85529c3ef65c54427aa3" SRC_URI[sha256sum] = "0c1ba3b1555edefb7c32ae8cd6a3e04322056bc087918f07189eeedfc8b81e01"
Signature · 1 line
2.17.1
PATCH 6/6 tremor: update SRC_URI as project moved to gitlab
In reply to akusterIt appears Xiph.Org is now on gitlab
https://gitlab.xiph.org/xiph
--- meta-multimedia/recipes-multimedia/tremor/tremor_20180319.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-multimedia/recipes-multimedia/tremor/tremor_20180319.bb +1 -1
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \ file://os.h;beginline=3;endline=14;md5=5c0af5e1bedef3ce8178c89f48cd6f1f" DEPENDS = "libogg" -SRC_URI = "git://git.xiph.org/tremor.git;protocol=https \ +SRC_URI = "git://gitlab.xiph.org/xiph/tremor.git;protocol=https \ file://obsolete_automake_macros.patch;striplevel=0 \ file://tremor-arm-thumb2.patch \ "
Signature · 1 line
2.17.1
Quoted 21 lines · akuster
Please have reviews back by Saturday
The following changes since commit
9e60d30669a2ad0598e9abf0cd15ee06b523986b:sanlock: Replace cp -a with cp -R --no-dereference (2020-03-15 13:30:34
-0700)are available in the Git repository at:
git://git.openembedded.org/meta-openembedded-contribstable/zeus-nuthttp://cgit.openembedded.org/meta-openembedded-contrib/log/?h=stable/zeus-nut
Armin Kuster (1):
tremor: updateSRC_URIas project moved to gitlabHaiqing Bai (2):
gd: fix CVE-2017-6363 python-urllib3/python3-urllib3: fix CVE-2020-7212
Quoted 6 lines
Wang Mingyu (2):
libssh2: CVE-2019-17498.patch
opensc: CVE-2019-19479 CVE-2019-19480Wenlin Kang (1):
ipmitool: fix CVE-2020-5208
Lgtm
Quoted 50 lines
.../tremor/tremor_20180319.bb | 2 +- ...-Fix-buffer-overflow-vulnerabilities.patch | 133 ++++++++++++++++ ...uffer-overflow-in-ipmi_spd_print_fru.patch | 53 +++++++ ...er-overflow-in-ipmi_get_session_info.patch | 53 +++++++ .../0004-channel-Fix-buffer-overflow.patch | 69 +++++++++ ...er-overflows-in-get_lan_param_select.patch | 94 ++++++++++++ ...u-sdr-Fix-id_string-buffer-overflows.patch | 142 ++++++++++++++++++ .../ipmitool/ipmitool_1.8.18.bb | 6 + .../recipes-support/gd/gd/CVE-2017-6363.patch | 35 +++++ meta-oe/recipes-support/gd/gd_2.2.5.bb | 1 + .../libssh2/libssh2/CVE-2019-17498.patch | 131 ++++++++++++++++ .../recipes-support/libssh2/libssh2_1.8.2.bb | 1 + .../opensc/opensc/CVE-2019-19479.patch | 30 ++++ .../opensc/opensc/CVE-2019-19480.patch | 34 +++++ .../recipes-support/opensc/opensc_0.19.0.bb | 2 + .../python/python-urllib3/CVE-2020-7212.patch | 54 +++++++ .../python/python-urllib3_1.25.6.bb | 2 + .../python3-urllib3/CVE-2020-7212.patch | 54 +++++++ .../python/python3-urllib3_1.25.6.bb | 2 + 19 files changed, 897 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0001-fru-Fix-buffer-overflow-vulnerabilities.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0002-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0003-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0004-channel-Fix-buffer-overflow.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0005-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0006-fru-sdr-Fix-id_string-buffer-overflows.patch create mode 100644 meta-oe/recipes-support/gd/gd/CVE-2017-6363.patch create mode 100644 meta-oe/recipes-support/libssh2/libssh2/CVE-2019-17498.patch create mode 100644 meta-oe/recipes-support/opensc/opensc/CVE-2019-19479.patch create mode 100644 meta-oe/recipes-support/opensc/opensc/CVE-2019-19480.patch create mode 100644 meta-python/recipes-devtools/python/python-urllib3/CVE-2020-7212.patch create mode 100644
meta-python/recipes-devtools/python/python3-urllib3/CVE-2020-7212.patch--
2.17.1
merged
Thanks Armin
Quoted 73 lines · Khem Raj
Quoted 19 lines · akuster
Please have reviews back by Saturday
The following changes since commit
9e60d30669a2ad0598e9abf0cd15ee06b523986b:sanlock: Replace cp -a with cp -R --no-dereference (2020-03-15 13:30:34 -0700)are available in the Git repository at:
git://git.openembedded.org/meta-openembedded-contribstable/zeus-nut
http://cgit.openembedded.org/meta-openembedded-contrib/log/?h=stable/zeus-nutArmin Kuster (1):
tremor: updateSRC_URIas project moved to gitlabHaiqing Bai (2):
gd: fix CVE-2017-6363 python-urllib3/python3-urllib3: fix CVE-2020-7212Quoted 6 lines
Wang Mingyu (2):
libssh2: CVE-2019-17498.patch
opensc: CVE-2019-19479 CVE-2019-19480Wenlin Kang (1):
ipmitool: fix CVE-2020-5208Lgtm
Quoted 39 lines
.../tremor/tremor_20180319.bb | 2 +- ...-Fix-buffer-overflow-vulnerabilities.patch | 133 ++++++++++++++++ ...uffer-overflow-in-ipmi_spd_print_fru.patch | 53 +++++++ ...er-overflow-in-ipmi_get_session_info.patch | 53 +++++++ .../0004-channel-Fix-buffer-overflow.patch | 69 +++++++++ ...er-overflows-in-get_lan_param_select.patch | 94 ++++++++++++ ...u-sdr-Fix-id_string-buffer-overflows.patch | 142 ++++++++++++++++++ .../ipmitool/ipmitool_1.8.18.bb | 6 + .../recipes-support/gd/gd/CVE-2017-6363.patch | 35 +++++ meta-oe/recipes-support/gd/gd_2.2.5.bb | 1 + .../libssh2/libssh2/CVE-2019-17498.patch | 131 ++++++++++++++++ .../recipes-support/libssh2/libssh2_1.8.2.bb | 1 + .../opensc/opensc/CVE-2019-19479.patch | 30 ++++ .../opensc/opensc/CVE-2019-19480.patch | 34 +++++ .../recipes-support/opensc/opensc_0.19.0.bb | 2 + .../python/python-urllib3/CVE-2020-7212.patch | 54 +++++++ .../python/python-urllib3_1.25.6.bb | 2 + .../python3-urllib3/CVE-2020-7212.patch | 54 +++++++ .../python/python3-urllib3_1.25.6.bb | 2 + 19 files changed, 897 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0001-fru-Fix-buffer-overflow-vulnerabilities.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0002-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0003-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0004-channel-Fix-buffer-overflow.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0005-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0006-fru-sdr-Fix-id_string-buffer-overflows.patch create mode 100644 meta-oe/recipes-support/gd/gd/CVE-2017-6363.patch create mode 100644 meta-oe/recipes-support/libssh2/libssh2/CVE-2019-17498.patch create mode 100644 meta-oe/recipes-support/opensc/opensc/CVE-2019-19479.patch create mode 100644 meta-oe/recipes-support/opensc/opensc/CVE-2019-19480.patch create mode 100644 meta-python/recipes-devtools/python/python-urllib3/CVE-2020-7212.patch create mode 100644 meta-python/recipes-devtools/python/python3-urllib3/CVE-2020-7212.patch--
2.17.1