Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 219373 - Stabilize app-text/htmldoc-1.8.27-r3 (Was: app-text/htmldoc-1.8.27: crash due to missing boundary checking in render_contents())
Summary: Stabilize app-text/htmldoc-1.8.27-r3 (Was: app-text/htmldoc-1.8.27: crash due...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Keywording and Stabilization (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL: http://www.htmldoc.org/str.php?L183
Whiteboard:
Keywords: STABLEREQ
Depends on:
Blocks:
 
Reported: 2008-04-26 19:15 UTC by Marek Cruz
Modified: 2012-05-06 11:41 UTC (History)
2 users (show)

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


Attachments
render_contents() patch (render_contents.patch,378 bytes, patch)
2008-04-26 19:21 UTC, Marek Cruz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Cruz 2008-04-26 19:15:19 UTC
This is a typical bug with one liner patch =)

Reproducible: Always

Steps to Reproduce:
1. htmldoc -f my.pdf *.html
2.
3.

Actual Results:  
SEGFAULT

Expected Results:  
PDF should be created
Comment 1 Marek Cruz 2008-04-26 19:21:15 UTC
Created attachment 151059 [details, diff]
render_contents() patch
Comment 2 Pierre-Yves Rofes (RETIRED) gentoo-dev 2008-04-26 20:36:38 UTC
Thanks for your report, but have you tried contacting the upstream developers first? They should directly fix their code, so every distro benefits from the fix, instead of just patching the Gentoo version. 
Comment 3 Marek Cruz 2008-04-26 20:47:24 UTC
No, I haven't contacted the upstream developers, can you please try it?
Comment 4 Pierre-Yves Rofes (RETIRED) gentoo-dev 2008-04-26 20:56:30 UTC
Hmm, for using their bug report system you need to be registered :/
Carlo, as the maintainer, do you have an account by any chance?
Comment 5 Tomas Hoger 2008-05-26 16:03:09 UTC
Have you managed to succeed in your attempts to contact upstream?  Is there any minimal test case available that reproduces the issue?  Thanks!
Comment 6 Matthias Geerdsen (RETIRED) gentoo-dev 2008-06-17 12:17:47 UTC
So did anyone contact upstream yet? Carlo?

Marek, do you have a testcase for this?
Comment 7 Robert Buchholz (RETIRED) gentoo-dev 2008-07-18 02:50:42 UTC
It is my understanding that exploitation of this error would not allow 
execution of arbitrary code due to the fact the buffer is just read 
over its boundaries, but not accessed with a write operation.
Since we do not treat user-assisted DoS in user applications as security issues, I will reassign this bug to the maintainer.

Marek, could you please attach the file that caused the segfault, or mail it to security@g.o ?

Plus, I have contacted upstream.
Comment 8 Robert Buchholz (RETIRED) gentoo-dev 2008-07-18 15:25:58 UTC
upstream bug: http://www.htmldoc.org/str.php?L183
Comment 9 Marek Cruz 2008-07-22 08:40:00 UTC
This bug shell hit your eye, you don't really need any test case, nor patch from the author.

Function render_contents() doesn't check the number of headings, it naively tries to read an index out of bounds, then crashes.

With my patch, it checks the bounds before reading. Every programmer must recognize this is extremely obvious.

I couldn't believe my patch hasn't been accepted yet. Now, I cannot be more helpful, since I already deleted that ebook (testcase).
Comment 10 Robert Buchholz (RETIRED) gentoo-dev 2008-11-26 21:37:13 UTC
This bug has been resolved upstream, but not within Gentoo.

Upstream accepted the patch, it can be found in revision 1579 at http://svn.easysw.com/public/htmldoc/
Comment 11 Pacho Ramos gentoo-dev 2012-02-11 12:51:38 UTC
+*htmldoc-1.8.27-r3 (11 Feb 2012)
+
+  11 Feb 2012; Pacho Ramos <pacho@gentoo.org> +files/htmldoc-1.8.27-crash.patch,
+  +htmldoc-1.8.27-r3.ebuild:
+  Fix crash, bug #219373 by Marek Cruz.
+

Arches, please test and mark it stable
Comment 12 Aaron Bauman (RETIRED) gentoo-dev 2012-02-11 15:36:35 UTC
scanelf shows the following missing dependencies.

sys-libs/zlib-1.2.5-r2
x11-libs/libXpm-3.5.9
Comment 13 Maurizio Camisaschi (amd64 AT) 2012-02-12 00:14:45 UTC
(In reply to comment #12)
> scanelf shows the following missing dependencies.
> 
> sys-libs/zlib-1.2.5-r2
> x11-libs/libXpm-3.5.9

apart this amd64 is ok
Comment 14 Agostino Sarubbo gentoo-dev 2012-02-12 14:36:54 UTC
amd64 stable
Comment 15 Jeroen Roovers (RETIRED) gentoo-dev 2012-02-15 16:16:43 UTC
Stable for HPPA.
Comment 16 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-02-16 18:41:56 UTC
x86 stable
Comment 17 Tobias Klausmann (RETIRED) gentoo-dev 2012-02-17 21:18:55 UTC
Stable on alpha.
Comment 18 Raúl Porcel (RETIRED) gentoo-dev 2012-03-25 16:06:37 UTC
ia64/sparc stable
Comment 19 Brent Baude (RETIRED) gentoo-dev 2012-04-16 19:23:57 UTC
ppc done
Comment 20 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2012-05-06 11:40:56 UTC
+  06 May 2012; Kacper Kowalik <xarthisius@gentoo.org> -htmldoc-1.8.27-r2.ebuild,
+  htmldoc-1.8.27-r3.ebuild:
+  ppc64 stable wrt #219373, drop old