Commit Graph

15952 Commits (ddb3a0c9de91100afe9e46da6a331e7c419efc6a)
 

Author SHA1 Message Date
Philippe Antoine ddb3a0c9de http: multipart unused code removal 9 months ago
Philippe Antoine 8d4699fbba eve/schema: complete and reorder smtp fields
received and cc were missing
9 months ago
Philippe Antoine 5555aa6788 mime: improved token parsing
Accepts escaped quote in escaped string
9 months ago
Victor Julien 130d75f025 github-action: remove end of life CentOS 8 stream 9 months ago
Victor Julien 1190e426f9 defrag: remove trackers on lookup
When looking up a tracker, remove any timed out / completed trackers.
9 months ago
Victor Julien 75b78d7643 defrag: add defrag.memuse counter
Gives a current snapshot of the memory in use by the defrag engine.
9 months ago
Victor Julien becc91c306 defrag: timeout check on look up; tag for removal 9 months ago
Victor Julien 83dc703d1f defrag: add various counters 9 months ago
Victor Julien dcaeed7b95 defrag: remove tracker on frag pool issues
If a frag wasn't inserted due to pool empty or alloc failure, clear and

invalidate the tracker.
9 months ago
Victor Julien fc05d253d2 defrag: add defrag.mgr.tracker_timeout counter
Updated by flow manager.
9 months ago
Victor Julien 39876bf566 defrag: update exception policy counter: ptr can't be NULL 9 months ago
Victor Julien 383892463c defrag: fix test passing NULL pointers 9 months ago
Victor Julien fc93a3875e defrag: turn queue into stack
Only used by the spare tracker logic, which works better as a stack.
9 months ago
Victor Julien 475c40f9c2 defrag: minor cleanups; dead code removal 9 months ago
Victor Julien 8b57545540 defrag: turn hash row into single linked list 9 months ago
Victor Julien 26a73503aa defrag: timeout/reuse start of list 9 months ago
Victor Julien 97705c94e4 defrag: simplify lookup/create loops
Turn into a simpler do { } while loop like in the flow code.
9 months ago
Victor Julien 76e05c72f6 eve/schema: reformat 9 months ago
dependabot[bot] 4040ae10d1 github-actions: bump codecov/codecov-action from 4.1.1 to 4.4.1
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.1.1 to 4.4.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4.1.1...125fc84a9a348dbcf27191600683ec096ec9021c)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
9 months ago
dependabot[bot] 1c5661673f github-actions: bump ossf/scorecard-action from 2.3.1 to 2.3.3
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.1 to 2.3.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](0864cf1902...dc50aa9510)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
9 months ago
dependabot[bot] 0b4652f4cc github-actions: bump github/codeql-action from 3.25.3 to 3.25.7
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.3 to 3.25.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v3.25.3...v3.25.7)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
9 months ago
Victor Julien 3b1fecbab1 output/streaming: suppress noisy start up message 9 months ago
Victor Julien 621fe38dbf output/lua: handle registration error
Use error message instead of info message.
9 months ago
Eric Leblond 21916b9743 eve: revert ethernet addresses when needed
EVE logging has a direction parameter that can cause the logging
of an application layer to be done in a direction that is not linked
to the packet. As a result the source IP addres could be assigned the
MAC address of the destination IP and reverse.

This patch addresses this by propagating the direction to the ethernet
logging function and using it there to define the correct mapping.

Issue #6405
9 months ago
Alexey Simakov a8217d288a util/radix-tree: fix potential dereference of nullptr
Fix potential dereferece of nullptr in case of
unsuccessful allocation of memory leak for tree nodes

Bug: #7049
9 months ago
Jason Ish 10a367b116 lua: use quoted include style to avoid system includes
Use quoted include style for Lua includes ("lua.h" instead of <lua.h>)
as this could result in system includes being picked up instead of the
includes from our vendor directory.
9 months ago
Philippe Antoine 20423fdd38 style: remove some useless return
and remove empty line before end of function
9 months ago
Philippe Antoine a262e203f9 src: remove some unused parameters 9 months ago
Juliana Fajardini aeb200e001 devguide: highlight commit message example
Although we have the example for a commit message in our Code Submission
Process sub-chapter, seems that people still oversee it a lot. It was
suggested that we put it in a note-box, to make it more visible.
9 months ago
Victor Julien 41b9836b11 threads: give threads more time to get ready
In certain conditions, it can take a long time for threads to start up.
For example in af-packet, setting up the socket, rings, etc has been
observed to take close to half a second per thread, and since the
threads go one by one in a preset order, this means the start up can
take a lot of time if there are many threads. The old logic would just
allow a hard coded 60s. This was not always enough when the number of
threads was high.

This patch makes the wait time take the number of threads into account.
It adds a second of time budget to the base 60s for each thread.

So as an example, if a system has 112 af-packet threads, it would wait
172 seconds (60 + 112) for the threads to get ready.

Ticket: #7048.
9 months ago
Victor Julien 85fd4b2ec7 threads: optimize start up check
When starting a large amount of threads, the loop was inefficient. It
would loop over the threads and if one wasn't yet ready it would sleep a
bit and then reevaluate all the threads. This reevaluation of threads
already checked was inefficient, and could lead to the time budget
running out.

This patch splits the check, and keeps track of the threads that have
already passed. This avoids the rescanning of already checked threads.
9 months ago
Victor Julien 121955d5c1 tls-store: support client logging
Adds a `client-` prefix to the logged certs and meta files.

Ticket: #7045.
9 months ago
Victor Julien 6fe5b739b4 tlsstore: remove stale FIXME 9 months ago
Victor Julien 032bc04a1e detect/tls.store: fix direction check
STREAM_* flags are invalid for `Flow::flags`.

Fixes: dfcb429524 ("detect/cert: Use client side certs")
9 months ago
Jason Ish daa6f6f7f3 github-ci: re-add --disable-lua to commit check
This is required for some older versions in the pull request to build
as the commits change some compile time options with respect to Lua.
9 months ago
Jason Ish 3eb8c728fd doc: update lua sandbox docs for allowed packages/functions 9 months ago
Jason Ish 10e6028175 lua: track memory limit exceede errors
Update the Lua allocated to set a code on memory allocation limit
exceeded errors so an appropriate error message can be logged and a
state incremented.

Fixes the tracking of the allocated size by using the difference
between original size, and new size and toss in some debug
validations.
9 months ago
Jason Ish 011f0ba994 lua: remove sandbox lib for now
Not sure if I see a use for it, some extra debug logging might be just
as useful for those writing Lua scripts.
9 months ago
Jason Ish 5a1cba72f0 lua: add logging and counter for instruction limit being exceeded 9 months ago
Jason Ish c8fa454cb2 lua: add blocked functions as a special log type plus stat
Distinguish between a generic Lua script error and an error created by a
function being blocked, so each is logged once respective of each other.

Also add a stat that is incremented when a script fails due to a
blocked function.

NOTE: This does not catch calls to functions that are blocked by not
having the library loaded, such as "io.open", as they are blocked by
not even loading the "io" library.
9 months ago
Jason Ish 86f9e43068 lua: use a function allow list instead of a deny list
The Lua library surface area is small enough to manage an allow list,
which is generally better than a deny list, as we'll explicitly need
to opt-in to new functions provided by the Lua runtime.
9 months ago
Jason Ish 936930778c rust/Makefile: cleanup "clean" targets
Remove maintainer-clean-local, this is not needed.

In distclean-local, remove "rust/dist" and "rust/vendor" as they are
created during "make dist".

In "clean-local", remove "rust/target" and "rust/gen" as they are
created during a normal "make".
9 months ago
Jason Ish 7897043144 github-ci/scan-build: exclude rust (lua)
The vendored Lua code triggers some scan-build failures, so exclude
the rust/ directory for now. Might want to look at these separately
though.
9 months ago
Jason Ish 4788d684da github-ci: test make after clean without cbindgen
Modify the CentOS 9 Stream build to not have cbdingen available, as
its already building from the dist.  But add a "make clean" followed
by a "make" to test that it still builds after a clean.
9 months ago
Jason Ish 2e440169d6 lua: remove lua as a compile time feature
Its always built-in. However, can be disabled at runtime.
9 months ago
Jason Ish 1fd2c1a379 rust/lua: remove lua_int8 feature
Now that we're fixed to Lua 5.4, the integer size is always 8.
9 months ago
Jason Ish bc011f2205 lua: use rust crate to vendor (bundle) lua
Remove lua-dev(el) from all CI tests.
9 months ago
Jason Ish afb705d278 lua: reset instruction counter before calling script 9 months ago
Jason Ish 1f05a17fb9 lua: misc cleanups in sandbox implementation
Including:
- rename guards
- SCMalloc to SCCalloc
- remove unused enum
- rename public functions to our naming standard
9 months ago
Jo Johnson ba6a976e06 doc: Initial doc for lua sandbox 9 months ago