Commit Graph

6489 Commits (2ce03fbabb3468c72cf7d4c27fa64f557c97d10c)
 

Author SHA1 Message Date
Victor Julien 6e3514a444 spm: constify search args 10 years ago
Victor Julien 914f7fa733 file: shrink data structure 10 years ago
Victor Julien 6b942b6734 htp file: constify name/data args 10 years ago
Victor Julien e3703ee126 file: constify data/name args 10 years ago
Victor Julien 8631b73852 http body: use HTPCalloc 10 years ago
Victor Julien 77f67062de htp: add HTPCalloc wrapper 10 years ago
Victor Julien a1a0acf8a8 magic: make data arg const 10 years ago
Jason Ish dddd2d06f6 dcerpc: cleanup list handling 10 years ago
Jason Ish 1efcaf2179 dcerpc: fix memory leak when called from smb
When DCERPC was wrapped in SMB it wasn't being initialized or
cleaned up properly. To fix, expose DCERPC initialization and
cleanup functions for use by the SMB application layer.

Redmine ticket:
https://redmine.openinfosecfoundation.org/issues/1708
10 years ago
Andreas Herz 27f6620874 rule-parsing: quick fix for rules with wrong double quotes
The stripping of leading and trailing "s has issues with rules like the
ones described in issue 1638 thus resulted in crashing the rule parser.
So for now this is a quick fix which approaches this issue directly by
stripping those "s correctly and handling error cases. It also adds the
skip for leading spaces at the msg keyword and worksaround a possible
null pointer dereference (that should never occur though).
A more general approach should be done in the future.
10 years ago
Victor Julien 881fc5500d lua output: clean up memory at shutdown
Lua module and submodules we're completely freed at exit, and nor
was the lua_State.

This patch does all the cleanup.
10 years ago
Victor Julien ecb79391a0 pcre: use pcre_free_study to free the study data 10 years ago
Victor Julien 066c4b0b24 detect ports: fix memory leak
Fix mem leak on rules that contained ports like "![21,25,119]".
10 years ago
Victor Julien 573284b5ed vlan: fix bad checks in unittests 10 years ago
Andreas Herz e1468107e5 nfqueue: fix wrong return value check in error cases
The check for the return value was wrong, we have 0 for success and 1
(and 2) for the error cases like TM_ECODE_FAILED, so we should quit
unless TM_ECODE_OK (0) is returned for NFQInitThread. This fixes #1870
10 years ago
DIALLO David 3a3cc43f6a modbus: fix compiler uninitialized warnings with -Wmaybe-uninitialized
All variables are initialized thanks to ModbusExtractUint8 or ModbusExtractUint16
function that extracts 8bits or 16bits data from pointer the received input data.
In case of extracting error (because of length), ModbusExtractUint8 or
ModbusExtractUint16 returns an error that is managed by the caller function.

All variables are now initialized to zero when they are declared. It does not
change anything functionnally but it removes Modbus warnings.
10 years ago
Victor Julien 3a6b7a1cd6 make install-rules: update URL to https and 3.0 10 years ago
Victor Julien fde7a2f656 cuda: fix compilation 10 years ago
Victor Julien c12044c6c5 cuda: update build system for modern versions
Remove support for compute capabilities below 2.0.

Add capabilities until 5.3.
10 years ago
Eric Leblond cb66db5ef2 xff: fix address overwrite in forward case 10 years ago
Tom DeCanio 4db3a0f0b4 output-json-alert: fix segfault when alerts separated out from eve-log. 10 years ago
Tom DeCanio f7c568d1b2 output-json-http: Add JSON support for X-Flash-Version.
Supported as a custom field.
10 years ago
Tom DeCanio 5ccf6f30ea Add JSON support for X-Authenticated-User. Supported as a custom field. 10 years ago
Giuseppe Longo 7a29aa116e http: close file when http body limit is reached
In some conditions, if stream.reassembly.depth is greater than
request/response-body-limit size, the logging output is wrong
if filestore keyword is used with http.

