monkey: Update status for CVE-2013-2183
PATCH 1/10 monkey: Update status for CVE-2013-2183
From: Ninette Adhikari <[email protected]>
Current version (1.6.9) is not affected. Issue was addressed in version 1.3.0
Adapted to Kirkstone (CVE_STATUS -> CVE_CHECK_IGNORE)
--- meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb +2 -0
@@ -86,3 +86,5 @@ CONFFILES:${PN} = "${sysconfdir}/monkey/monkey.conf \ ${sysconfdir}/monkey/plugins/auth/monkey.users \ " +# cpe-incorrect: Current version (1.6.9) is not affected. Issue was addressed in version 1.3.0 +CVE_CHECK_IGNORE += "CVE-2013-2183"
PATCH 2/10 monkey: ignore CVE-2013-1771
From: Peter Marko <[email protected]>
This is gentoo specific CVE.
NVD tracks this as version-less CVE.
Adapted to Kirkstone (CVE_STATUS -> CVE_CHECK_IGNORE)
--- meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb +2 -0
@@ -88,3 +88,5 @@ CONFFILES:${PN} = "${sysconfdir}/monkey/monkey.conf \ # cpe-incorrect: Current version (1.6.9) is not affected. Issue was addressed in version 1.3.0 CVE_CHECK_IGNORE += "CVE-2013-2183" +# not-applicable-platform: this is gentoo specific CVE +CVE_CHECK_IGNORE += "CVE-2013-1771"
PATCH 3/10 logcheck: ignore CVE-2017-20148
In reply to Gyorgy SarvariDetails: https://nvd.nist.gov/vuln/detail/CVE-2017-20148
The issue is specific to the postinstall script that Gentoo packages with this application - we can ignore it.
--- meta-perl/recipes-extended/logcheck/logcheck_1.3.23.bb | 3 +++ 1 file changed, 3 insertions(+)
meta-perl/recipes-extended/logcheck/logcheck_1.3.23.bb +3 -0
@@ -77,3 +77,6 @@ RDEPENDS:${PN} = "\ " FILES:${PN} += "${datadir}/logtail" + +# This vulnerability is specific to the way Gentoo packages this application. +CVE_CHECK_IGNORE += "CVE-2017-20148"
PATCH 4/10 libtorrent: ignore CVE-2016-5301
In reply to Gyorgy SarvariDetails: https://nvd.nist.gov/vuln/detail/CVE-2016-5301
This vulnerability is for another libtorrent (https://github.com/arvidn/libtorrent)
--- meta-oe/recipes-connectivity/libtorrent/libtorrent_git.bb | 1 + 1 file changed, 1 insertion(+)
meta-oe/recipes-connectivity/libtorrent/libtorrent_git.bb +1 -0
@@ -13,6 +13,7 @@ SRCREV = "756f70010779927dc0691e1e722ed433d5d295e1" CVE_CHECK_IGNORE += "\ CVE-2009-1760 \ + CVE-2016-5301 \ " PV = "0.13.8"
PATCH 5/10 exiv2: patch CVE-2021-29623
In reply to Gyorgy SarvariDetails: https://nvd.nist.gov/vuln/detail/CVE-2021-29623
Pick the patch from the PR mentioned in teh nvd report.
--- .../exiv2/exiv2/CVE-2021-29623.patch | 29 +++++++++++++++++++ meta-oe/recipes-support/exiv2/exiv2_0.27.3.bb | 20 +++++++------ 2 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 meta-oe/recipes-support/exiv2/exiv2/CVE-2021-29623.patch
meta-oe/recipes-support/exiv2/exiv2/CVE-2021-29623.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 54ff4ef5f5cc82c276a079a66b307e9a6f70908c Mon Sep 17 00:00:00 2001 +From: Kevin Backhouse <[email protected]> +Date: Tue, 11 May 2021 12:14:33 +0100 +Subject: [PATCH] Use readOrThrow to check error conditions of iIo.read(). + +CVE: CVE-2021-29623 +Upstream-Status: Backport [https://github.com/Exiv2/exiv2/commit/82e46b5524fb904e6660dadd2c6d8e5e47375a1a] +Signed-off-by: Gyorgy Sarvari <[email protected]> +--- + src/webpimage.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/webpimage.cpp b/src/webpimage.cpp +index 6248414..6578937 100644 +--- a/src/webpimage.cpp ++++ b/src/webpimage.cpp +@@ -757,9 +757,9 @@ namespace Exiv2 { + byte webp[len]; + byte data[len]; + byte riff[len]; +- iIo.read(riff, len); +- iIo.read(data, len); +- iIo.read(webp, len); ++ readOrThrow(iIo, riff, len, Exiv2::kerCorruptedMetadata); ++ readOrThrow(iIo, data, len, Exiv2::kerCorruptedMetadata); ++ readOrThrow(iIo, webp, len, Exiv2::kerCorruptedMetadata); + bool matched_riff = (memcmp(riff, RiffImageId, len) == 0); + bool matched_webp = (memcmp(webp, WebPImageId, len) == 0); + iIo.seek(-12, BasicIo::cur);
meta-oe/recipes-support/exiv2/exiv2_0.27.3.bb +11 -9
@@ -4,19 +4,21 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=625f055f41728f84a8d7938acc35bdc2" DEPENDS = "zlib expat" -SRC_URI = "https://github.com/Exiv2/${BPN}/releases/download/v${PV}/${BP}-Source.tar.gz" +SRC_URI = "https://github.com/Exiv2/${BPN}/releases/download/v${PV}/${BP}-Source.tar.gz \ + file://0001-Use-compiler-fcf-protection-only-if-compiler-arch-su.patch \ + file://CVE-2021-29457.patch \ + file://CVE-2021-29458.patch \ + file://CVE-2021-29463.patch \ + file://CVE-2021-29464.patch \ + file://CVE-2021-29470.patch \ + file://CVE-2021-29473.patch \ + file://CVE-2021-3482.patch \ + file://CVE-2021-29623.patch \ + " SRC_URI[sha256sum] = "a79f5613812aa21755d578a297874fb59a85101e793edc64ec2c6bd994e3e778" # Once patch is obsolete (project should be aware due to PRs), dos2unix can be removed either inherit dos2unix -SRC_URI += "file://0001-Use-compiler-fcf-protection-only-if-compiler-arch-su.patch \ - file://CVE-2021-29457.patch \ - file://CVE-2021-29458.patch \ - file://CVE-2021-29463.patch \ - file://CVE-2021-29464.patch \ - file://CVE-2021-29470.patch \ - file://CVE-2021-29473.patch \ - file://CVE-2021-3482.patch" S = "${WORKDIR}/${BPN}-${PV}-Source"
PATCH 6/10 exiv2: add missing CVE tag to patch
In reply to Gyorgy SarvariDetails: https://nvd.nist.gov/vuln/detail/CVE-2021-29458
https://nvd.nist.gov/vuln/detail/CVE-2021-31292
The patch is already present, but it was missing the CVE tag, which is added in this change.
The same patch fixes both CVEs.
--- meta-oe/recipes-support/exiv2/exiv2/CVE-2021-29458.patch | 3 +++ 1 file changed, 3 insertions(+)
meta-oe/recipes-support/exiv2/exiv2/CVE-2021-29458.patch +3 -0
@@ -2,6 +2,9 @@ From 9b7a19f957af53304655ed1efe32253a1b11a8d0 Mon Sep 17 00:00:00 2001 From: Kevin Backhouse <[email protected]> Date: Fri, 9 Apr 2021 13:37:48 +0100 Subject: [PATCH] Fix integer overflow. + +CVE: CVE-2021-29458 CVE-2021-31292 + --- src/crwimage_int.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
PATCH 7/10 exiv2: patch CVE-2021-32617
In reply to Gyorgy SarvariDetails: https://nvd.nist.gov/vuln/detail/CVE-2021-32617
Pick the patch from the PR that's mentioned by the nvd report.
--- .../exiv2/exiv2/CVE-2021-32617.patch | 129 ++++++++++++++++++ meta-oe/recipes-support/exiv2/exiv2_0.27.3.bb | 1 + 2 files changed, 130 insertions(+) create mode 100644 meta-oe/recipes-support/exiv2/exiv2/CVE-2021-32617.patch
meta-oe/recipes-support/exiv2/exiv2/CVE-2021-32617.patch new file +129 -0
@@ -0,0 +1,129 @@ +From 8353d035bc2e0a0500251168a350d0252900386b Mon Sep 17 00:00:00 2001 +From: Kevin Backhouse <[email protected]> +Date: Sun, 16 May 2021 15:05:08 +0100 +Subject: [PATCH] Fix quadratic complexity performance bug. + +CVE: CVE-2021-32617 +Upstream-Status: Backport [https://github.com/Exiv2/exiv2/commit/c261fbaa2567687eec6a595d3016212fd6ae648d] +Signed-off-by: Gyorgy Sarvari <[email protected]> +--- + xmpsdk/src/XMPMeta-Parse.cpp | 57 +++++++++++++++++++++++------------- + 1 file changed, 36 insertions(+), 21 deletions(-) + +diff --git a/xmpsdk/src/XMPMeta-Parse.cpp b/xmpsdk/src/XMPMeta-Parse.cpp +index 9f66fe8..6959693 100644 +--- a/xmpsdk/src/XMPMeta-Parse.cpp ++++ b/xmpsdk/src/XMPMeta-Parse.cpp +@@ -976,12 +976,26 @@ ProcessUTF8Portion ( XMLParserAdapter * xmlParser, + { + const XMP_Uns8 * bufEnd = buffer + length; + +- const XMP_Uns8 * spanStart = buffer; + const XMP_Uns8 * spanEnd; ++ ++ // `buffer` is copied into this std::string. If `buffer` only ++ // contains valid UTF-8 and no escape characters, then the copy ++ // will be identical to the original, but invalid characters are ++ // replaced - usually with a space character. This std::string was ++ // added as a performance fix for: ++ // https://github.com/Exiv2/exiv2/security/advisories/GHSA-w8mv-g8qq-36mj ++ // Previously, the code was repeatedly calling ++ // `xmlParser->ParseBuffer()`, which turned out to have quadratic ++ // complexity, because expat kept reparsing the entire string from ++ // the beginning. ++ std::string copy; + +- for ( spanEnd = spanStart; spanEnd < bufEnd; ++spanEnd ) { ++ for ( spanEnd = buffer; spanEnd < bufEnd; ++spanEnd ) { + +- if ( (0x20 <= *spanEnd) && (*spanEnd <= 0x7E) && (*spanEnd != '&') ) continue; // A regular ASCII character. ++ if ( (0x20 <= *spanEnd) && (*spanEnd <= 0x7E) && (*spanEnd != '&') ) { ++ copy.push_back(*spanEnd); ++ continue; // A regular ASCII character. ++ } + + if ( *spanEnd >= 0x80 ) { + +@@ -992,21 +1006,20 @@ ProcessUTF8Portion ( XMLParserAdapter * xmlParser, + if ( uniLen > 0 ) { + + // A valid UTF-8 character, keep it as-is. ++ copy.append((const char*)spanEnd, uniLen); + spanEnd += uniLen - 1; // ! The loop increment will put back the +1. + + } else if ( (uniLen < 0) && (! last) ) { + + // Have a partial UTF-8 character at the end of the buffer and more input coming. +- xmlParser->ParseBuffer ( spanStart, (spanEnd - spanStart), false ); ++ xmlParser->ParseBuffer ( copy.c_str(), copy.size(), false ); + return (spanEnd - buffer); + + } else { + + // Not a valid UTF-8 sequence. Replace the first byte with the Latin-1 equivalent. +- xmlParser->ParseBuffer ( spanStart, (spanEnd - spanStart), false ); + const char * replacement = kReplaceLatin1 [ *spanEnd - 0x80 ]; +- xmlParser->ParseBuffer ( replacement, strlen ( replacement ), false ); +- spanStart = spanEnd + 1; // ! The loop increment will do "spanEnd = spanStart". ++ copy.append ( replacement ); + + } + +@@ -1014,11 +1027,12 @@ ProcessUTF8Portion ( XMLParserAdapter * xmlParser, + + // Replace ASCII controls other than tab, LF, and CR with a space. + +- if ( (*spanEnd == kTab) || (*spanEnd == kLF) || (*spanEnd == kCR) ) continue; ++ if ( (*spanEnd == kTab) || (*spanEnd == kLF) || (*spanEnd == kCR) ) { ++ copy.push_back(*spanEnd); ++ continue; ++ } + +- xmlParser->ParseBuffer ( spanStart, (spanEnd - spanStart), false ); +- xmlParser->ParseBuffer ( " ", 1, false ); +- spanStart = spanEnd + 1; // ! The loop increment will do "spanEnd = spanStart". ++ copy.push_back(' '); + + } else { + +@@ -1030,18 +1044,21 @@ ProcessUTF8Portion ( XMLParserAdapter * xmlParser, + if ( escLen < 0 ) { + + // Have a partial numeric escape in this buffer, wait for more input. +- if ( last ) continue; // No more buffers, not an escape, absorb as normal input. +- xmlParser->ParseBuffer ( spanStart, (spanEnd - spanStart), false ); ++ if ( last ) { ++ copy.push_back('&'); ++ continue; // No more buffers, not an escape, absorb as normal input. ++ } ++ xmlParser->ParseBuffer ( copy.c_str(), copy.size(), false ); + return (spanEnd - buffer); + + } else if ( escLen > 0 ) { + + // Have a complete numeric escape to replace. +- xmlParser->ParseBuffer ( spanStart, (spanEnd - spanStart), false ); +- xmlParser->ParseBuffer ( " ", 1, false ); +- spanStart = spanEnd + escLen; +- spanEnd = spanStart - 1; // ! The loop continuation will increment spanEnd! ++ copy.push_back(' '); ++ spanEnd = spanEnd + escLen - 1; // ! The loop continuation will increment spanEnd! + ++ } else { ++ copy.push_back('&'); + } + + } +@@ -1049,10 +1066,8 @@ ProcessUTF8Portion ( XMLParserAdapter * xmlParser, + } + + XMP_Assert ( spanEnd == bufEnd ); +- +- if ( spanStart < bufEnd ) xmlParser->ParseBuffer ( spanStart, (spanEnd - spanStart), false ); +- if ( last ) xmlParser->ParseBuffer ( " ", 1, true ); +- ++ copy.push_back(' '); ++ xmlParser->ParseBuffer ( copy.c_str(), copy.size(), true ); + return length; + + } // ProcessUTF8Portion
meta-oe/recipes-support/exiv2/exiv2_0.27.3.bb +1 -0
@@ -14,6 +14,7 @@ SRC_URI = "https://github.com/Exiv2/${BPN}/releases/download/v${PV}/${BP}-Source file://CVE-2021-29473.patch \ file://CVE-2021-3482.patch \ file://CVE-2021-29623.patch \ + file://CVE-2021-32617.patch \ " SRC_URI[sha256sum] = "a79f5613812aa21755d578a297874fb59a85101e793edc64ec2c6bd994e3e778"
PATCH 8/10 exiv2: patch CVE-2021-32815
In reply to Gyorgy SarvariDetails: https://nvd.nist.gov/vuln/detail/CVE-2021-32815
Pick the patch from the PR mentioned in he nvd report.
This patch is a combination of 3 commits, which are so small, that it is still very readable in this form also.
--- .../exiv2/exiv2/CVE-2021-32815.patch | 36 +++++++++++++++++++ meta-oe/recipes-support/exiv2/exiv2_0.27.3.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta-oe/recipes-support/exiv2/exiv2/CVE-2021-32815.patch
meta-oe/recipes-support/exiv2/exiv2/CVE-2021-32815.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 14fc89433d22f56fa3ec973d802e9316a268deab Mon Sep 17 00:00:00 2001 +From: Kevin Backhouse <[email protected]> +Date: Wed, 23 Jun 2021 22:39:31 +0100 +Subject: [PATCH] Don't crash if s > size. + +CVE: CVE-2021-32815 + +Upstream-Status: Backport [https://github.com/Exiv2/exiv2/pull/1739/commits/0c17eb33c0a7fad1796ce23b8bbc32067f511aed +https://github.com/Exiv2/exiv2/pull/1739/commits/04466168b87dedff4ec09c09e9c23f2334ba1734 +https://github.com/Exiv2/exiv2/pull/1739/commits/c79d83f25fdd09218697d482211a61db87ce5333] + +Signed-off-by: Gyorgy Sarvari <[email protected]> +--- + src/crwimage_int.cpp | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/src/crwimage_int.cpp b/src/crwimage_int.cpp +index 2e3e507..0232867 100644 +--- a/src/crwimage_int.cpp ++++ b/src/crwimage_int.cpp +@@ -1226,9 +1226,12 @@ namespace Exiv2 { + for (ExifData::const_iterator i = b; i != e; ++i) { + if (i->ifdId() != ifdId) continue; + const uint16_t s = i->tag()*2 + static_cast<uint16_t>(i->size()); +- assert(s <= size); +- if (len < s) len = s; +- i->copy(buf.pData_ + i->tag()*2, byteOrder); ++ if (s <= size) { ++ if (len < s) len = s; ++ i->copy(buf.pData_ + i->tag()*2, byteOrder); ++ } else { ++ EXV_ERROR << "packIfdId out-of-bounds error: s = " << std::dec << s << "\n"; ++ } + } + // Round the size to make it even. + buf.size_ = len + len%2;
meta-oe/recipes-support/exiv2/exiv2_0.27.3.bb +1 -0
@@ -15,6 +15,7 @@ SRC_URI = "https://github.com/Exiv2/${BPN}/releases/download/v${PV}/${BP}-Source file://CVE-2021-3482.patch \ file://CVE-2021-29623.patch \ file://CVE-2021-32617.patch \ + file://CVE-2021-32815.patch \ " SRC_URI[sha256sum] = "a79f5613812aa21755d578a297874fb59a85101e793edc64ec2c6bd994e3e778"
PATCH 9/10 exiv2: patch CVE-2021-34334
In reply to Gyorgy SarvariDetails: https://nvd.nist.gov/vuln/detail/CVE-2021-34334
Pick the patches from the PR mentioned in the nvd report.
--- .../exiv2/exiv2/CVE-2021-34334-1.patch | 36 ++ .../exiv2/exiv2/CVE-2021-34334-2.patch | 322 ++++++++++++++++++ .../exiv2/exiv2/CVE-2021-34334-3.patch | 35 ++ .../exiv2/exiv2/CVE-2021-34334-4.patch | 25 ++ meta-oe/recipes-support/exiv2/exiv2_0.27.3.bb | 4 + 5 files changed, 422 insertions(+) create mode 100644 meta-oe/recipes-support/exiv2/exiv2/CVE-2021-34334-1.patch create mode 100644 meta-oe/recipes-support/exiv2/exiv2/CVE-2021-34334-2.patch create mode 100644 meta-oe/recipes-support/exiv2/exiv2/CVE-2021-34334-3.patch create mode 100644 meta-oe/recipes-support/exiv2/exiv2/CVE-2021-34334-4.patch
meta-oe/recipes-support/exiv2/exiv2/CVE-2021-34334-1.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 5a11c81fe8df7cb82c2b2889b1d5863b42d59cc6 Mon Sep 17 00:00:00 2001 +From: Kevin Backhouse <[email protected]> +Date: Tue, 6 Jul 2021 18:15:40 +0100 +Subject: [PATCH] Extra checking to prevent the loop counter from wrapping + around. + +CVE: CVE-2021-34334 +Upstream-Status: Backport [https://github.com/Exiv2/exiv2/pull/1766/commits/97c4880882d87aee77809b4b6e8fb4a5558e4ca2] +Signed-off-by: Gyorgy Sarvari <[email protected]> +--- + src/crwimage_int.cpp | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/crwimage_int.cpp b/src/crwimage_int.cpp +index 0232867..4ccea63 100644 +--- a/src/crwimage_int.cpp ++++ b/src/crwimage_int.cpp +@@ -868,12 +868,16 @@ namespace Exiv2 { + assert(ifdId != ifdIdNotSet); + + std::string groupName(Internal::groupName(ifdId)); ++ const uint32_t component_size = ciffComponent.size(); ++ enforce(component_size % 2 == 0, kerCorruptedMetadata); ++ enforce(component_size/2 <= static_cast<uint32_t>(std::numeric_limits<uint16_t>::max()), kerCorruptedMetadata); ++ const uint16_t num_components = static_cast<uint16_t>(component_size/2); + uint16_t c = 1; +- while (uint32_t(c)*2 < ciffComponent.size()) { ++ while (c < num_components) { + uint16_t n = 1; + ExifKey key(c, groupName); + UShortValue value; +- if (ifdId == canonCsId && c == 23 && ciffComponent.size() > 50) n = 3; ++ if (ifdId == canonCsId && c == 23 && component_size >= 52) n = 3; + value.read(ciffComponent.pData() + c*2, n*2, byteOrder); + image.exifData().add(key, &value); + if (ifdId == canonSiId && c == 21) aperture = value.toLong();
meta-oe/recipes-support/exiv2/exiv2/CVE-2021-34334-2.patch new file +322 -0
322 lines not on this page · raw message
meta-oe/recipes-support/exiv2/exiv2/CVE-2021-34334-3.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 95f5403e8b3a5d71241b6b9ef809f4097ad404a5 Mon Sep 17 00:00:00 2001 +From: Kevin Backhouse <[email protected]> +Date: Wed, 7 Jul 2021 16:49:24 +0100 +Subject: [PATCH] Better fix for potential integer overflow in `bytes.size() - + 3`. + +CVE: CVE-2021-34334 +Upstream-Status: Backport [https://github.com/Exiv2/exiv2/pull/1766/commits/ee8af718983469af5a86f041b58a5f52b1cbad76] +Signed-off-by: Gyorgy Sarvari <[email protected]> +--- + src/iptc.cpp | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/iptc.cpp b/src/iptc.cpp +index f823f74..8e54b9c 100644 +--- a/src/iptc.cpp ++++ b/src/iptc.cpp +@@ -351,12 +351,15 @@ namespace Exiv2 { + + void IptcData::printStructure(std::ostream& out, const Slice<byte*>& bytes, uint32_t depth) + { ++ if (bytes.size() < 3) { ++ return; ++ } + size_t i = 0; +- while (i + 3 < bytes.size() && bytes.at(i) != 0x1c) ++ while (i < bytes.size() - 3 && bytes.at(i) != 0x1c) + i++; + depth++; + out << Internal::indent(depth) << "Record | DataSet | Name | Length | Data" << std::endl; +- while (i + 3 < bytes.size()) { ++ while (i < bytes.size() - 3) { + if (bytes.at(i) != 0x1c) { + break; + }
meta-oe/recipes-support/exiv2/exiv2/CVE-2021-34334-4.patch new file +25 -0
@@ -0,0 +1,25 @@ +From 28c81a061768f06aa88d52bf46e7195fe350c272 Mon Sep 17 00:00:00 2001 +From: Kevin Backhouse <[email protected]> +Date: Thu, 8 Jul 2021 10:46:24 +0100 +Subject: [PATCH] Type of escapeStart should be size_t. + +CVE: CVE-2021-34334 +Upstream-Status: Backport [https://github.com/Exiv2/exiv2/pull/1766/commits/e74d8accc431d9064589bad6cf8f17c30229523d] +Signed-off-by: Gyorgy Sarvari <[email protected]> +--- + src/exiv2.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/exiv2.cpp b/src/exiv2.cpp +index 09f690d..3d9fa4f 100644 +--- a/src/exiv2.cpp ++++ b/src/exiv2.cpp +@@ -1505,7 +1505,7 @@ namespace { + result.push_back(ch); + continue; + } +- int escapeStart = i; ++ size_t escapeStart = i; + if (!(input.length() - 1 > i)) { + result.push_back(ch); + continue;
meta-oe/recipes-support/exiv2/exiv2_0.27.3.bb +4 -0
@@ -16,6 +16,10 @@ SRC_URI = "https://github.com/Exiv2/${BPN}/releases/download/v${PV}/${BP}-Source file://CVE-2021-29623.patch \ file://CVE-2021-32617.patch \ file://CVE-2021-32815.patch \ + file://CVE-2021-34334-1.patch \ + file://CVE-2021-34334-2.patch \ + file://CVE-2021-34334-3.patch \ + file://CVE-2021-34334-4.patch \ " SRC_URI[sha256sum] = "a79f5613812aa21755d578a297874fb59a85101e793edc64ec2c6bd994e3e778"
PATCH 10/10 exiv2: patch CVE-2021-34335
In reply to Gyorgy SarvariDetails: https://nvd.nist.gov/vuln/detail/CVE-2021-34335
Pick the patches from the PR mentioned in the nvd report.
--- .../exiv2/exiv2/CVE-2021-34335-1.patch | 43 ++++++++++++++ .../exiv2/exiv2/CVE-2021-34335-2.patch | 57 +++++++++++++++++++ meta-oe/recipes-support/exiv2/exiv2_0.27.3.bb | 2 + 3 files changed, 102 insertions(+) create mode 100644 meta-oe/recipes-support/exiv2/exiv2/CVE-2021-34335-1.patch create mode 100644 meta-oe/recipes-support/exiv2/exiv2/CVE-2021-34335-2.patch
meta-oe/recipes-support/exiv2/exiv2/CVE-2021-34335-1.patch new file +43 -0
@@ -0,0 +1,43 @@ +From bde41fcab99f5def735bc4b0b8515f211eda98c0 Mon Sep 17 00:00:00 2001 +From: Kevin Backhouse <[email protected]> +Date: Tue, 29 Jun 2021 23:32:59 +0100 +Subject: [PATCH] Prevent divide-by-zero crash. + +CVE: CVE-2021-34335 +Upstream-Status: Backport [https://github.com/Exiv2/exiv2/pull/1750/commits/f2d6d24ed74b2c5dbbbdc25bafd42ce9357978f8] +Signed-off-by: Gyorgy Sarvari <[email protected]> +--- + src/minoltamn_int.cpp | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/src/minoltamn_int.cpp b/src/minoltamn_int.cpp +index f5c0b41..77521fc 100644 +--- a/src/minoltamn_int.cpp ++++ b/src/minoltamn_int.cpp +@@ -2179,16 +2179,20 @@ namespace Exiv2 { + + if ( model == "ILCE-6000" && maxAperture == F1_8 ) try { + long focalLength = getKeyLong ("Exif.Photo.FocalLength" ,metadata); +- long focalL35mm = getKeyLong ("Exif.Photo.FocalLengthIn35mmFilm",metadata); +- long focalRatio = (focalL35mm*100)/focalLength; +- if ( inRange(focalRatio,145,155) ) index = 2 ; ++ if (focalLength > 0) { ++ long focalL35mm = getKeyLong ("Exif.Photo.FocalLengthIn35mmFilm",metadata); ++ long focalRatio = (focalL35mm*100)/focalLength; ++ if ( inRange(focalRatio,145,155) ) index = 2 ; ++ } + } catch (...) {} + + if ( model == "ILCE-6000" && maxApertures.find(maxAperture) != maxApertures.end() ) try { + long focalLength = getKeyLong ("Exif.Photo.FocalLength" ,metadata); +- long focalL35mm = getKeyLong ("Exif.Photo.FocalLengthIn35mmFilm",metadata); +- long focalRatio = (focalL35mm*100)/focalLength; +- if ( inRange(focalRatio,145,155) ) index = 3 ; ++ if (focalLength > 0) { ++ long focalL35mm = getKeyLong ("Exif.Photo.FocalLengthIn35mmFilm",metadata); ++ long focalRatio = (focalL35mm*100)/focalLength; ++ if ( inRange(focalRatio,145,155) ) index = 3 ; ++ } + } catch (...) {} + + if ( index > 0 ) {
meta-oe/recipes-support/exiv2/exiv2/CVE-2021-34335-2.patch new file +57 -0
57 lines not on this page · raw message
meta-oe/recipes-support/exiv2/exiv2_0.27.3.bb +2 -0
@@ -20,6 +20,8 @@ SRC_URI = "https://github.com/Exiv2/${BPN}/releases/download/v${PV}/${BP}-Source file://CVE-2021-34334-2.patch \ file://CVE-2021-34334-3.patch \ file://CVE-2021-34334-4.patch \ + file://CVE-2021-34335-1.patch \ + file://CVE-2021-34335-2.patch \ " SRC_URI[sha256sum] = "a79f5613812aa21755d578a297874fb59a85101e793edc64ec2c6bd994e3e778"