Commit Graph

8641 Commits (884e05167101c680b892ababcae0caa9d503a261)
 

Author SHA1 Message Date
Victor Julien 485663583a rust/mingw: fix linker issues on mingw 7 years ago
Victor Julien 746638b220 cuda: remove
Remove CUDA support as it has been broken for a long time.

Ticket #2382.
7 years ago
Victor Julien 282dad79ca scan-build: fix memleak warning in port parsing 7 years ago
Victor Julien f342b11277 detect/tos: minor cleanups 7 years ago
Victor Julien 0c36ea64c2 detect/tos: fix memleak in error path 7 years ago
Victor Julien 2a4b5adce8 scan-build: simplify FatalErrorOnInit macro 7 years ago
Victor Julien 8aab6016cb scan-build: don't use memory wrappers 7 years ago
Victor Julien c563c1fcab scan-build: fix warning in radix tree 7 years ago
Victor Julien 50a5b2e458 scan-build: fix warning in streaming buffer 7 years ago
Victor Julien f2cacca9f8 threads: avoid NULL-ptr deref in thread init wait
** CID 1426745:  Null pointer dereferences  (FORWARD_NULL)
/src/tm-threads.c: 2135 in TmThreadWaitOnThreadInit()

________________________________________________________________________________________________________
*** CID 1426745:  Null pointer dereferences  (FORWARD_NULL)
/src/tm-threads.c: 2135 in TmThreadWaitOnThreadInit()
2129         struct timeval cur_ts;
2130         gettimeofday(&start_ts, NULL);
2131
2132     again:
2133         gettimeofday(&cur_ts, NULL);
2134         if ((cur_ts.tv_sec - start_ts.tv_sec) > 120) {
>>>     CID 1426745:  Null pointer dereferences  (FORWARD_NULL)
>>>     Dereferencing null pointer "tv".
2135             SCLogError(SC_ERR_THREAD_INIT, "thread \"%s\" failed to "
2136                     "initialize in time: flags %04x", tv->name,
2137                     SC_ATOMIC_GET(tv->flags));
2138             return TM_ECODE_FAILED;
2139         }
2140
7 years ago
Pierre Chifflier f5b27ae767 Rust: fix probing function prototype: change sign and add Flow 7 years ago
Victor Julien 28ddf48899 mingw: improve ipaddress parsing 7 years ago
Victor Julien d62a212fa2 mingw: fix issues in pcap directory code
Fix issues with 'stat' and explicitly skip . and ..
7 years ago
Victor Julien 6c7d485bf8 mingw: wrapper for usleep in threads
usleep on MinGW doesn't behave as expected. Added replacement
wrapper around 'Sleep(msec)'. As that has msec resolution and
not a usec resolution, change the various thread init and stop
functions to test for the actual time waited instead of counting
the usecs passed to usleep.
7 years ago
Victor Julien 1261d30df0 mingw/cygwin: explicitly disable unix socket 7 years ago
Victor Julien 6b75162194 mingw: use c:\Program Files\Suricata for w64 7 years ago
Victor Julien 650e6b316d ipv6: add string validation function 7 years ago
Victor Julien 13477d60ee ipv4: add string validation function 7 years ago
Victor Julien aa2eddfb98 decode/mime: improve ip address validation
inet_pton on Windows/MinGW is very liberal, so do manual validation
of IP address formatting.
7 years ago
Victor Julien d6a7f6b53f mingw: work around mingw more liberal ip parsing 7 years ago
Victor Julien 269cd03a43 console: no color for native windows build 7 years ago
Victor Julien 275eb839d1 mingw: disable pid checking from pidfile
kill() call is not supported in MinGW
7 years ago
Victor Julien 3fc73addae mingw: fix 'struct tm' compilation issue 7 years ago
Victor Julien 46cb00ec6c strptime: add implementation from NetBSD
As MinGW doesn't come with strptime take the BSD licensed
implementation from NetBSD. More specifically, the one from

https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-libkml/strptime.c

