mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-04 14:39:54 +00:00
exiv2: Fix CVE-2021-29473
References
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-29473
The out-of-bounds read is triggered when Exiv2 is used to write metadata into a crafted image file.
An attacker could potentially exploit the vulnerability to cause a denial of service by crashing Exiv2,
if they can trick the victim into running Exiv2 on a crafted image file.
Upstream-Status: Accepted [https://github.com/Exiv2/exiv2/pull/1587/commits/e6a0982f7cd9282052b6e3485a458d60629ffa0b]
CVE: CVE-2021-29473
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
From e6a0982f7cd9282052b6e3485a458d60629ffa0b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kevin Backhouse <kevinbackhouse@github.com>
|
||||||
|
Date: Fri, 23 Apr 2021 11:44:44 +0100
|
||||||
|
Subject: [PATCH] Add bounds check in Jp2Image::doWriteMetadata().
|
||||||
|
|
||||||
|
---
|
||||||
|
src/jp2image.cpp | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/src/jp2image.cpp b/src/jp2image.cpp
|
||||||
|
index 1694fed27..ca8c9ddbb 100644
|
||||||
|
--- a/src/jp2image.cpp
|
||||||
|
+++ b/src/jp2image.cpp
|
||||||
|
@@ -908,6 +908,7 @@ static void boxes_check(size_t b,size_t m)
|
||||||
|
|
||||||
|
case kJp2BoxTypeUuid:
|
||||||
|
{
|
||||||
|
+ enforce(boxBuf.size_ >= 24, Exiv2::kerCorruptedMetadata);
|
||||||
|
if(memcmp(boxBuf.pData_ + 8, kJp2UuidExif, 16) == 0)
|
||||||
|
{
|
||||||
|
#ifdef EXIV2_DEBUG_MESSAGES
|
||||||
@@ -15,6 +15,7 @@ SRC_URI += "file://0001-Use-compiler-fcf-protection-only-if-compiler-arch-su.pat
|
|||||||
file://CVE-2021-29463.patch \
|
file://CVE-2021-29463.patch \
|
||||||
file://CVE-2021-29464.patch \
|
file://CVE-2021-29464.patch \
|
||||||
file://CVE-2021-29470.patch \
|
file://CVE-2021-29470.patch \
|
||||||
|
file://CVE-2021-29473.patch \
|
||||||
file://CVE-2021-3482.patch"
|
file://CVE-2021-3482.patch"
|
||||||
|
|
||||||
S = "${WORKDIR}/${BPN}-${PV}-Source"
|
S = "${WORKDIR}/${BPN}-${PV}-Source"
|
||||||
|
|||||||
Reference in New Issue
Block a user