Snort mailing list archives
[SNORT-DEVEL] Fix memory leak in Snort 2.9.7.0-alpha
From: Bill Parker <wp02855 () gmail com>
Date: Sun, 18 May 2014 15:55:40 -0700
Hi All,
In reviewing file 'luaDetectorApi.c' in directory
'snort-2.9.7.0.alpha/src/dynamic-preprocessors/appid', I found
a small memory leak involving variable 'schemePattern' where
the memory isn't released due to a strdup() call failing.
The patch file is listed below:
--- luaDetectorApi.c.orig 2014-03-09 18:35:09.650653721 -0700
+++ luaDetectorApi.c 2014-05-17 19:44:33.408223503 -0700
@@ -2102,6 +2120,14 @@
if(tmpString && queryPatternSize)
{
queryPattern = (u_int8_t*) strdup(tmpString);
+ if (!queryPattern)
+ {
+ _dpd.errMsg( "Invalid query pattern string.");
+ free(pathPattern);
+ free(hostPattern);
+ free(schemePattern);
+ return 0;
+ }
}
u_int32_t appId = lua_tointeger(L, index++);
The free(schemePattern); was left out of the previously submitted
patch for this file (my bad) <duh>.
I'm attaching the patch file to this bug report.
Bill Parker (wp02855 at gmail dot com)
Attachment:
luaDetectorApi.c.patch
Description:
------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs
_______________________________________________ Snort-devel mailing list Snort-devel () lists sourceforge net https://lists.sourceforge.net/lists/listinfo/snort-devel Archive: http://sourceforge.net/mailarchive/forum.php?forum_name=snort-devel Please visit http://blog.snort.org for the latest news about Snort!
Current thread:
- [SNORT-DEVEL] Fix memory leak in Snort 2.9.7.0-alpha Bill Parker (May 18)
- Re: [SNORT-DEVEL] Fix memory leak in Snort 2.9.7.0-alpha Josh Rosenbaum (jrosenba) (May 19)
