From: William A. Rowe Jr Date: Thu, 27 Jun 2013 17:13:45 +0000 (+0000) Subject: mod_dav: When a PROPPATCH attempts to remove a non-existent dead X-Git-Tag: 2.2.25~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5257ad51d8dd8064577c16ea8fb87bac57a9790;p=thirdparty%2Fapache%2Fhttpd.git mod_dav: When a PROPPATCH attempts to remove a non-existent dead property on a resource for which there is no dead property in the same namespace httpd segfaults. PR: 52559 Backports: r1476642 Submitted by: Diego Santa Cruz Reviewed by: minfrin, wrowe, rjung git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1497455 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index b0e289db623..d8f3ce459f4 100644 --- a/CHANGES +++ b/CHANGES @@ -46,6 +46,11 @@ Changes with Apache 2.2.25 result in a 412 Precondition Failed. PR54610 [Timothy Wood ] + *) mod_dav: When a PROPPATCH attempts to remove a non-existent dead + property on a resource for which there is no dead property in the same + namespace httpd segfaults. PR 52559 [Diego Santa Cruz + ] + Changes with Apache 2.2.24 *) SECURITY: CVE-2012-3499 (cve.mitre.org) diff --git a/STATUS b/STATUS index 62ac7df8a0a..dc8a4ffbd73 100644 --- a/STATUS +++ b/STATUS @@ -96,15 +96,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_dav: When a PROPPATCH attempts to remove a non-existent dead - property on a resource for which there is no dead property in the same - namespace httpd segfaults. PR 52559 - [Diego Santa Cruz ] - trunk patch: http://svn.apache.org/r1476642 - 2.4.x patch: http://svn.apache.org/r1486458 - 2.2.x patch: trunk patch works (minus CHANGES) - +1: minfrin, wrowe, rjung - * mod_dav: Do not fail PROPPATCH when prop namespace is not known. PR 52559 [Diego Santa Cruz ] trunk patch: http://svn.apache.org/r1476644 diff --git a/modules/dav/fs/dbm.c b/modules/dav/fs/dbm.c index 751a82bfdbc..040c3e3d6fc 100644 --- a/modules/dav/fs/dbm.c +++ b/modules/dav/fs/dbm.c @@ -729,6 +729,10 @@ static dav_error * dav_propdb_get_rollback(dav_db *db, static dav_error * dav_propdb_apply_rollback(dav_db *db, dav_deadprop_rollback *rollback) { + if (!rollback) { + return NULL; /* no rollback, nothing to do */ + } + if (rollback->value.dptr == NULL) { /* don't fail if the thing isn't really there. */ (void) dav_dbm_delete(db, rollback->key);