It's slightly modified to get rid on 'uint'.
7 years ago
Victor Julien 11be9bd971 mingw: add SCNtohl and SCNtohs macro's
On MinGW the result of ntohl needs to be casted to uint32_t and
the result of ntohs to uint16_t. To avoid doing this everywhere
add SCNtohl and SCNtohs macros.
7 years ago
Victor Julien 895df9a6f6 mingw: fix use of undefined USR2 signal 7 years ago
Victor Julien e113fa96e9 mingw: fix compilation of signals code 7 years ago
Victor Julien d8ddd3b5bc mingw: work around mingw mkdir
mingw doesn't come with a posix compliant mkdir as it only takes
a single argument.
7 years ago
Jason Ish 223d9a1e3a eve: remove json format option - was not used 7 years ago
Jason Ish 1587772b90 eve.flow: removed unused http parameters 7 years ago
Jason Ish c4d30ddaf9 eve: fix context datatype used in init functions
Many were using AlertJsonThread instead of OutputJsonCtx,
but as the datatypes were similar enough no harm was done.

Now that they are using their proper datatype, removed
AlertJsonThread from output.h as its no longer used.
7 years ago
Jason Ish b005cceb0a eve.dnp3: removed unsed context field 7 years ago
Jason Ish ecf9eda340 eve.flow: remove "hi" log message 7 years ago
Jason Ish 07ab338145 eve.netflow: remove "hi" log message 7 years ago
Victor Julien 6c251b8576 rust: add --enable-rust-debug
Add option to put Rust code in non-'--release' mode, preserving
debug symbols.

Until now Suricata would have to be compiled with --enable-debug for
this.
7 years ago
Victor Julien 979f964260 hostbits: fix test setup 7 years ago
Victor Julien a9ac6db0dd file_data: move tests into tests/ 7 years ago
Victor Julien 6e65cf138b file_data: unify inspect engines
Call HTTP from the generic file_data engine.
7 years ago
Victor Julien ac0ae2dcd1 file_data: smtp file_data to generic file_data
Generalize the SMTP file_data inspection into a 'files'
file_data inspection that can be used for any protocol
that uses the File API.
7 years ago
Victor Julien ccf202a4f0 detect: minor cleanup 7 years ago
Victor Julien 948dee9a98 app-layer: use bool for 'HasDecoderEvents' 7 years ago
Victor Julien aac15854b4 detect: no tcp flags in mask for pseudo packets 7 years ago
Victor Julien 0b97fbbc13 detect/mpm: micro optimization in setup 7 years ago
Victor Julien 4438e34ed9 detect: remove old simd references 7 years ago
Victor Julien bc46d9a72f decode/vlan: don't consider ARP 'unknown' 7 years ago
Victor Julien a8b0825c18 pfring: minor code cleanups 7 years ago
Victor Julien 553cd0dc98 pfring: add warning for stripped vlan header case
According to PF_RING upstream the vlan header should never be stripped
from the packet PF_RING feeds to Suricata. But upstream also indicated
keeping the check would be a good "safety check".

So in addition to the check, add a warning that warns once (per thread
for implementation simplicity) if the vlan hdr does appear to be stripped
after all.
7 years ago
Victor Julien 189b521239 pfring: fix vlan handling issues
When Suricata was monitoring traffic with a single vlan layer, the stats
and output instead showed 2. This was caused by the raw packets PF_RING
feeds Suricata would hold the vlan header, but the code assumed that
the header was stripped and the vlan_id passed to Suricata through
PF_RING's extended_hdr.parsed_pkt.

This patch adds the following logic: Check vlan id from the parser packet
PF_RING prepared. PF_RING sets the vlan_id based on its own parsing or
based on the hardware offload. It gives no indication on where the vlan_id
came from, so we rely on the vlan_offset field. If it's 0, we assume the
PF_RING parser did not see the vlan header and got it from the hardware
offload. In this case we will use this information directly, as we won't
get a raw vlan header later. If PF_RING did set the offset, we do the
parsing in the Suricata decoder so that we have full control.

PF_RING *should* put back the vlan header in all cases, and also set the
vlan_offset field, but as a extra precaution keep the check described
above.

Bug #2355.
7 years ago
Eric Leblond 711b6fb389 app-layer-ftp: add memcap for ftp
Add a memory cap for the FTP protocol.
7 years ago
Eric Leblond 24f745553c doc: update file extraction document
Define the list of protocol parsers supporting extraction in one
single place following Andreas Herz' suggestion.
7 years ago