Commit Graph

17846 Commits (main)
 

Author SHA1 Message Date
Jeff Lucovsky bb12f197bc detect/analyzer: Include ICMP icode information
Issue: 6359

Extend the rules analysis to include ICMP icode information.
3 months ago
Jeff Lucovsky 7e713cb45a detect/analyzer: Support u8 types
Issue: 6359

Support JSON output of u8 types
3 months ago
Philippe Antoine f4378eb306 doc/devguide: document app-layer protocol detection
Ticket: 6022
3 months ago
Philippe Antoine 4d4eb84eca doc: document krb5 event type
Ticket: 6566
3 months ago
Philippe Antoine f907216e1a doc: do not have bittorrent in the middle of SMB events 3 months ago
Philippe Antoine 68827a4ace schema: document kerberos fields
Ticket: 6566
3 months ago
Philippe Antoine 8ba16e2813 ci: do not run workflows for etc/schema.json
As it is rather a documentation file than code
3 months ago
Victor Julien ba4d4f8694 nfq: suppress coverity thread warning
CID 1593187: (#1 of 1): Data race condition (MISSING_LOCK)
2. missing_lock: Accessing (*p).nfq_v.mark without holding lock Packet_.persistent.tunnel_lock. Elsewhere, NFQPacketVars_.mark is written to with Packet_.persistent.tunnel_lock held 2 out of 5 times (2 of these accesses strongly imply that it is necessary).

No concurrency happening on non-tunnel packet, so no locking needed.
3 months ago
Victor Julien 7f5d1f4c79 util/var-store: suppress coverity warnings 3 months ago
Victor Julien 2bea5af2c8 detect/multi-tenant: address various thread safety warnings 3 months ago
Victor Julien f26f7505db packetpool: improve thread safety
lock_acquire: Calling pthread_mutex_lock acquires lock PktPoolLockedStack_.mutex.
 87        SCMutexLock(&my_pool->return_stack.mutex);

CID 1554228: (#1 of 1): Indefinite wait (BAD_CHECK_OF_WAIT_COND)
dead_wait: A wait is performed without ensuring that the condition is not already satisfied while holding lock PktPoolLockedStack_.mutex. This can cause a deadlock if the notification happens before the lock is acquired.
      Acquire the lock, then check the wait condition in a loop, without releasing with the lock before the wait. This will prevent deadlocks and failed conditions from spurious wakeups.
3 months ago
Victor Julien 65ff3dfa88 detect/loader: add threading coverity warning
lock_acquire: Calling pthread_mutex_lock acquires lock ThreadVars_.ctrl_mutex.
725        SCCtrlMutexLock(th_v->ctrl_mutex);

CID 1554214: (#1 of 1): Indefinite wait (BAD_CHECK_OF_WAIT_COND)
dead_wait: A wait is performed without ensuring that the condition is not already satisfied while holding lock ThreadVars_.ctrl_mutex. This can cause a deadlock if the notification happens before the lock is acquired.
      Acquire the lock, then check the wait condition in a loop, without releasing with the lock before the wait. This will prevent deadlocks and failed conditions from spurious wakeups.
3 months ago
Victor Julien 5aaef39c8c flow/manager: fix threading/locking coverity warnings
In flow manager and recycler timed condition wait loops.

First check loop break conditions before entiring the timed wait.

CID 1638284: (#1 of 1): Indefinite wait (BAD_CHECK_OF_WAIT_COND)
dead_wait: A wait is performed without ensuring that the condition is not already satisfied while holding lock flow_manager_ctrl_mutex. This can cause a deadlock if the notification happens before the lock is acquired.

CID 1638293: (#1 of 1): Indefinite wait (BAD_CHECK_OF_WAIT_COND)
dead_wait: A wait is performed without ensuring that the condition is not already satisfied while holding lock flow_recycler_ctrl_mutex. This can cause a deadlock if the notification happens before the lock is acquired.
3 months ago
Victor Julien f332b3e571 defrag: improve thread safety in config logging
CID 1554235: (#1 of 1): Data race condition (MISSING_LOCK)
missing_lock: Accessing defragtracker_spare_q.len without holding lock DefragTrackerStack_.m. Elsewhere, DefragTrackerStack_.len is written to with DefragTrackerStack_.m held 2 out of 2 times.
3 months ago
Victor Julien a472b24d17 datasets: use locking wrappers everywhere
To assist coverity, which got confused:

CID 1649393: (#1 of 1): Data race condition (MISSING_LOCK)
missing_lock: Accessing sets without holding lock sets_lock. Elsewhere, sets is written to with sets_lock held 2 out of 3 times.
3 months ago
Jason Ish ddb77d061e eve/schema: map mdns properties that have keywords
Also add descriptions for the EVE index.
3 months ago
Jason Ish 933127a9a8 rules: add mdns rules 3 months ago
Jason Ish 5f37fd4db0 .gitignore: don't ignore rule files in rules/
These are rules we want to track edits to, as well as new and removed
files.
3 months ago
Jason Ish 580a4445cd doc/install: use our recommended header order 3 months ago
Jason Ish 6b94689a44 doc/userguide: remove example with CentOS 7
CentOS 7 is EOL.

Ticket: #7749
3 months ago
Jason Ish 8ed506659d doc/userguide: break out package installation
Break out RPM, Debian, and Ubuntu package installation into their own
pages.

Also break out other distributions like "Arch" into an "Other" section
with a note about how those packages are not supported by the OISF.

Ticket: #6252
Ticket: #6069
3 months ago
Jason Ish 1de19ee94c doc/userguide: add appendix item on eve schema
Add some basic documentation on our EVE schema, mainly to show users
that it exists.
3 months ago
Jason Ish 6f20d87ba1 lua: don't accept a table as a return value from match
Remove the half finished support for accepting a table returned from a
Lua rule's match function. This is not documented, not tested, and not
really implemented.

Also, use lua_tointeger to get the return value from the match function
as an integer instead of a float.

Ticket: #6941
3 months ago
Jeff Lucovsky a300df4c4d detect/entropy: Clarify when entropy is logged
Clarify when entropy values are logged and associated with non-alert log
records.
3 months ago
Juliana Fajardini cbe621fb09 decode: add stats counters for ipv4/ipv6 over ipv4
These existed for ipv6 over ipv6, and ipv4 over ipv6, but not for the
ipv4 counterpart.

Task #7758
3 months ago
Juliana Fajardini fdf0fa30c6 decode/ipv6: set packet flow in ip-in-ip
Bug #7752
3 months ago
Jeff Lucovsky 4f9fa602fa detect/analyzer: Extend analyzer output with dsize value info
Issue: 6357
3 months ago
Eric Leblond 495a12fad7 datasets: remove useless NULL check
Coverity did detect that the cleaning code is only reached with
Dataset *set being initialized so the check is useless.

** CID 1649392:       Null pointer dereferences  (REVERSE_INULL)
/src/datasets-context-json.c: 719           in DatajsonGet()
>>>     Null-checking "set" suggests that it may be null, but it has
already been dereferenced on all paths leading to the check.

** CID 1649391:       Null pointer dereferences  (REVERSE_INULL)
/src/datasets.c: 526           in DatasetGet()
>>>     Null-checking "set" suggests that it may be null, but it has
already been dereferenced on all paths leading to the check.
3 months ago
Eric Leblond e947c4030c datasets: remove unreachable code
As the DatasetGetOrCreate function is called before the creation
of the hash, it will never be available so we can remove the
cleaning.
3 months ago
Philippe Antoine 9f83662f20 util/mpm: grow state queue on demand
Ticket: 7678
3 months ago
Philippe Antoine 679bd23cb7 util/mpm: factorize code 3 months ago
Philippe Antoine 330cff94e8 mpm: allocate StateQueue on the heap for ks
Completes commit 92fce2fdc0

Ticket: 6264
3 months ago
Jason Ish 4a0f278502 doc/install: windows build documentation
Ticket: #5911
3 months ago
Jason Ish 53961f66e9 configure: display if we have npcap support 3 months ago
Philippe Antoine bca6cbfb04 rust: fix prototype for AppLayerParserTriggerRawStreamInspection
Ticket: 7762

As it modifies the flow indeed
3 months ago
Philippe Antoine f8168493f6 rust: remove unnecessary cbindgen exclusions 3 months ago
Philippe Antoine 59a5b53809 util/mpm: constify arg
and make rust version use the correct integer type

Ticket: 7762
3 months ago
Jeff Lucovsky e8753b9ba7 util/mtu: Avoid excessive ioctls for MTU
Issue: 7643

Use the cached livedev MTU value, when available.
3 months ago
Boris Tonofa 97bfa3b108 pcap-log: fix memory leak on error paths after SCStrdup(prefix)
When PcapLogDataCopy() fails after duplicating pl->prefix,
the allocated 'prefix' string was not freed, leading to a leak.

Ticket: 7759
3 months ago
Jason Ish 17ed6f7b8e windows: use _tzname instead of tzname
tzname is a POSIX variable, WIN32 has prefixed many POSIX variables
with "_". While Mingw64 supports both, UCRT64 emits a compiler warning
on the usage of "tzname".

This triggered a rather large clang-format update.
3 months ago
Jason Ish 106e09ed57 github-ci: add windows ucrt build
MSYS2 now recommends the UCRT environment as the default, so we should
probably add a CI job for it.
3 months ago
Jason Ish f35a56fa65 doc/code-style: add rust; minor cleanups
- Add small section on Rust code, and Rust code exposed to FFI.
- Other minor cleanups.

Ticket: #7078
Ticket: #6955
3 months ago
Jason Ish 249bd32a9d doc/userguide/code-style: update header ordering
To match our recommended header ordering.
3 months ago
Shivani Bhardwaj 6a6104304d version: start development towards 8.0.0 3 months ago
Shivani Bhardwaj cdfebcdc9c release: 8.0.0-rc1; update changelog 3 months ago
Andreas Herz 173132b05b detect/dataset: skip adding localstatedir if fullpath is provided
When the option to set a full path is enabled and a full path is
provided, skip adding the prefix (based on localstatedir) to the
directory since it would be unexpected and unwanted by a user.

Ticket: 7083
3 months ago
Eric Leblond 8f26b4a0ff datajson: limit impact of feature for non user
The det_ctx structure was inflated by the additoin of the array to
handle JSON context. This commit updates the code to use a growing
buffer and limit the impact.
3 months ago
Victor Julien 36ecda3ea2 detect/alert: optimize context cleanup
Don't always loop over each alert, but only do so if context was used.
3 months ago
Jason Ish 25b8cd9761 lua: update to lua 5.4.8002
This updated crates remove tmpnam from being linked in, removing the
warning.
3 months ago
Victor Julien 77fb0a1e79 packet: micro optimization in packet recycling 3 months ago