exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

iDEFENSE Security Advisory 2005-10-28.t

iDEFENSE Security Advisory 2005-10-28.t
Posted Oct 30, 2005
Authored by iDefense Labs | Site idefense.com

iDEFENSE Security Advisory 10.28.05 - Remote exploitation of a stack overflow vulnerability in chmlib as included in various Linux distributions allows attackers to execute arbitrary code. The vulnerability specifically exists due to an unchecked memory copy while processing a CHM file. iDefense has confirmed the existence of this vulnerability in chmlib 0.35. It is suspected that all versions of chmlib are vulnerable.

tags | advisory, remote, overflow, arbitrary
systems | linux
advisories | CVE-2005-2930
SHA-256 | ee23933cc3bb210a5faf6c8bbce7befe90f8cf66107a4479fd2909a768c974cf

iDEFENSE Security Advisory 2005-10-28.t

Change Mirror Download
Multiple Vendor chmlib CHM File Handling Buffer Overflow Vulnerability

iDefense Security Advisory 10.28.05
www.idefense.com/application/poi/display?id=332&type=vulnerabilities
October 28, 2005

I. BACKGROUND

chmlib is a library for dealing with Microsoft ITSS/CHM format files.

II. DESCRIPTION

Remote exploitation of a stack overflow vulnerability in chmlib as
included in various Linux distributions allows attackers to execute
arbitrary code.

The vulnerability specifically exists due to an unchecked memory copy
while processing a CHM file. The vulnerability exists in the following
code, which is found in chm_lib.c:

static UChar *_chm_find_in_PMGL(UChar *page_buf,
UInt32
block_len,
const
char *objPath)
{
[...]
char buffer[CHM_MAX_PATHLEN+1];
/* figure out where to start and end */
cur = page_buf;
hremain = _CHM_PMGL_LEN;
if (! _unmarshal_pmgl_header(&cur, &hremain, &header))
return NULL;
end = page_buf + block_len - (header.free_space);

/* now, scan progressively */
while (cur < end)
{
/* grab the name */
temp = cur;
strLen = _chm_parse_cword(&cur);
if (! _chm_parse_UTF8(&cur, strLen, buffer))
return NULL;
[..]

_chm_parse_cword can be forced to return a value larger than
CHM_MAX_PATHLEN. This value is then used while copying user controlled
data into a CHM_MAX_PATHLEN sized stack buffer. This allows the attacker

full control over execution flow by overwriting the saved return address

on the stack.

III. ANALYSIS

Exploitation could allow attackers to execute arbitrary code with the
privileges of the user processing the CHM file. Remote exploitation can
be achieved by sending a malicious file in an e-mail message to the
target user.

IV. DETECTION

iDefense has confirmed the existence of this vulnerability in chmlib
0.35. It is suspected that all versions of chmlib are vulnerable.

The following vendors distribute susceptible chmlib packages within
their respective operating system distributions:

FreeBSD Project:
FreeBSD 5.4 and prior
Gentoo Foundation Inc.:
Gentoo Linux 1.1a, 1.2, 1.4, 2004.0, 2004.1 and 2004.2

V. WORKAROUND

Do not open CHM files sent from an untrusted source.

VI. VENDOR RESPONSE

chmlib-0.36 addresses this vulnerability and is available for download
at:

http://freshmeat.net/projects/chmlib/

VII. CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the
name CAN-2005-2930 to this issue. This is a candidate for inclusion in
the CVE list (http://cve.mitre.org), which standardizes names for
security problems.

VIII. DISCLOSURE TIMELINE

09/08/2005 Initial vendor notification
09/09/2005 Initial vendor response
10/28/2005 Public disclosure

IX. CREDIT

The discoverer of this vulnerability wishes to remain anonymous.

Get paid for vulnerability research
http://www.iDefense.com/poi/teams/vcp.jsp

Free tools, research and upcoming events
http://labs.iDefense.com

X. LEGAL NOTICES

Copyright (c) 2005 iDefense, Inc.

Permission is granted for the redistribution of this alert
electronically. It may not be edited in any way without the express
written consent of iDefense. If you wish to reprint the whole or any
part of this alert in any other medium other than electronically, please
email customerservice@iDefense.com for permission.

Disclaimer: The information in the advisory is believed to be accurate
at the time of publishing based on currently available information. Use
of the information constitutes acceptance for use in an AS IS condition.
There are no warranties with regard to this information. Neither the
author nor the publisher accepts any liability for any direct, indirect,
or consequential loss or damage arising from use of, or reliance on,
this information.

Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close