Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 91737 - net-www/apache HTDigest Realm Command Line Argument Buffer Overflow Vulnerability (CAN-2005-1344)
Summary: net-www/apache HTDigest Realm Command Line Argument Buffer Overflow Vulnerabi...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Security
URL: http://www.securityfocus.com/bid/1353...
Whiteboard: B2? [stable] jaervosz
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-06 13:51 UTC by Adir Abraham
Modified: 2005-08-15 21:42 UTC (History)
2 users (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 Adir Abraham 2005-05-06 13:51:50 UTC
According to secunia:
A buffer overflow vulnerability exists in the htdigest utility included with Apache. The vulnerability is due to improper bounds checking when copying user-supplied realm data into local buffers.

By supplying an overly long realm value to the command line options of htdigest, it is possible to trigger an overflow condition. This may cause memory to be corrupted with attacker-specified values.

This issue could be exploited by a remote attacker; potentially resulting in the execution of arbitrary system commands within the context of the web server process.

Solution: USN-120-1

Reproducible: Always
Steps to Reproduce:
Comment 1 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-05-06 14:47:54 UTC
Apache please advise
Comment 2 Paul Querna 2005-05-06 14:54:07 UTC
"This issue could be exploited by a remote attacker; potentially resulting in the execution of arbitrary system commands within the context of the web server process."

That is extremely deceptive.  The issue was only in the command line program -- not something that is norammly exposed to the web -- you would have to write your own code to expose it.  Calling it a remote vulnerability isn't very truthful, IMHO.

Anyways, the issue is fixed in 2.0.54.
Comment 3 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-05-06 15:06:24 UTC
Thx for the info Paul.
Comment 4 Elfyn McBratney (beu) (RETIRED) gentoo-dev 2005-05-11 18:26:23 UTC
apache-2.0.54-r2 is in the tree to satisfy this this bug.  If this comes to a GLSA could it please be mentioned that -r2 and -r3 are old-style (stable) and new style (testing, aka 'apache refreshed' ebuilds), respectively - we have a feeling this bump may confuse users.  Anyway ..

Tested and marked stable on x86.  Arches, please test and mark apache-2.0.54-r2 stable.  Thanks !
Comment 5 Markus Rothe (RETIRED) gentoo-dev 2005-05-11 23:42:25 UTC
-r2 stable on ppc64
Comment 6 Jonas Fietz 2005-05-12 06:14:59 UTC
2.0.54-r2 blocks mod_php 

Msg:

emerge -Duav world

[blocks B     ] >=net-www/apache-2.0.52-r3 (is blocking dev-php/mod_php-4.3.11)
Comment 7 Olivier Crete (RETIRED) gentoo-dev 2005-05-12 06:25:50 UTC
it also blocks the latest x86 subversion
Comment 8 Lars Weiler (RETIRED) gentoo-dev 2005-05-12 06:49:45 UTC
Oops, it's -r2 is now stable on ppc.  Didn't reloaded the bug.  But mod_php does not have dependency problems on ppc.
Comment 9 Jason Wever (RETIRED) gentoo-dev 2005-05-12 08:39:29 UTC
Note that /usr/sbin/apache2splitlogfile no longer gets installed with executable permissions, which appeared to cause me some usability problems until I adjusted it by hand.
Comment 10 Bryan Østergaard (RETIRED) gentoo-dev 2005-05-12 09:36:32 UTC
Besides the apache2splitlogfile issue there's also problems with a mod_php blocker. Please hold off stabling apache until I have new fixed ebuilds in the tree.
Comment 11 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-05-12 09:43:42 UTC
Back to ebuild status to get this sorted out.
Comment 12 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2005-05-12 13:06:47 UTC
Stable on hppa.
Comment 13 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2005-05-12 13:13:38 UTC
Unstable again.
Comment 14 Elfyn McBratney (beu) (RETIRED) gentoo-dev 2005-05-12 13:34:49 UTC
-r4 and -r5 are in the tree, same game as above (-r4 is the old-style, to be marked stable, -r5 is the new-style 'apache refresh' ebuild, to be left alone !).  Apologies for all the mess, I'll be handing out free-beer-if-your-ever-in-the-uk IOUs in #-dev shortly. :)

Thoroughly tested, and marked stable on x86.  Arches, please test and mark apache-2.0.54-r4 stable (remember to kick beu on your way out).  Thanks !
Comment 15 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-05-12 13:42:04 UTC
Thx Elfyn. Btw did you see beu anywhere? ;-)
Comment 16 Bryan Østergaard (RETIRED) gentoo-dev 2005-05-12 15:20:55 UTC
Stable on alpha.
Comment 17 Bryan Østergaard (RETIRED) gentoo-dev 2005-05-12 15:50:09 UTC
Stable on ia64.
Comment 18 Lars Weiler (RETIRED) gentoo-dev 2005-05-12 17:13:32 UTC
Stable on ppc (again).
Comment 19 Markus Rothe (RETIRED) gentoo-dev 2005-05-12 23:04:08 UTC
-r4 stable on ppc64
Comment 20 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2005-05-12 23:44:27 UTC
GMsoft has marked it already stable.
Comment 21 Thierry Carrez (RETIRED) gentoo-dev 2005-05-13 01:34:31 UTC
Not sure this should be considered a bug. We had several like this one before that we discarded, including in htpasswd. I don't see an obvious path for a remote attacker (it's not like if htdigest was commonly called in web applications) and untrusted input should always be filtered before being used in a command line...

So I would discard this one as INVALID, even if it's a bug needing a fix.
Comment 22 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-05-13 01:50:10 UTC
Upstream agrees -> Closing as INVALID.

Sorry for the spam:-(