package/libarchive: add four security patches
PATCH 1/1 package/libarchive: add four security patches
From: Thomas De Schampheleire <[email protected]>
Add backported patches for the following four security issues in libarchive. There is no new release yet including these patches.
- CVE-2018-1000877 (https://nvd.nist.gov/vuln/detail/CVE-2018-1000877)
"libarchive version commit 416694915449219d505531b1096384f3237dd6cc onwards (release v3.1.0 onwards) contains a CWE-415: Double Free vulnerability in RAR decoder - libarchive/archive_read_support_format_rar.c, parse_codes(), realloc(rar->lzss.window, new_size) with new_size = 0 that can result in Crash/DoS. This attack appear to be exploitable via the victim must open a specially crafted RAR archive."
- CVE-2018-1000878 (https://nvd.nist.gov/vuln/detail/CVE-2018-1000878)
"libarchive version commit 416694915449219d505531b1096384f3237dd6cc onwards (release v3.1.0 onwards) contains a CWE-416: Use After Free vulnerability in RAR decoder - libarchive/archive_read_support_format_rar.c that can result in Crash/DoS - it is unknown if RCE is possible. This attack appear to be exploitable via the victim must open a specially crafted RAR archive."
- CVE-2018-1000879 (https://nvd.nist.gov/vuln/detail/CVE-2018-1000879)
"libarchive version commit 379867ecb330b3a952fb7bfa7bffb7bbd5547205 onwards (release v3.3.0 onwards) contains a CWE-476: NULL Pointer Dereference vulnerability in ACL parser - libarchive/archive_acl.c, archive_acl_from_text_l() that can result in Crash/DoS. This attack appear to be exploitable via the victim must open a specially crafted archive file."
- CVE-2018-1000880 (https://nvd.nist.gov/vuln/detail/CVE-2018-1000880)
"libarchive version commit 9693801580c0cf7c70e862d305270a16b52826a7 onwards (release v3.2.0 onwards) contains a CWE-20: Improper Input Validation vulnerability in WARC parser - libarchive/archive_read_support_format_warc.c, _warc_read() that can result in DoS - quasi-infinite run time and disk usage from tiny file. This attack appear to be exploitable via the victim must open a specially crafted WARC file."
--- ...ree-when-a-window-size-of-0-is-speci.patch | 40 +++++++++ ...cross-multi-part-archives-must-match.patch | 81 +++++++++++++++++++ .../0003-Skip-0-length-ACL-fields.patch | 52 ++++++++++++ .../0004-warc-consume-data-once-read.patch | 46 +++++++++++ 4 files changed, 219 insertions(+) create mode 100644 package/libarchive/0001-Avoid-a-double-free-when-a-window-size-of-0-is-speci.patch create mode 100644 package/libarchive/0002-rar-file-split-across-multi-part-archives-must-match.patch create mode 100644 package/libarchive/0003-Skip-0-length-ACL-fields.patch create mode 100644 package/libarchive/0004-warc-consume-data-once-read.patch
package/libarchive/0001-Avoid-a-double-free-when-a-window-size-of-0-is-speci.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 021efa522ad729ff0f5806c4ce53e4a6cc1daa31 Mon Sep 17 00:00:00 2001 +From: Daniel Axtens <[email protected]> +Date: Tue, 20 Nov 2018 17:56:29 +1100 +Subject: [PATCH] Avoid a double-free when a window size of 0 is specified + +new_size can be 0 with a malicious or corrupted RAR archive. + +realloc(area, 0) is equivalent to free(area), so the region would +be free()d here and the free()d again in the cleanup function. + +Found with a setup running AFL, afl-rb, and qsym. +--- + libarchive/archive_read_support_format_rar.c | 5 +++++ + 1 file changed, 5 insertions(+) + +[for import into Buildroot] +Signed-off-by: Thomas De Schampheleire <[email protected]> +Upstream-status: backport + +CVE-2018-1000877 + +diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c +index 23452222..6f419c27 100644 +--- a/libarchive/archive_read_support_format_rar.c ++++ b/libarchive/archive_read_support_format_rar.c +@@ -2300,6 +2300,11 @@ parse_codes(struct archive_read *a) + new_size = DICTIONARY_MAX_SIZE; + else + new_size = rar_fls((unsigned int)rar->unp_size) << 1; ++ if (new_size == 0) { ++ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, ++ "Zero window size is invalid."); ++ return (ARCHIVE_FATAL); ++ } + new_window = realloc(rar->lzss.window, new_size); + if (new_window == NULL) { + archive_set_error(&a->archive, ENOMEM, +-- +2.19.2 +
package/libarchive/0002-rar-file-split-across-multi-part-archives-must-match.patch new file +81 -0
81 lines not on this page · raw message
package/libarchive/0003-Skip-0-length-ACL-fields.patch new file +52 -0
52 lines not on this page · raw message
package/libarchive/0004-warc-consume-data-once-read.patch new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
2.19.2
PATCH 1/1 package/libarchive: add four security patches
Quoted 42 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas De Schampheleire <[email protected]> writes:
From: Thomas De Schampheleire <[email protected]> Add backported patches for the following four security issues in libarchive. There is no new release yet including these patches.
- CVE-2018-1000877 (https://nvd.nist.gov/vuln/detail/CVE-2018-1000877)
"libarchive version commit
416694915449219d505531b1096384f3237dd6cconwards (release v3.1.0 onwards) contains a CWE-415: Double Free vulnerability in RAR decoder -libarchive/archive_read_support_format_rar.c,parse_codes(),realloc(rar->lzss.window, new_size)withnew_size= 0 that can result in Crash/DoS. This attack appear to be exploitable via the victim must open a specially crafted RAR archive."- CVE-2018-1000878 (https://nvd.nist.gov/vuln/detail/CVE-2018-1000878)
"libarchive version commit
416694915449219d505531b1096384f3237dd6cconwards (release v3.1.0 onwards) contains a CWE-416: Use After Free vulnerability in RAR decoder -libarchive/archive_read_support_format_rar.cthat can result in Crash/DoS - it is unknown if RCE is possible. This attack appear to be exploitable via the victim must open a specially crafted RAR archive."- CVE-2018-1000879 (https://nvd.nist.gov/vuln/detail/CVE-2018-1000879)
"libarchive version commit
379867ecb330b3a952fb7bfa7bffb7bbd5547205onwards (release v3.3.0 onwards) contains a CWE-476: NULL Pointer Dereference vulnerability in ACL parser -libarchive/archive_acl.c,archive_acl_from_text_l()that can result in Crash/DoS. This attack appear to be exploitable via the victim must open a specially crafted archive file."- CVE-2018-1000880 (https://nvd.nist.gov/vuln/detail/CVE-2018-1000880)
"libarchive version commit
9693801580c0cf7c70e862d305270a16b52826a7onwards (release v3.2.0 onwards) contains a CWE-20: Improper Input Validation vulnerability in WARC parser -libarchive/archive_read_support_format_warc.c,_warc_read()that can result in DoS - quasi-infinite run time and disk usage from tiny file. This attack appear to be exploitable via the victim must open a specially crafted WARC file."
Quoted 1 line
Signed-off-by Thomas De Schampheleire <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 package/libarchive: add four security patches
In reply to Thomas De SchampheleireQuoted 42 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas De Schampheleire <[email protected]> writes:
From: Thomas De Schampheleire <[email protected]> Add backported patches for the following four security issues in libarchive. There is no new release yet including these patches.
- CVE-2018-1000877 (https://nvd.nist.gov/vuln/detail/CVE-2018-1000877)
"libarchive version commit
416694915449219d505531b1096384f3237dd6cconwards (release v3.1.0 onwards) contains a CWE-415: Double Free vulnerability in RAR decoder -libarchive/archive_read_support_format_rar.c,parse_codes(),realloc(rar->lzss.window, new_size)withnew_size= 0 that can result in Crash/DoS. This attack appear to be exploitable via the victim must open a specially crafted RAR archive."- CVE-2018-1000878 (https://nvd.nist.gov/vuln/detail/CVE-2018-1000878)
"libarchive version commit
416694915449219d505531b1096384f3237dd6cconwards (release v3.1.0 onwards) contains a CWE-416: Use After Free vulnerability in RAR decoder -libarchive/archive_read_support_format_rar.cthat can result in Crash/DoS - it is unknown if RCE is possible. This attack appear to be exploitable via the victim must open a specially crafted RAR archive."- CVE-2018-1000879 (https://nvd.nist.gov/vuln/detail/CVE-2018-1000879)
"libarchive version commit
379867ecb330b3a952fb7bfa7bffb7bbd5547205onwards (release v3.3.0 onwards) contains a CWE-476: NULL Pointer Dereference vulnerability in ACL parser -libarchive/archive_acl.c,archive_acl_from_text_l()that can result in Crash/DoS. This attack appear to be exploitable via the victim must open a specially crafted archive file."- CVE-2018-1000880 (https://nvd.nist.gov/vuln/detail/CVE-2018-1000880)
"libarchive version commit
9693801580c0cf7c70e862d305270a16b52826a7onwards (release v3.2.0 onwards) contains a CWE-20: Improper Input Validation vulnerability in WARC parser -libarchive/archive_read_support_format_warc.c,_warc_read()that can result in DoS - quasi-infinite run time and disk usage from tiny file. This attack appear to be exploitable via the victim must open a specially crafted WARC file."
Quoted 1 line
Signed-off-by Thomas De Schampheleire <[email protected]>
Committed to 2018.02.x and 2018.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard