Commit Graph

12349 Commits (1dc98cad27733171de0aa74b87a57a6ad5b968f8)
 

Author SHA1 Message Date
Philippe Antoine 1dc98cad27 pcre2: remove PCRE1 from CI 3 years ago
Philippe Antoine bce3c46874 pcre2: remove PCRE1 as dependency 3 years ago
Philippe Antoine 56f664af6b pcre2: follow code naming style 3 years ago
Philippe Antoine e10d930660 pcre2: only one DetectParseRegex structure 3 years ago
Philippe Antoine 2a1690e110 pcre2: move header include to suricata-common only 3 years ago
Philippe Antoine fae7389ae2 pcre2: document the behavioral changes 3 years ago
Philippe Antoine 48dd0cf804 pcre2: check for PCRE2_ERROR_UNSET
Needs maybe to be generalized
3 years ago
Philippe Antoine 3de99a214c pcre2: migrate keywords parsing 3 years ago
Philippe Antoine 2dea9a1e37 pcre: use pcre2 to parse detect pcre itself 3 years ago
Philippe Antoine f0f3295ba0 pcre: migrate detect-pcre to pcre2
pcre2 substrings need special free...
3 years ago
Philippe Antoine 3633c48e6e pcre2: migrate utility uses of pcre 3 years ago
Philippe Antoine 95a07c8957 pcre2: migrate transform pcrexform 3 years ago
Philippe Antoine acb1ab08a2 pcre2: introduce as a new depdendency 3 years ago
Philippe Antoine 98f84d5a9b http2: follow range requests
Move the content-range parsing code to rust
3 years ago
Philippe Antoine bded2ec92e range: post process out of order blocks
A block is determined out of order on opening.
But on closing, the gap before it may have been filled.
So, we must post-process it, ie iterate over the red and black
tree so see what blocks we can get.
3 years ago
Philippe Antoine 3b9a4f9f19 range: no final zero in key
for future compatibility with rust
3 years ago
Philippe Antoine 56fae072b2 http2: better rust lifetimes
so that borrow check gets happy
3 years ago
Philippe Antoine a1f9e0c97a rust: rename to StreamingBufferConfig as in C 3 years ago
Philippe Antoine 7819f3262f http: more consistent return values for HTPFileOpenWithRange 3 years ago
Philippe Antoine bb7cc6f5e3 http: increase tracked files for ranges as well 3 years ago
Philippe Antoine d776d72711 http: range transfering ownership of file container
To make concurrency reasoning clearer
3 years ago
Philippe Antoine 3ed38d2d5d http: avoid one lock for range append data
Better structure design to ensure that one flow maximum
is owning and appending into the file, adding fileOwning field.

Adds also a gap field in a range buffer, so that we can
feed the gap on closing, when we are protected from concurrency
by a lock, (lock which got removed in the append path)

Fixes memcap when encountering a duplicate while inserting
in red and black tree

Adds many comments
3 years ago
Victor Julien 2ef857e533 thash: add debug validation check for use_cnt 3 years ago
Victor Julien 7a797631e0 http/range: cleanup and simplification
Simplify locking by using the THashData lock instead of a separate
range lock.

Avoid size_t in function arguments.

Clean up file handling functions.

Implement handling of alloc errors.

Rename yaml entry to byterange

Unify public api naming
3 years ago
Victor Julien 5ffc9622b3 http/range: optimize struct layout 3 years ago
Victor Julien fc5632664c http/range: fix memory leak on out of order ranges 3 years ago
Philippe Antoine e82416a415 http/range: reassemble files from different flows with range
adds a container, ie a thread safe hash table whose
key is the filename

keep a tree of unordered ranges, up to a memcap limit

