Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:Update
libarchive.26953
CVE-2018-1000877.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File CVE-2018-1000877.patch of Package libarchive.26953
From 021efa522ad729ff0f5806c4ce53e4a6cc1daa31 Mon Sep 17 00:00:00 2001 From: Daniel Axtens <dja@axtens.net> 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(+) Index: libarchive-3.3.3/libarchive/archive_read_support_format_rar.c =================================================================== --- libarchive-3.3.3.orig/libarchive/archive_read_support_format_rar.c +++ libarchive-3.3.3/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,
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor