Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 543482 - <app-text/catdoc-0.95: multiple DoS
Summary: <app-text/catdoc-0.95: multiple DoS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Gentoo Security
URL: http://www.openwall.com/lists/oss-sec...
Whiteboard: B3 [noglsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-16 08:15 UTC by Agostino Sarubbo
Modified: 2018-02-23 19:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2015-03-16 08:15:26 UTC
From ${URL} :

"catdoc" is a command line tool for extracting readable text from
Microsoft office documents.  It is used by the command "less" when
opening a .doc file, and if it's not installed, less will ask you to
install it.  It's also listed as a forensics tool on certain websites.
Catdoc has bugs.

The attached* word documents were generated with American Fuzzy Lop.
The first attached tarball contains 35 somewhat analyzed sample
crashes.  I've also included the raw crash samples with 27 additional
crashes that were generated between the initial disclosure time and
right now.  AFL identified them as unique issues (presumably different
code paths) though the offending code seems to be in the following
places:

substmap.c:151 (crash)
numutils.c:22 (some crash, some trigger ASAN)
ole.c:108 (ASAN)
ole.c:315 (ASAN)

The ASAN crashes indicate memory corruptions, but there are some solid
segfaults in substmap.c and numultils.c.  The crashes seem to be read
violations, so non-trivial to exploit, and since DoS and memory
disclosures aren't super interesting for document parers, it's
unlikely that any of these deserve a CVE.

There are likely more bugs, and catdoc also includes a ppt parser and
an xls parser.

* The attachments were too big (>200k), so I made this website instead
: https://catdocbugs.neocities.org/



@maintainer(s): after the bump, in case we need to stabilize the package, please let us know if it is ready for the stabilization or not.
Comment 1 Christopher Díaz Riveros (RETIRED) gentoo-dev Security 2017-07-06 18:36:35 UTC
From 

http://www.wagner.pp.ru/gitweb/?p=oss/catdoc.git;a=log;h=refs/tags/REL_0_95

seems like the author has made some bug fixes, but they are not documented, maybe the bugs are already fixed.

References:

http://www.wagner.pp.ru/gitweb/?p=oss/catdoc.git;a=summary
http://www.wagner.pp.ru/~vitus/software/catdoc/
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2018-02-23 19:30:16 UTC
All files from https://catdocbugs.neocities.org/catdoc-crashes.tar.bz2 can be processed with catdoc-0.95 without any crashes:

> $ find . -name '*.doc' -exec catdoc "{}" >/dev/null \;
> Broken OLE file. Try using -b switch
> Broken OLE structure. Cannot find root entry in this file!
> Broken OLE file. Try using -b switch
> Broken OLE file. Try using -b switch
> Broken OLE structure. Cannot find root entry in this file!
> Broken OLE file. Try using -b switch
> Broken OLE structure. Cannot find root entry in this file!
> Broken OLE file. Try using -b switch
> [File is encrypted. Encryption key = 00000000]
> Broken OLE structure. Cannot find root entry in this file!
> Broken OLE file. Try using -b switch
> Broken OLE file. Try using -b switch
> Broken OLE structure. Cannot find root entry in this file!
> Broken OLE file. Try using -b switch
> Broken OLE file. Try using -b switch
> Broken OLE file. Try using -b switch
> Broken OLE structure. Cannot find root entry in this file!
> Broken OLE file. Try using -b switch
> Broken OLE structure. Cannot find root entry in this file!
> Broken OLE file. Try using -b switch
> Broken OLE structure. Cannot find root entry in this file!
> Broken OLE file. Try using -b switch
Whereas catdoc-0.94 showed the reported crashes:
> $ find . -name '*.doc' -exec catdoc "{}" >/dev/null \;
> find: ‘catdoc’ terminated by signal 11
> find: ‘catdoc’ terminated by signal 11
> find: ‘catdoc’ terminated by signal 11
> find: ‘catdoc’ terminated by signal 9
> double free or corruption (out)
> find: ‘catdoc’ terminated by signal 6
> catdoc: malloc.c:2406: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
> find: ‘catdoc’ terminated by signal 6
> catdoc: malloc.c:2406: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
> find: ‘catdoc’ terminated by signal 6
> [File is encrypted. Encryption key = 00000000]
> find: ‘catdoc’ terminated by signal 11
> find: ‘catdoc’ terminated by signal 11
> munmap_chunk(): invalid pointer
> find: ‘catdoc’ terminated by signal 6
> find: ‘catdoc’ terminated by signal 11
> find: ‘catdoc’ terminated by signal 9
> catdoc: malloc.c:2406: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
> find: ‘catdoc’ terminated by signal 6
> ^C
> 

GLSA vote: No!

All done, repository is clean.