Bug 53663 - Use of uninitialized memory in mod_rewrite, when RewriteMap is dbd or fastdbd
Summary: Use of uninitialized memory in mod_rewrite, when RewriteMap is dbd or fastdbd
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_rewrite (show other bugs)
Version: 2.4.2
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: FixedInTrunk, PatchAvailable
Depends on:
Blocks:
 
Reported: 2012-08-06 19:31 UTC by Mikhail T.
Modified: 2012-08-21 15:57 UTC (History)
0 users



Attachments
Fix for mod_rewrite's dbd/fastdbd initialization (434 bytes, patch)
2012-08-06 19:31 UTC, Mikhail T.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail T. 2012-08-06 19:31:10 UTC
Created attachment 29173 [details]
Fix for mod_rewrite's dbd/fastdbd initialization

Without the attached patch, httpd randomly crashes at startup, when one attempts to use the new dbd-style RewriteMap.

valgrind points at the use of uninitialized memory in mod_rewrite.c:3068 -- indeed, when the map is of type dbd (or fastdbd), the newmap->checkfile remains uninitialized. The proposed patch fixes the problem by explicitly setting the field to NULL (there are no files to check in this case).
Comment 1 Stefan Fritsch 2012-08-06 20:46:53 UTC
Thanks for debugging this.

Fixed slightly differently in r1369995, r1369999, r1370001.
Comment 2 Rainer Jung 2012-08-21 15:57:19 UTC
Fixed for 2.4 in r1371208.
Released with 2.4.3.
It seems no backport needed, since rewrite maps with dbd did not exist in 2.2.