Bugzilla – Bug 962528
VUL-0: CVE-2016-1925: lha: Buffer Overflow while parsing level0 and level1 headers
Last modified: 2016-07-28 18:09:47 UTC
CVE-2016-1925 From: Paris Zoumpouloglou == Overview == LHA for UNIX (https://osdn.jp/projects/lha/) is an open source implementation of the LHA compression utility and associated file format. == Version == All tests were performed using the latest 20b6ba8 commit of the master branch from https://osdn.jp/projects/lha/scm/git/lha/ == Details == Using the afl fuzzer, two cases which triggered a buffer overflow where discovered. The problem existed in header.c:797-800 and header.c:913-916 while parsing level0 and level1 headers accordingly. =797-800= hdr->header_size = header_size = get_byte(); checksum = get_byte(); if (fread(data + COMMON_HEADER_SIZE, header_size + 2 - COMMON_HEADER_SIZE, 1, fp) == 0) { error("Invalid header (LHarc file ?)"); return FALSE; /* finish */ } =913-916= hdr->header_size = header_size = get_byte(); checksum = get_byte(); if (fread(data + COMMON_HEADER_SIZE, header_size + 2 - COMMON_HEADER_SIZE, 1, fp) == 0) { error("Invalid header (LHarc file ?)"); return FALSE; /* finish */ } The header_size variable is determined from the first byte of the lha archive header, which is read by the get_byte function. The returned value is used in: header_size + 2 - COMMON_HEADER_SIZE to determine the elements' size used in fread() . If the header_size is less than abs(2 - COMMON_HEADER_SIZE) = abs(2 - 21) = 19 then the size parameter is overflowed and a buffer overflow occurs in fread. == Timeline == 2016-01-13 - Bug report submitted 2016-01-16 - Bug fix pushed to master (commit bf2471f) SLE 11 (SP1 TD, SP3, SP3 TD, SP4) affected References: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-1925 http://seclists.org/oss-sec/2016/q1/132
bugbot adjusting priority
SUSE-SU-2016:1904-1: An update that fixes one vulnerability is now available. Category: security (moderate) Bug References: 962528 CVE References: CVE-2016-1925 Sources used: SUSE Linux Enterprise Server 11-SP4 (src): lha-1.14.0.894-3.1 SUSE Linux Enterprise Debuginfo 11-SP4 (src): lha-1.14.0.894-3.1