For example, we get:
{... "app_proto":"http","fileinfo":{"filename":"\/file.pdf","state":"CLOSED","stored":false,"size":1049292,"tx_id":0}}

"state":"CLOSED","stored":false should be "state":"TRUNCATED","stored":true.

This happens because the file state and file flags,
which is the information that determine a correct output,
are not set properly since a file is logged before and then closed (HTPFileClose).

The logic of this patch is to close a file when we are above
the limits, such that the proper state and flags can be set
and the file will be logged correctly.
10 years ago
Victor Julien 609cdff540 json-drop-log: clean up memory at shutdown 10 years ago
Victor Julien 3c788a8c17 flowbits: remove unused debugging code 10 years ago
Victor Julien 53af48f021 flowbits: fix memory leak
Flowbits removed from a flow by 'toggle' or 'unset' were not actually
freed, leading a small memory leak.
10 years ago
Victor Julien 0dbbe016d6 flowbits: optimize set and remove 10 years ago
Andreas Herz c467c39b61 build-info: workaround special _FORTIFY_SOURCE defines
On systems like Gentoo where _FORTIFY_SOURCE is already defined like
FORTIFY_SOURCE=((defined __OPTIMIZE && OPTIMIZE > 0) ? 2 : 0) the use
within the printf function (%d) won't result in the correct value and
we end up with 'defined' undeclared compile error. This workaround makes
sure that just the resolved value is checked and then printed.
10 years ago
Victor Julien 154891cf26 pcre: work around harmless coverity warnings 10 years ago
Victor Julien 893b01ed0d bpf: fix memleak on unusual error (CID 1197757) 10 years ago
Victor Julien 6228f5f689 lua: if pkg-config fails, try -llua 10 years ago
Victor Julien 9858ae41be configure: OS X fixes
Remove unnecessary -lpthread from tests.

Make linker warnings non-fatal with -Werror.
10 years ago
Victor Julien b25bd2e180 http: fix NULL deref on certain out of memory conditions 10 years ago
Victor Julien 45812c32ad runmode: fix memleak on live modes setup (CID 1197760) 10 years ago
Victor Julien b9ee86fdb4 detect-engine: free memory in error conditions (CID 1351210) 10 years ago
Victor Julien 0dd81b85d4 multi-tenants: improve error handling (CID 1312702) 10 years ago
Victor Julien fb90358e17 conf: explicitly ignore retval (CID 1353490) 10 years ago
Victor Julien f5ce7549be unix-manager: fix memleak in error case (CID 1353491) 10 years ago
Victor Julien e51707be90 pcre: blacklist 8.35 for JIT use (issue #1693) 10 years ago
Victor Julien 3f3ed71fe7 jansson: cleanup JSON_ESCAPE_SLASH use 10 years ago
Victor Julien 654829f969 unix-socket: optimize response sends
Instead of sending responses to clients in small chunks, send it in
one big chunk. For this the JSON message is first serialized into
a MemBuffer before sending.
10 years ago
Victor Julien 40cf1f8ef7 json: make membuffer helper public
Make json_t to MemBuffer helper public so it can reused.
10 years ago
Victor Julien acaf8a84e8 stats: fix dump-counters when no loggers are active 10 years ago
Victor Julien 14030239f8 unix-socket: restore dump-counters functionality
Create a eve.stats like output for dump-counters.
10 years ago
Victor Julien 310e8fcbf8 stats: export StatsToJSON 10 years ago
Victor Julien ffdfb6a8f0 json-stats: split out json generation
Split out JSON generation logic so the code becomes reusable.
10 years ago
Victor Julien c446abeb47 jansson: include in suricata-common.h 10 years ago
Andreas Herz 8c0e575063 configure: warn if libpcre 8.35 is used 10 years ago
Travis Green 72c9debbd6 yaml: disable rules by default
Change to "disable by default" rulefiles
10 years ago