Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Adélie Package Tree
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adélie Linux
Adélie Package Tree
Commits
29e941e7
Verified
Commit
29e941e7
authored
4 years ago
by
Max Rees
Browse files
Options
Downloads
Patches
Plain Diff
user/libexif: patch CVE-2020-0198 (
#285
)
parent
8c8498bd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!464
Security updates for 2020.06.02
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
user/libexif/APKBUILD
+7
-2
7 additions, 2 deletions
user/libexif/APKBUILD
user/libexif/CVE-2020-0198.patch
+58
-0
58 additions, 0 deletions
user/libexif/CVE-2020-0198.patch
with
65 additions
and
2 deletions
user/libexif/APKBUILD
+
7
−
2
View file @
29e941e7
...
...
@@ -10,7 +10,9 @@ license="LGPL-2.0+"
subpackages
=
"
$pkgname
-dev
$pkgname
-doc
$pkgname
-lang"
depends
=
""
makedepends
=
""
source
=
"https://github.com/libexif/libexif/releases/download/libexif-
$_pkgver
-release/libexif-
$pkgver
.tar.xz"
source
=
"https://github.com/libexif/libexif/releases/download/libexif-
$_pkgver
-release/libexif-
$pkgver
.tar.xz
CVE-2020-0198.patch
"
# secfixes:
# 0.6.21-r3:
...
...
@@ -21,6 +23,8 @@ source="https://github.com/libexif/libexif/releases/download/libexif-$_pkgver-re
# - CVE-2019-9278
# 0.6.22-r0:
# - CVE-2020-0093
# - CVE-2020-0182
# - CVE-2020-0198
# - CVE-2020-12767
# - CVE-2020-13112
# - CVE-2020-13113
...
...
@@ -47,4 +51,5 @@ package() {
make
DESTDIR
=
"
$pkgdir
"
install
}
sha512sums
=
"0a9e7bf0258ed98a794b667d45e8fc65299101a2a2d2e39c358715b20b003beff258782f0736cd5b53978428a2f878a989f303bee249a978850a065f33c534af libexif-0.6.22.tar.xz"
sha512sums
=
"0a9e7bf0258ed98a794b667d45e8fc65299101a2a2d2e39c358715b20b003beff258782f0736cd5b53978428a2f878a989f303bee249a978850a065f33c534af libexif-0.6.22.tar.xz
7df084f9acdc09bd05fadfb66332956d8587fcaac9d693000f47fadeba17b3c49eafa402d1e2c9b7d394e697feccd1f760bab8b64378deaea1777c5a3b90c3b2 CVE-2020-0198.patch"
This diff is collapsed.
Click to expand it.
user/libexif/CVE-2020-0198.patch
0 → 100644
+
58
−
0
View file @
29e941e7
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);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment