Protect yourself against future threats.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 =========================================================================== AUSCERT External Security Bulletin Redistribution ESB-2014.0222 A vulnerability has been identified in Apache Subversion 21 February 2014 =========================================================================== AusCERT Security Bulletin Summary --------------------------------- Product: Subversion Publisher: The Apache Software Foundation Operating System: UNIX variants (UNIX, Linux, OSX) Windows Impact/Access: Denial of Service -- Remote/Unauthenticated Resolution: Patch/Upgrade CVE Names: CVE-2014-0032 Original Bulletin: http://subversion.apache.org/security/CVE-2014-0032-advisory.txt - --------------------------BEGIN INCLUDED TEXT-------------------- mod_dav_svn is vunerable to a remotely triggerable segfault DoS vulnerability when SVNListParentPath is on. Summary: ======== Subversion's mod_dav_svn Apache HTTPD server module will crash when it receives an OPTIONS request against the server root and Subversion is configured to handle the server root and SVNListParentPath is on. This can lead to a DoS. There are no known instances of this problem being exploited in the wild, but the details of how to exploit it have been disclosed on the Subversion development mailing list. Known vulnerable: ================= Subversion HTTPD servers 1.3.0 through 1.7.14 (inclusive) Subversion HTTPD servers 1.8.0 through 1.8.5 (inclusive) Known fixed: ============ Subversion 1.7.15 (not publicly released) Subversion 1.7.16 Subversion 1.8.6-1.8.7 (not publicly released) Subversion 1.8.8 svnserve (any version) is not vulnerable Details: ======== When Subversion is configured on the root path of the server and the SVNListParentPath directive is set to on then the following commands will trigger a segfault: svn list http://svn.example.com/ svn lock http://svn.example.com/ This occurs because when mod_dav_svn attempts to calculate the parent path of the request is ends up setting a NULL pointer (since there can be no parent of the server root URI), which is later assumed to be valid memory. When Subversion is configured on any Location other than "/" (e.g. "/svn") then the problem does not occur since the parent of the path can be calculated and stored in memory. Severity: ========= CVSSv2 Base Score: 4.3 CVSSv2 Base Vector: AV:N/AC:M/Au:N/C:N/I:N/A:P We consider this to be a medium risk vulnerability. Repositories which allow for anonymous reads will be vulnerable without authentication. However, we believe the required configuration is relatively rare. Most systems are not hosting Subversion on the root path of the server and only a small number of those have the SVNListParentPath configuration on. A remote attacker may be able to crash a Subversion server. Many Apache servers will respawn the listener processes, but a determined attacker will be able to crash these processes as they appear, denying service to legitimate users. Servers using threaded MPMs will close the connection on other clients being served by the same process that services the OPTIONS request from the attacker. In either case there is an increased processing impact of restarting a process and the cost of per process caches being lost. Recommendations: ================ We recommend all users to upgrade to Subversion 1.8.8. Users of Subversion 1.7.x or 1.8.x who are unable to upgrade may apply the included patch. New Subversion packages can be found at: http://subversion.apache.org/packages.html Administrators that wish to protect against this without patching immediately can apply the following configuration to their httpd.conf file: [[[ <LocationMatch ^/$> <LimitExcept GET> Order Deny,Allow Deny from all </LimitExcept> </LocationMatch> ]]] CAUTION: The above configuration should only be used when Subversion is enabled on the root location in a parent path configuration. For example the following is the minimal configuration that matches this case: [[ <Location /> DAV svn SVNParentPath /var/svn </Location> ]] In this case it will not block any useful requests and can be used without concern that it will break anything. If Subversion is running on any other path or is not being used in a parent path configuration this configuration should not be applied as these configurations are not vulnerable and it can break functionality of Subversion or other applications being served from the same httpd. References: =========== CVE-2014-0032 (Subversion) Report on dev mailing list: https://mail-archives.apache.org/mod_mbox/subversion-dev/201401.mbox/%3CCANvU9scLHr2yOLABW8q6_wNzhEf7pWM%3DNiavGcobqvUuyhKyAA%40mail.gmail.com%3E Reported by: ============ Lieven Govaerts <lgo{_AT_}apache.org> Patches: ======== Patch against 1.7.14: [[[ Index: subversion/mod_dav_svn/repos.c =================================================================== - --- subversion/mod_dav_svn/repos.c (revision 1558691) +++ subversion/mod_dav_svn/repos.c (revision 1558692) @@ -1959,6 +1959,25 @@ of private resource, iff the SVNListParentPath directive is 'on'. */ if (dav_svn__is_parentpath_list(r)) { + /* Only allow GET and HEAD on the parentpath resource + * httpd uses the same method_number for HEAD as GET */ + if (r->method_number != M_GET) + { + int status; + + /* Marshall the error back to the client by generating by + * way of the dav_svn__error_response_tag trick. */ + err = dav_svn__new_error(r->pool, HTTP_METHOD_NOT_ALLOWED, + SVN_ERR_APMOD_MALFORMED_URI, + "The URI does not contain the name " + "of a repository."); + /* can't use r->allowed since the default handler isn't called */ + apr_table_setn(r->headers_out, "Allow", "GET,HEAD"); + status = dav_svn__error_response_tag(r, err); + + return dav_push_error(r->pool, status, err->error_id, NULL, err); + } + err = get_parentpath_resource(r, resource); if (err) return err; ]]] Patch against 1.8.5: [[[ Index: subversion/mod_dav_svn/repos.c =================================================================== - --- subversion/mod_dav_svn/repos.c (revision 1558291) +++ subversion/mod_dav_svn/repos.c (revision 1558292) @@ -1971,6 +1971,25 @@ of private resource, iff the SVNListParentPath directive is 'on'. */ if (dav_svn__is_parentpath_list(r)) { + /* Only allow GET and HEAD on the parentpath resource + * httpd uses the same method_number for HEAD as GET */ + if (r->method_number != M_GET) + { + int status; + + /* Marshall the error back to the client by generating by + * way of the dav_svn__error_response_tag trick. */ + err = dav_svn__new_error(r->pool, HTTP_METHOD_NOT_ALLOWED, + SVN_ERR_APMOD_MALFORMED_URI, + "The URI does not contain the name " + "of a repository."); + /* can't use r->allowed since the default handler isn't called */ + apr_table_setn(r->headers_out, "Allow", "GET,HEAD"); + status = dav_svn__error_response_tag(r, err); + + return dav_push_error(r->pool, status, err->error_id, NULL, err); + } + err = get_parentpath_resource(r, resource); if (err) return err; ]]] - --------------------------END INCLUDED TEXT-------------------- You have received this e-mail bulletin as a result of your organisation's registration with AusCERT. The mailing list you are subscribed to is maintained within your organisation, so if you do not wish to continue receiving these bulletins you should contact your local IT manager. If you do not know who that is, please send an email to auscert@auscert.org.au and we will forward your request to the appropriate person. NOTE: Third Party Rights This security bulletin is provided as a service to AusCERT's members. As AusCERT did not write the document quoted above, AusCERT has had no control over its content. The decision to follow or act on information or advice contained in this security bulletin is the responsibility of each user or organisation, and should be considered in accordance with your organisation's site policies and procedures. AusCERT takes no responsibility for consequences which may arise from following or acting on information or advice contained in this security bulletin. NOTE: This is only the original release of the security bulletin. It may not be updated when updates to the original are made. If downloading at a later date, it is recommended that the bulletin is retrieved directly from the author's website to ensure that the information is still current. Contact information for the authors of the original document is included in the Security Bulletin above. If you have any questions or need further information, please contact them directly. Previous advisories and external security bulletins can be retrieved from: http://www.auscert.org.au/render.html?cid=1980 =========================================================================== Australian Computer Emergency Response Team The University of Queensland Brisbane Qld 4072 Internet Email: auscert@auscert.org.au Facsimile: (07) 3365 7031 Telephone: (07) 3365 4417 (International: +61 7 3365 4417) AusCERT personnel answer during Queensland business hours which are GMT+10:00 (AEST). On call after hours for member emergencies only. =========================================================================== -----BEGIN PGP SIGNATURE----- Comment: http://www.auscert.org.au/render.html?it=1967 iQIVAwUBUwaophLndAQH1ShLAQLAFRAArOpiMgBMTJ4N7IqJrbpMMSHE6hjie1++ U0kWLOAaVa2dyqqCvu96jsqHiawDLBLsHfUILd+jcDjLQ+S8hoN8qsp67KUHGSqc aBLGech/ZfecXGR8z7y0RLsRbD0XXYK/0y5XMcjOoTnDZreFEVWH/aD2Laxvrdqt C+EikD7Nr9oy49F/ubRqIeXEhuzDOPaI5TnDmACDHNMIuDks2dEbOlsR+dy5rqms VKRIEu/vBSh2AAs4YbVYzZbdnZ9SyGYzP1jfGE9qpX+ikRJ88elTKdBD87nSPWtn bDpDAEI28vnC6w4q22P8vz92CxHoHQEzCyNHbBZUzYMDtPAFYIVEMe6uQOnAY+JQ NeLk0LUudkjBx8gTX4qwzkj2lVY++gMDrYwmxmSmV4hv+LzqaKItf196qNj46cvZ UIkoVDrOAf7OnnXLa9AnQeNxMahaNxJ31N9TyK1JkDYgf0zzk5xzRTVTnP4LWge+ 83KpJgfGJjVgenDYDt8RdG5Mho8ibnrcqxdU6wlrL1lqBT9nViagsq9RdhFvX6yv YcqH7X2wzgusoOOLJ1MKaKokT23OFe2LiKiNs7P7AuYwcADiUBDavxhdyeDSKiYt A5mJwhmOteI9DofBGYN6WXM/Dyd7qFFLfL/6ue9sU+04FyOURowInA9d8Nvfl2En yWeKJ+DHz3g= =uZSg -----END PGP SIGNATURE-----