adds HTPFileOpenWithRange to handle like HTPFileOpen
if there is a range : open 2 files, one for the whole reassembled,
and one only for the current range
3 years ago
Philippe Antoine 5cb996efcf util: export Djb2 hash string function 3 years ago
Philippe Antoine f0012f97b2 util: adds util function SCBufferCmp
Compares two buffers with their two sizes
3 years ago
Victor Julien 13a6eb3522 detect: suppress scan-build warning 3 years ago
Jason Ish a480ec2ba1 github-ci: remove fedora 32 builds (eol)
Promote Fedora versions used in builds to 33 or 34.
3 years ago
Jason Ish 102f0c74ff lua: move lua includes to util-lua.h
Moves Lua includes to util-lua.h instead of suricata-common
so plugins (or library users) don't need to be aware of the
Lua that Suricata was built with. Instead only source files
that need to be Lua aware can include util-lua.h.
3 years ago
Shivani Bhardwaj 42da0fb5c5 smb: fix broken stream depth setting
The stream depth setting was broken since it was moved to Rust because
of a missing parser for memory values in configuration.
Use get_memval fn from conf.rs to calculate and fetch the correct
values.
3 years ago
Shivani Bhardwaj 0cfe512ef0 rust/conf: add getter for memval
Add a parser for memory values like 50kb, 20mb, etc on the Rust side.
3 years ago
Philippe Antoine ae4e3e95d5 transform: use generic Free function
to free subelements in the context structure
3 years ago
Philippe Antoine ca054f7264 fuzz: fixes a leak in applayerparse target
If a protocol change was requested, the target did not handle
it as Suricata, as the target is meant to handle only one
app-layer protocol.
3 years ago
Jason Ish 72369fd8ce plugins: check if eve file type is registered
Instead of the 2 registration functions, just use one with
a utility method to check for conflicts against built-in
types.
3 years ago
Jason Ish a8b603e509 plugins: remove internal fields
The internal flag is not really used. This also reverts the behaviour of
the plugin refactor of passing a ConfNode based on the plugin name
instead of the eve ConfNode.
3 years ago
Jason Ish 4ab1950760 eve/syslog: remove "plugin" naming 3 years ago
Jason Ish 4cd99fc266 eve: register internal output file types
Register known eve output file types during eve registration. This
removes the function to load internal plugins as they are not really
plugins and moves the registration of them into their respective
subsystem.
3 years ago
Jason Ish 784a080201 plugins: rename SCPLuginFileType to SCEveFileType
With internal code using the plugin API to register an Eve
filetype, the name plugin no longer makes sense. This is
part of my idea that internal plugins aren't plugins at all,
and the plugin interface should be an abstraction over
internal APIs.

Along that idea, this is the start of a refactor of the plugin
file types to be internal, where the plugin API is just an external
interface to that internal API.
3 years ago
Jeff Lucovsky f221c344ed output/syslog: Register syslog plugin
This commit completes the syslog conversion to an internal output plugin
with registration to make it available as an output file type.
3 years ago
Jeff Lucovsky b4da070c59 output/plugin: Refactor eve registration function 3 years ago
Jeff Lucovsky 98d4f9eaa4 output/syslog: Refactor syslog definitions 3 years ago
Jeff Lucovsky be9fbe3230 output/syslog: Convert syslog eve output to plugin
This commit converts the "built-in" syslog eve output handler into an
internal plugin.
3 years ago
Jeff Lucovsky 0e3773ddef output/json: Refactor internal routines 3 years ago
Jeff Lucovsky 5ba08dfef5 plugin: Refactor and create registration function
This commit refactors the plugin registration code and creates an API
for plugin registration
3 years ago
Jeff Lucovsky 18cc0fefab output/plugin: Load internal plugins
This commit adds an interface for loading plugins that are internal to
Suricata. These are always loaded and are in a modified format from
external pliguns.
3 years ago
Jeff Lucovsky 0ee5532036 plugin: Add "not set" plugin value type
This value is used as a sentinel to determine if the configured
eve.json filetype was located.

First, the built-in and internal output plugins are checked. If the
sentinel value remains set, the external plugins are searched for the
filetype.
3 years ago
Juliana Fajardini b3f447a0df util/lua-common: use lua_pushnumber for SCFileInfo 4 years ago