libmspack is vulnerable to buffer overflow. The function chmd_read_headers
in ibmspack/mspack/chmd.c
does not handle the CHM file name properly, allowing an attacker to read past the allocated buffer if a malicious file starting with ::
and length shorter than 33 bytes is provided.
github.com/kyz/libmspack/commit/2f084136cfe0d05e5bf5703f3e83c6d955234b4d
github.com/kyz/libmspack/issues/27
lists.debian.org/debian-lts-announce/2019/08/msg00028.html
lists.debian.org/debian-lts-announce/2021/10/msg00033.html
lists.fedoraproject.org/archives/list/[email protected]/message/IXWNEY4CJBLPRKV6LG7FQUPD6WVZYBTB/
lists.fedoraproject.org/archives/list/[email protected]/message/S2QJTUAGP22YY7453MHGTFN4YQE5HJBR/
usn.ubuntu.com/4066-1/
usn.ubuntu.com/4066-2/