Gentoo Logo

chmlib, KchmViewer: Stack-based buffer overflow


1.  Gentoo Linux Security Advisory

Version Information

Advisory Reference GLSA 200511-23 / chmlib kchmviewer
Release Date November 28, 2005
Latest Revision May 28, 2009: 03
Impact normal
Exploitable remote
Package Vulnerable versions Unaffected versions Architecture(s)
dev-libs/chmlib < 0.37.4 >= 0.37.4 All supported architectures
app-text/kchmviewer < 1.1 >= 1.1 All supported architectures

Related bugreports: #110557


chmlib and KchmViewer contain a buffer overflow vulnerability which may lead to the execution of arbitrary code.

2.  Impact Information


chmlib is a library for dealing with Microsoft ITSS and CHM format files. KchmViewer is a CHM viewer that includes its own copy of the chmlib library.


Sven Tantau reported about a buffer overflow vulnerability in chmlib. The function "_chm_decompress_block()" does not properly perform boundary checking, resulting in a stack-based buffer overflow.


By convincing a user to open a specially crafted ITSS or CHM file, using KchmViewer or a program makes use of chmlib, a remote attacker could execute arbitrary code with the privileges of the user running the software.

3.  Resolution Information


There is no known workaround at this time.


All chmlib users should upgrade to the latest version:

Code Listing 3.1: Resolution

# emerge --sync
# emerge --ask --oneshot --verbose ">=dev-libs/chmlib-0.37.4"

All KchmViewer users should upgrade to the latest version:

Code Listing 3.2: Resolution

# emerge --sync
# emerge --ask --oneshot --verbose ">=app-text/kchmviewer-1.1"

4.  References


Page updated November 28, 2005

Summary: This is a Gentoo Linux Security Advisory

Security Team
Contact Address

Donate to support our development efforts.

Copyright 2001-2015 Gentoo Foundation, Inc. Questions, Comments? Contact us.