Compare commits

..

No commits in common. 'c10-beta' and 'c9' have entirely different histories.
c10-beta ... c9

2
.gitignore vendored

@ -1 +1 @@
SOURCES/libexif-0.6.24.tar.bz2
SOURCES/libexif-0_6_22-release.tar.gz

@ -1 +1 @@
8b42080dc6d62ee9a89658e878b622f2eaefe986 SOURCES/libexif-0.6.24.tar.bz2
9925660e70ee8b5ce480c6a6f30c84b382929142 SOURCES/libexif-0_6_22-release.tar.gz

@ -0,0 +1,58 @@
From ce03ad7ef4e8aeefce79192bf5b6f69fae396f0c Mon Sep 17 00:00:00 2001
From: Marcus Meissner <marcus@jet.franken.de>
Date: Mon, 8 Jun 2020 17:27:06 +0200
Subject: [PATCH] fixed another unsigned integer overflow
first fixed by google in android fork,
https://android.googlesource.com/platform/external/libexif/+/1e187b62682ffab5003c702657d6d725b4278f16%5E%21/#F0
(use a more generic overflow check method, also check second overflow instance.)
https://security-tracker.debian.org/tracker/CVE-2020-0198
---
libexif/exif-data.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/libexif/exif-data.c b/libexif/exif-data.c
index 8b280d3..b495726 100644
--- a/libexif/exif-data.c
+++ b/libexif/exif-data.c
@@ -47,6 +47,8 @@
#undef JPEG_MARKER_APP1
#define JPEG_MARKER_APP1 0xe1
+#define CHECKOVERFLOW(offset,datasize,structsize) (( offset >= datasize) || (structsize > datasize) || (offset > datasize - structsize ))
+
static const unsigned char ExifHeader[] = {0x45, 0x78, 0x69, 0x66, 0x00, 0x00};
struct _ExifDataPrivate
@@ -327,7 +329,7 @@ exif_data_load_data_thumbnail (ExifData *data, const unsigned char *d,
exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData", "Bogus thumbnail offset (%u).", o);
return;
}
- if (s > ds - o) {
+ if (CHECKOVERFLOW(o,ds,s)) {
exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData", "Bogus thumbnail size (%u), max would be %u.", s, ds-o);
return;
}
@@ -420,9 +422,9 @@ exif_data_load_data_content (ExifData *data, ExifIfd ifd,
}
/* Read the number of entries */
- if ((offset + 2 < offset) || (offset + 2 < 2) || (offset + 2 > ds)) {
+ if (CHECKOVERFLOW(offset, ds, 2)) {
exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifData",
- "Tag data past end of buffer (%u > %u)", offset+2, ds);
+ "Tag data past end of buffer (%u+2 > %u)", offset, ds);
return;
}
n = exif_get_short (d + offset, data->priv->order);
@@ -431,7 +433,7 @@ exif_data_load_data_content (ExifData *data, ExifIfd ifd,
offset += 2;
/* Check if we have enough data. */
- if (offset + 12 * n > ds) {
+ if (CHECKOVERFLOW(offset, ds, 12*n)) {
n = (ds - offset) / 12;
exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData",
"Short data; only loading %hu entries...", n);

@ -0,0 +1,32 @@
From 9266d14b5ca4e29b970fa03272318e5f99386e06 Mon Sep 17 00:00:00 2001
From: Marcus Meissner <marcus@jet.franken.de>
Date: Thu, 5 Nov 2020 09:50:08 +0100
Subject: [PATCH] fixed a incorrect overflow check that could be optimized
away.
inspired by:
https://android.googlesource.com/platform/external/libexif/+/8e7345f3bc0bad06ac369d6cbc1124c8ceaf7d4b
https://source.android.com/security/bulletin/2020-11-01
CVE-2020-0452
---
NEWS | 3 ++-
libexif/exif-entry.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/libexif/exif-entry.c b/libexif/exif-entry.c
index 3fc0ff9..4b866ce 100644
--- a/libexif/exif-entry.c
+++ b/libexif/exif-entry.c
@@ -1371,8 +1371,8 @@ exif_entry_get_value (ExifEntry *e, char *val, unsigned int maxlen)
{
unsigned char *utf16;
- /* Sanity check the size to prevent overflow */
- if (e->size+sizeof(uint16_t)+1 < e->size) break;
+ /* Sanity check the size to prevent overflow. Note EXIF files are 64kb at most. */
+ if (e->size >= 65536 - sizeof(uint16_t)*2) break;
/* The tag may not be U+0000-terminated , so make a local
U+0000-terminated copy before converting it */

@ -1,18 +1,24 @@
Summary: Library for extracting extra information from image files
Name: libexif
Version: 0.6.24
Release: 8%{?dist}
License: LGPL-2.1-or-later
Version: 0.6.22
Release: 6%{?dist}
License: LGPLv2+
URL: https://libexif.github.io/
Source0: https://github.com/libexif/libexif/releases/download/v%{version}/libexif-%{version}.tar.bz2
%global tarball_version %(echo %{version} | sed -e 's|\\.|_|g')
Source0: https://github.com/libexif/libexif/archive/libexif-%{tarball_version}-release.tar.gz
# https://github.com/libexif/libexif/commit/ce03ad7ef4e8aeefce79192bf5b6f69fae396f0c
Patch0: CVE-2020-0181-CVE-2020-0198.patch
# https://github.com/libexif/libexif/commit/9266d14b5ca4e29b970fa03272318e5f99386e06
Patch1: CVE-2020-0452.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: doxygen
BuildRequires: gettext-devel
BuildRequires: libtool
BuildRequires: make
BuildRequires: pkgconfig
BuildRequires: make
%description
Most digital cameras produce EXIF files, which are JPEG files with
@ -22,7 +28,6 @@ allows you to parse an EXIF file and read the data from those tags.
%package devel
Summary: Files needed for libexif application development
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The libexif-devel package contains the libraries and header files
for writing programs that use libexif.
@ -30,34 +35,38 @@ for writing programs that use libexif.
%package doc
Summary: The EXIF Library API documentation
Requires: %{name}%{?_isa} = %{version}-%{release}
%description doc
API Documentation for programmers wishing to use libexif in their programs.
%prep
%autosetup -p1
autoreconf -fiv
iconv -f latin1 -t utf-8 < COPYING > COPYING.utf8; cp COPYING.utf8 COPYING
iconv -f latin1 -t utf-8 < README > README.utf8; cp README.utf8 README
%autosetup -n libexif-libexif-%{tarball_version}-release -p1
%build
%configure --disable-static
autoreconf -fiv
%configure \
--disable-static
%make_build
%install
%make_install
rm -rf %{buildroot}%{_datadir}/doc/libexif
rm -fv %{buildroot}%{_libdir}/lib*.la
rm -rf %{buildroot}%{_datadir}/doc/libexif
cp -R doc/doxygen-output/libexif-api.html .
iconv -f latin1 -t utf-8 < COPYING > COPYING.utf8; cp COPYING.utf8 COPYING
iconv -f latin1 -t utf-8 < README > README.utf8; cp README.utf8 README
%find_lang libexif-12
%check
%make_build check
make check
%ldconfig_scriptlets
%files -f libexif-12.lang
%doc README NEWS
@ -70,39 +79,16 @@ rm -rf %{buildroot}%{_datadir}/doc/libexif
%{_libdir}/pkgconfig/libexif.pc
%files doc
%doc doc/doxygen-output/libexif-api.html
%doc libexif-api.html
%changelog
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.6.24-8
- Bump release for June 2024 mass rebuild
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.24-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.24-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.24-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.24-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.24-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.24-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Nov 30 2021 Yaakov Selkowitz <yselkowi@redhat.com> - 0.6.24-1
- 0.6.24 (#2026626)
* Wed Sep 15 2021 Rex Dieter <rdieter@fedoraproject.org> - 0.6.23-1
- 0.6.23 (#2003457)
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.6.22-6
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.22-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.6.22-5
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.22-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save