From 52f1f01ea1f743ee6c8b74f073a238d73f31f392 Mon Sep 17 00:00:00 2001 From: qz_cx Date: Mon, 31 Oct 2022 14:39:26 +0800 Subject: [PATCH] fix:CVE-2022-3756 --- CVE-2022-3756.patch | 30 ++++++++++++++++++++++++++++++ exiv2.spec | 10 +++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 CVE-2022-3756.patch diff --git a/CVE-2022-3756.patch b/CVE-2022-3756.patch new file mode 100644 index 0000000..90618e6 --- /dev/null +++ b/CVE-2022-3756.patch @@ -0,0 +1,30 @@ +From be374cc6cd51906eaacc7a4f77c9ac37ea7c69c7 Mon Sep 17 00:00:00 2001 +From: qz_cx +Date: Mon, 31 Oct 2022 14:29:31 +0800 +Subject: [PATCH] Avoid potential integer overflow. + +Merge pull request #2347 from kevinbackhouse/quicktimevideo-size-calc + +Avoid potential integer overflow in QuickTimeVideo::userDataDecoder +@kevinbackhouse +kevinbackhouse committed on 7 Sep +--- + src/quicktimevideo.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/quicktimevideo.cpp b/src/quicktimevideo.cpp +index 335d884..9b80947 100644 +--- a/src/quicktimevideo.cpp ++++ b/src/quicktimevideo.cpp +@@ -895,7 +895,7 @@ namespace Exiv2 { + + tv = find(userDataReferencetags, Exiv2::toString( buf.pData_)); + +- if(size == 0 || (size - 12) <= 0) ++ if (size <= 12) + break; + + else if(equalsQTimeTag(buf, "DcMD") || equalsQTimeTag(buf, "NCDT")) +-- +2.33.0 + diff --git a/exiv2.spec b/exiv2.spec index 36bd3ae..9dd46fb 100644 --- a/exiv2.spec +++ b/exiv2.spec @@ -1,11 +1,13 @@ Name: exiv2 Version: 0.27.5 -Release: 1 +Release: 2 Summary: Exif, IPTC and XMP metadata and the ICC Profile License: GPLv2+ URL: http://www.exiv2.org/ Source0: https://github.com/Exiv2/exiv2/archive/refs/tags/v%{version}.tar.gz +Patch0001: CVE-2022-3756.patch + Provides: exiv2-libs Obsoletes: exiv2-libs @@ -74,6 +76,12 @@ test -x %{buildroot}%{_libdir}/libexiv2.so %{_pkgdocdir}/ %changelog +* Sat Sep 17 2022 qz_cx - 0.27.5-2 +- Type:CVE +- ID:NA +- SUG:NA +- DESC: fix CVE-2022-3756 + * Tue Nov 23 2021 wangkai - 0.27.5-1 - Upgrade to 0.27.5 -- Gitee