diff options
| author | Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> | 2018-08-22 18:49:59 +0530 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-29 15:23:51 +0100 |
| commit | c9b7487d4aee81ce68e484738a47c6188d495475 (patch) | |
| tree | 58755a31dfcb97d8b66f1fdd27de37d7d465d146 | |
| parent | 288dbefdf3477649a88b93cadd12e08fb330ce38 (diff) | |
| download | poky-c9b7487d4aee81ce68e484738a47c6188d495475.tar.gz | |
libarchive: CVE-2017-14503
Reject LHA archive entries with negative size.
Affects libarchive = 3.3.2
(From OE-Core rev: 3e000591928cfc35df192c7eb00db65687930566)
Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-extended/libarchive/libarchive/CVE-2017-14503.patch | 33 | ||||
| -rw-r--r-- | meta/recipes-extended/libarchive/libarchive_3.3.2.bb | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-extended/libarchive/libarchive/CVE-2017-14503.patch b/meta/recipes-extended/libarchive/libarchive/CVE-2017-14503.patch new file mode 100644 index 0000000000..42fa68caeb --- /dev/null +++ b/meta/recipes-extended/libarchive/libarchive/CVE-2017-14503.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | From 2c8c83b9731ff822fad6cc8c670ea5519c366a14 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Joerg Sonnenberger <joerg@bec.de> | ||
| 3 | Date: Thu, 19 Jul 2018 21:14:53 +0200 | ||
| 4 | Subject: [PATCH] Reject LHA archive entries with negative size. | ||
| 5 | |||
| 6 | CVE: CVE-2017-14503 | ||
| 7 | Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/2c8c83b9731ff822fad6cc8c670ea5519c366a14] | ||
| 8 | |||
| 9 | Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> | ||
| 10 | --- | ||
| 11 | libarchive/archive_read_support_format_lha.c | 6 ++++++ | ||
| 12 | 1 file changed, 6 insertions(+) | ||
| 13 | |||
| 14 | diff --git a/libarchive/archive_read_support_format_lha.c b/libarchive/archive_read_support_format_lha.c | ||
| 15 | index b8ef4ae1..95c99bb1 100644 | ||
| 16 | --- a/libarchive/archive_read_support_format_lha.c | ||
| 17 | +++ b/libarchive/archive_read_support_format_lha.c | ||
| 18 | @@ -701,6 +701,12 @@ archive_read_format_lha_read_header(struct archive_read *a, | ||
| 19 | * Prepare variables used to read a file content. | ||
| 20 | */ | ||
| 21 | lha->entry_bytes_remaining = lha->compsize; | ||
| 22 | + if (lha->entry_bytes_remaining < 0) { | ||
| 23 | + archive_set_error(&a->archive, | ||
| 24 | + ARCHIVE_ERRNO_FILE_FORMAT, | ||
| 25 | + "Invalid LHa entry size"); | ||
| 26 | + return (ARCHIVE_FATAL); | ||
| 27 | + } | ||
| 28 | lha->entry_offset = 0; | ||
| 29 | lha->entry_crc_calculated = 0; | ||
| 30 | |||
| 31 | -- | ||
| 32 | 2.13.3 | ||
| 33 | |||
diff --git a/meta/recipes-extended/libarchive/libarchive_3.3.2.bb b/meta/recipes-extended/libarchive/libarchive_3.3.2.bb index 5daca2731e..3269716473 100644 --- a/meta/recipes-extended/libarchive/libarchive_3.3.2.bb +++ b/meta/recipes-extended/libarchive/libarchive_3.3.2.bb | |||
| @@ -36,6 +36,7 @@ SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \ | |||
| 36 | file://CVE-2017-14166.patch \ | 36 | file://CVE-2017-14166.patch \ |
| 37 | file://CVE-2017-14502.patch \ | 37 | file://CVE-2017-14502.patch \ |
| 38 | file://non-recursive-extract-and-list.patch \ | 38 | file://non-recursive-extract-and-list.patch \ |
| 39 | file://CVE-2017-14503.patch \ | ||
| 39 | " | 40 | " |
| 40 | 41 | ||
| 41 | SRC_URI[md5sum] = "4583bd6b2ebf7e0e8963d90879eb1b27" | 42 | SRC_URI[md5sum] = "4583bd6b2ebf7e0e8963d90879eb1b27" |
