Bug 1174057 (CVE-2014-8108)

Summary: CVE-2014-8108 subversion: NULL pointer dereference flaw in mod_dav_svn when handling URIs for virtual transaction names
Product: [Other] Security Response Reporter: Murray McAllister <mmcallis>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: jorton, jrusnack, magoldma, security-response-team, sisharma
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=moderate,public=20141215,reported=20141212,source=upstream,cvss2=4.3/AV:N/AC:M/Au:N/C:N/I:N/A:P,rhel-5/subversion=notaffected,rhel-6/subversion=notaffected,rhel-7/subversion=affected,fedora-all/subversion=affected,cwe=CWE-476
Fixed In Version: subversion 1.7.19, subversion 1.8.11 Doc Type: Bug Fix
Doc Text:
A NULL pointer dereference flaw was found in the way the mod_dav_svn module handled certain requests for URIs that trigger a lookup of a virtual transaction name. A remote, unauthenticated attacker could send a request for a virtual transaction name that does not exist, causing mod_dav_svn to crash.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-11 05:09:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 1174521, 1180624, 1180625    
Bug Blocks: 1174061    
Attachments:
Description Flags
1.7.18 patch from upstream
none
1.8.10 patch from upstream none

Description Murray McAllister 2014-12-15 02:46:01 UTC
A NULL pointer dereference flaw was found in the way mod_dav_svn handled URIs for virtual transaction names. A remote, unauthenticated attacker could send a request for a virtual transaction name that does not exist, causing mod_dav_svn to crash.

Versions 1.7.0 up to and including 1.7.18, and 1.8.0 up to and including 1.8.10, are affected.

This issue will be fixed in versions 1.7.19 and 1.8.11.

Acknowledgements:

Red Hat would like to thank the Subversion project for reporting this issue. Upstream acknowledges Evgeny Kotkov of VisualSVN as the original reporter.

Comment 2 Murray McAllister 2014-12-15 02:50:27 UTC
Created attachment 968772 [details]
1.7.18 patch from upstream

Comment 3 Murray McAllister 2014-12-15 02:50:47 UTC
Created attachment 968773 [details]
1.8.10 patch from upstream

Comment 4 Murray McAllister 2014-12-16 00:57:03 UTC
External References:

http://subversion.apache.org/security/CVE-2014-8108-advisory.txt

Comment 5 Murray McAllister 2014-12-16 01:04:26 UTC
Created subversion tracking bugs for this issue:

Affects: fedora-all [bug 1174521]

Comment 7 Fedora Update System 2015-01-05 07:39:09 UTC
subversion-1.8.11-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2015-01-05 07:40:05 UTC
subversion-1.8.11-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Siddharth Sharma 2015-01-09 11:03:13 UTC
Analysis
========

In functions parse_vtxnstub_uri(), parse_vtxnroot_uri(), prep_working() there are missing sanity checks whether virtual transaction names are legitimate or not, If the Virtual Transaction name is not set or is NULL will cause crash due to NULL pointer dereference.

In function static int
parse_vtxnstub_uri(dav_resource_combined *comb,
                   const char *path,
                   const char *label,
                   int use_checked_in)
{

when txt_name is not set or is NULL and following line would cause crash 
 
comb->priv.root.vtxn_name = comb->priv.root.txn_name;

same sanity check is missing at various other places in the code

Comment 16 Vincent Danen 2015-02-10 19:06:14 UTC
Statement:

This issue did not affect the versions of subversion as shipped with Red Hat Enterprise Linux 5 and 6.

Comment 17 errata-xmlrpc 2015-02-10 23:11:44 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2015:0166 https://rhn.redhat.com/errata/RHSA-2015-0166.html