Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 53555 - dev-util/subversion <= 1.0.5 has Denial of Service and Heap Overflow issue via ra_svn (svn://, svn+ssh:// , svn+*://) access method
Summary: dev-util/subversion <= 1.0.5 has Denial of Service and Heap Overflow issue vi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Security
URL: http://www.contactor.se/~dast/svn/arc...
Whiteboard: B1[stable]
Keywords:
: 53587 54157 55507 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-06-10 11:22 UTC by Jani Averbach
Modified: 2011-10-30 22:39 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---
jaervosz: Assigned_To? (jaervosz)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jani Averbach 2004-06-10 11:22:48 UTC
---8<-- announce email --8<--
Details below:


Subversion versions up to and including 1.0.4 have a potential
Denial of Service and Heap Overflow issue related to the parsing of
strings in the 'svn://' family of access protocols.

This affects only sites running svnserve.  It does not affect
'http://' access -- repositories served only by Apache/mod_dav_svn
do not have this vulnerability.

Details:
========

The svn protocol sends strings as a length followed by the string.  The
parser would trust that the sender was providing an accurate length of
the string and would allocate sufficent memory to store the entire
string.  This would allow the sender of a string to Denial of Service
the other side by suggesting that the string is very large.
Additionally, if the size given is large enough it may cause the integer
holding the size to wrap, thus allocating less memory than the string
length and resulting in a heap overflow.

The parsing code with the flaw is shared by both the svnserve server and
clients using the svn://, svn+ssh:// and other tunneled svn+*://
methods.

Severity:
=========

Severity ranges from "Denial of Service" to, potentially, "Arbitrary
Code Execution", depending upon how skilled the attacker is and the
ABI specifics of your platform.

Since the error is in the parsing of the protocol, including the parsing
of authentication, the server vulnerabilities can be triggered without
read or write access to the repository.  So any svnserve process that an
attacker can connect to is vulnerable even if they do not have read or
write access.

The Denial of Service attack is reasonably easy to carry out, while
exploiting the heap overflow is more difficult.  There are no known
exploits in the wild at the time of this advisory.

Workarounds:
============

Disable svnserve and use DAV (http://) instead.

Recommendations:
================

We recommend all users upgrade to 1.0.5.

References:
===========

CAN-2004-0413: Subversion svn:// protocol string parsing error.

-- 8< --

Reproducible: Always
Steps to Reproduce:
Comment 1 solar (RETIRED) gentoo-dev 2004-06-10 12:23:47 UTC
Fixed in 1.0.4-r1 which is the same thing as 1.0.5
Comment 2 solar (RETIRED) gentoo-dev 2004-06-10 13:01:36 UTC
arch maintainers please do your thing.

subversion-1.0.4-r1.ebuild:KEYWORDS="~x86 ~sparc ~ppc ~amd64 ~alpha"

Comment 3 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-06-10 13:48:13 UTC
x86 amd64 : please mark stable.

GLSA already drafted and reviewed.
Comment 4 Jason Huebel (RETIRED) gentoo-dev 2004-06-10 15:07:56 UTC
amd64 stable
Comment 5 Daniel Black (RETIRED) gentoo-dev 2004-06-10 15:50:15 UTC
*** Bug 53587 has been marked as a duplicate of this bug. ***
Comment 6 Kurt Lieber (RETIRED) gentoo-dev 2004-06-10 16:16:36 UTC
glsa 200406-07
Comment 7 Bryan Østergaard (RETIRED) gentoo-dev 2004-06-10 16:20:58 UTC
Stable on alpha.
Comment 8 Jason Wever (RETIRED) gentoo-dev 2004-06-11 20:16:32 UTC
Stable on sparc.
Comment 9 Thierry Carrez (RETIRED) gentoo-dev 2004-06-17 05:13:27 UTC
*** Bug 54157 has been marked as a duplicate of this bug. ***
Comment 10 Thierry Carrez (RETIRED) gentoo-dev 2004-06-29 00:37:41 UTC
*** Bug 55507 has been marked as a duplicate of this bug. ***