Unrated severityNVD Advisory· Published Jul 28, 2018· Updated Aug 5, 2024
CVE-2018-14679
CVE-2018-14679
Description
An issue was discovered in mspack/chmd.c in libmspack before 0.7alpha. There is an off-by-one error in the CHM PMGI/PMGL chunk number validity checks, which could lead to denial of service (uninitialized data dereference and application crash).
Affected products
50- osv-coords50 versionspkg:rpm/opensuse/clamav&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/clamav&distro=openSUSE%20Tumbleweedpkg:rpm/opensuse/libmspack&distro=openSUSE%20Leap%2015.2pkg:rpm/opensuse/libmspack&distro=openSUSE%20Leap%2015.3pkg:rpm/suse/clamav&distro=HPE%20Helion%20OpenStack%208pkg:rpm/suse/clamav&distro=SUSE%20Enterprise%20Storage%204pkg:rpm/suse/clamav&distro=SUSE%20Enterprise%20Storage%207.1pkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Desktop%2012%20SP3pkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSSpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-ESPOSpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-LTSSpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP5-ESPOSpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP5-LTSSpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Micro%205.5pkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP6pkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Point%20of%20Sale%2011%20SP3pkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%2011%20SP4-LTSSpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP1-LTSSpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCLpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-LTSSpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3pkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-BCLpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-LTSSpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4-LTSSpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5pkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5-LTSSpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%2012-LTSSpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSSpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP4-LTSSpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP5-LTSSpkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP1pkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP2pkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP3pkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP4pkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5pkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3pkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP4pkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP5pkg:rpm/suse/clamav&distro=SUSE%20Linux%20Enterprise%20Server%20LTSS%20Extended%20Security%2012%20SP5pkg:rpm/suse/clamav&distro=SUSE%20Manager%20Proxy%204.3pkg:rpm/suse/clamav&distro=SUSE%20Manager%20Server%204.3pkg:rpm/suse/clamav&distro=SUSE%20OpenStack%20Cloud%207pkg:rpm/suse/clamav&distro=SUSE%20OpenStack%20Cloud%208pkg:rpm/suse/clamav&distro=SUSE%20OpenStack%20Cloud%209pkg:rpm/suse/clamav&distro=SUSE%20OpenStack%20Cloud%20Crowbar%208pkg:rpm/suse/clamav&distro=SUSE%20OpenStack%20Cloud%20Crowbar%209pkg:rpm/suse/clamav-openssl1&distro=SUSE%20Linux%20Enterprise%20Server%2011-SECURITYpkg:rpm/suse/libmspack&distro=SUSE%20Linux%20Enterprise%20Micro%205.0pkg:rpm/suse/libmspack&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP2pkg:rpm/suse/libmspack&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP3
< 1.4.2-150600.18.6.1+ 49 more
- (no CPE)range: < 1.4.2-150600.18.6.1
- (no CPE)range: < 1.4.2-1.1
- (no CPE)range: < 0.6-lp152.6.3.1
- (no CPE)range: < 0.6-3.11.1
- (no CPE)range: < 0.103.4-33.41.1
- (no CPE)range: < 0.100.1-33.15.2
- (no CPE)range: < 1.4.2-150200.8.3.1
- (no CPE)range: < 0.100.1-33.15.2
- (no CPE)range: < 1.4.2-150200.8.3.1
- (no CPE)range: < 1.4.2-150200.8.3.1
- (no CPE)range: < 1.4.2-150200.8.3.1
- (no CPE)range: < 1.4.2-150200.8.3.1
- (no CPE)range: < 1.4.2-150200.8.3.1
- (no CPE)range: < 1.4.2-150200.8.3.1
- (no CPE)range: < 1.4.2-150600.18.6.1
- (no CPE)range: < 0.103.4-0.20.41.1
- (no CPE)range: < 0.103.4-0.20.41.1
- (no CPE)range: < 0.100.1-33.15.2
- (no CPE)range: < 0.100.1-33.15.2
- (no CPE)range: < 0.100.1-33.15.2
- (no CPE)range: < 0.100.1-33.15.2
- (no CPE)range: < 0.103.4-33.41.1
- (no CPE)range: < 0.103.4-33.41.1
- (no CPE)range: < 0.103.4-33.41.1
- (no CPE)range: < 0.103.4-3.12.1
- (no CPE)range: < 1.4.2-3.36.1
- (no CPE)range: < 0.100.1-33.15.2
- (no CPE)range: < 1.4.2-150200.8.3.1
- (no CPE)range: < 1.4.2-150200.8.3.1
- (no CPE)range: < 1.4.2-150200.8.3.1
- (no CPE)range: < 0.100.1-33.15.2
- (no CPE)range: < 0.100.1-33.15.2
- (no CPE)range: < 0.100.1-33.15.2
- (no CPE)range: < 0.103.4-33.41.1
- (no CPE)range: < 0.103.4-3.12.1
- (no CPE)range: < 1.4.2-150200.8.3.1
- (no CPE)range: < 1.4.2-150200.8.3.1
- (no CPE)range: < 1.4.2-150200.8.3.1
- (no CPE)range: < 1.4.2-3.36.1
- (no CPE)range: < 1.4.2-150200.8.3.1
- (no CPE)range: < 1.4.2-150200.8.3.1
- (no CPE)range: < 0.100.1-33.15.2
- (no CPE)range: < 0.103.4-33.41.1
- (no CPE)range: < 0.103.4-33.41.1
- (no CPE)range: < 0.103.4-33.41.1
- (no CPE)range: < 0.103.4-33.41.1
- (no CPE)range: < 0.103.4-0.20.41.1
- (no CPE)range: < 0.6-3.11.1
- (no CPE)range: < 0.6-3.11.1
- (no CPE)range: < 0.6-3.11.1
Patches
172e70a921f0fFix off-by-one bounds check on CHM PMGI/PMGL chunk numbers and
2 files changed · +16 −3
libmspack/ChangeLog+10 −0 modified@@ -1,3 +1,13 @@ +2018-04-26 Stuart Caie <[email protected]> + + * read_chunk(): the test that chunk numbers are in bounds was off + by one, so read_chunk() returned a pointer taken from outside + allocated memory that usually crashes libmspack when accessed. + Thanks to Hanno Böck for finding the issue and providing a sample. + + * chmd_read_headers(): reject files with blank filenames. Thanks + again to Hanno Böck for finding the issue and providing a sample file. + 2018-02-06 Stuart Caie <[email protected]> * chmd.c: fixed an off-by-one error in the TOLOWER() macro, reported
libmspack/mspack/chmd.c+6 −3 modified@@ -1,5 +1,5 @@ /* This file is part of libmspack. - * (C) 2003-2011 Stuart Caie. + * (C) 2003-2018 Stuart Caie. * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 @@ -397,7 +397,7 @@ static int chmd_read_headers(struct mspack_system *sys, struct mspack_file *fh, D(("first pmgl chunk is after last pmgl chunk")) return MSPACK_ERR_DATAFORMAT; } - if (chm->index_root != 0xFFFFFFFF && chm->index_root > chm->num_chunks) { + if (chm->index_root != 0xFFFFFFFF && chm->index_root >= chm->num_chunks) { D(("index_root outside valid range")) return MSPACK_ERR_DATAFORMAT; } @@ -447,7 +447,10 @@ static int chmd_read_headers(struct mspack_system *sys, struct mspack_file *fh, while (num_entries--) { READ_ENCINT(name_len); if (name_len > (unsigned int) (end - p)) goto chunk_end; + /* consider blank filenames to be an error */ + if (name_len == 0) goto chunk_end; name = p; p += name_len; + READ_ENCINT(section); READ_ENCINT(offset); READ_ENCINT(length); @@ -622,7 +625,7 @@ static unsigned char *read_chunk(struct mschm_decompressor_p *self, unsigned char *buf; /* check arguments - most are already checked by chmd_fast_find */ - if (chunk_num > chm->num_chunks) return NULL; + if (chunk_num >= chm->num_chunks) return NULL; /* ensure chunk cache is available */ if (!chm->chunk_cache) {
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
13- access.redhat.com/errata/RHSA-2018:3327mitrevendor-advisoryx_refsource_REDHAT
- access.redhat.com/errata/RHSA-2018:3505mitrevendor-advisoryx_refsource_REDHAT
- security.gentoo.org/glsa/201903-20mitrevendor-advisoryx_refsource_GENTOO
- usn.ubuntu.com/3728-1/mitrevendor-advisoryx_refsource_UBUNTU
- usn.ubuntu.com/3728-2/mitrevendor-advisoryx_refsource_UBUNTU
- usn.ubuntu.com/3728-3/mitrevendor-advisoryx_refsource_UBUNTU
- usn.ubuntu.com/3789-2/mitrevendor-advisoryx_refsource_UBUNTU
- www.debian.org/security/2018/dsa-4260mitrevendor-advisoryx_refsource_DEBIAN
- www.openwall.com/lists/oss-security/2018/07/26/1mitrex_refsource_MISC
- www.securitytracker.com/id/1041410mitrevdb-entryx_refsource_SECTRACK
- bugs.debian.org/904802mitrex_refsource_MISC
- github.com/kyz/libmspack/commit/72e70a921f0f07fee748aec2274b30784e1d312amitrex_refsource_MISC
- lists.debian.org/debian-lts-announce/2018/08/msg00007.htmlmitremailing-listx_refsource_MLIST
News mentions
0No linked articles in our index yet.