Shivani Bhardwaj
bb1ed16408
src: check retval of VarNameStoreRegister
...
VarNameStoreRegister can return 0 in case of any error conditions.
Handle this case in all the users of this function. It is an unlikely
event so add branch assistance accordingly.
Bug 8054
9 months ago
Shivani Bhardwaj
6b3c21a4e6
detect/xbits: use correct Free fn
...
Most call sites use a casula SCFree fn to get rid of the DetectXbitsData
in case of an error. However, if a varname is also registered, that must
be unregistered too. Fix all the free calls by replacing them with the
appropriate DetectXbitFree fn.
9 months ago
Shivani Bhardwaj
13c8724ae0
detect/xbits: remove unneeded cast to check ptr validity
9 months ago
Shivani Bhardwaj
dad883406d
detect/xbits: use calloc to avoid undefined behavior
9 months ago
Shivani Bhardwaj
a23add0194
detect/lua: remove extra NULL check
...
The fn DetectLuaFree checks if the pointer (DetectLuaData) passed to it
is valid. So, the checks for NULL in the call sites can safely be
removed.
9 months ago
Shivani Bhardwaj
71339c459e
detect/flowvar: remove extra NULL check
...
The fn DetectFlowvarDataFree checks if the pointer (DetectFlowvarData)
passed to it is valid. So, the checks for NULL in the call sites can
safely be removed.
9 months ago
Shivani Bhardwaj
7c9fad27fc
detect/flowint: clean up free fn
9 months ago
Shivani Bhardwaj
bc8bf865ae
detect/flowint: remove extra NULL check
...
The fn DetectFlowintFree checks if the pointer (DetectFlowintData)
passed to it is valid. So, the checks for NULL in the call sites can
safely be removed.
9 months ago
Shivani Bhardwaj
59944c7787
detect/flowint: use calloc to avoid undefined behavior
9 months ago
Shivani Bhardwaj
e5994deb23
util/varname: check id before unregister
...
In case of an error a varname id is set to 0. Ideally, it shouldn't be
found in the hash table lookup but add a check anyway to avoid obtaining
the mutex lock and performing the lookup.
9 months ago
Victor Julien
ec65fd430e
exception-policy: rename 'reject-both' to 'rejectboth'
...
To align it with the rule action.
9 months ago
Andreas Dolp
fcbae97a1f
python/Makefile.am: fix file permissions of python/suricata/config/defaults.py
...
The install command, by default, sets 0755 if -m is not specified, so the
file python/suricata/config/defaults.py will be marked as an executable,
though it isn't.
9 months ago
dependabot[bot]
5f138891b2
github-actions: bump github/codeql-action from 3.30.5 to 4.31.2
...
Bumps [github/codeql-action](https://github.com/github/codeql-action ) from 3.30.5 to 4.31.2.
- [Release notes](https://github.com/github/codeql-action/releases )
- [Commits](https://github.com/github/codeql-action/compare/v3.30.5...v4.31.2 )
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-version: 4.31.2
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
9 months ago
dependabot[bot]
2609860884
github-actions: bump actions/download-artifact from 5.0.0 to 6.0.0
...
Bumps [actions/download-artifact](https://github.com/actions/download-artifact ) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases )
- [Commits](634f93cb29...018cc2cf5b )
---
updated-dependencies:
- dependency-name: actions/download-artifact
dependency-version: 6.0.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
9 months ago
dependabot[bot]
a6505395c6
github-actions: bump actions/upload-artifact from 4 to 5
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-version: '5'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
9 months ago
Jason Ish
cdd4ea0f11
doc/devguide: document eve callback
...
Document the callback for adding additional data to EVE.
Ticket: #4708
9 months ago
Jason Ish
9fffc09ad7
doc/devguide: document eve file types
...
Ticket: #4708
9 months ago
Philippe Antoine
7447651fa0
output/jsonbuilder: helper function SCJbSetPrintAsciiString
...
To replace C PrintStringsToBuffer and avoid a stack alloc
+ copy
Ticket: 8004
9 months ago
Jason Ish
7e705269e0
requirements.txt: use suricata-update master
...
Master makes sense for Suricata main branch as we are on a ways out on a
release.
9 months ago
Victor Julien
52fd61dffd
lua: remove luajit pushlstring workaround
...
81ee6f5aad ("lua: push correct length back through ScFlowvarGet, work around valgrind warning")
added a workaround for valgrind warnings in pushing a string buffer
into the lua state. This is no longer needed as tested with both
address sanitizer and valgrind.
9 months ago
Li Heng
1106323ae1
rust/sip: delete redundant computing codes
...
Delete call of is_alphanumeric where is_alphanumeric and
is_token_char are called together. Four places are modified.
Ticket: 8003
9 months ago
Victor Julien
0c4a8fd183
doc/userguide: document reject-both expection policy
...
Ticket: #5974 .
9 months ago
Victor Julien
acb769291a
exception-policy: add 'reject-both' option
...
Allow rejecting both sides of a connection. Has the same support
as regular reject (which is essentially rejectsrc).
Ticket: #5974 .
9 months ago
Juliana Fajardini
6b75b937ff
output/eve: fix typos
...
To accompany documentation work done in
Task #4708
9 months ago
Jhonny Sousa
051bc324d6
detect/base64_data: Convert unittests to FAIL/PASS API
...
Ticket: #6320
9 months ago
Jason Ish
1efe70a234
rust/ike: convert to nom 8
...
Ticket: #8050
9 months ago
Jason Ish
f368324e87
rust/mime: convert to nom 8
...
Ticket: #8048
9 months ago
Jason Ish
c5ef615953
rust/mqtt: convert to nom 8
...
Ticket: #8047
9 months ago
Jason Ish
2289069f74
rust/websocket: convert to nom 8
...
Ticket: #8046
9 months ago
Jason Ish
9eeefd0684
rust/bt-dht: convert to nom 8
...
Ticket: #8045
9 months ago
Jason Ish
399f96b07d
rust/rdp: convert to nom 8
...
Ticket: #8044
9 months ago
Jason Ish
7c70f74942
rust/telnet: convert to nom 8
...
Ticket: #8043
9 months ago
Jason Ish
2ff2eb1325
rust/ssh: convert to nom 8
...
Ticket: #8042
9 months ago
Jason Ish
baa22287b8
rust/rfb: convert to nom 8
...
Ticket: #8041
9 months ago
Jason Ish
dcfe247467
rust/pgsql: convert to nom 8
...
Ticket: #8039
9 months ago
Jason Ish
d25286e77a
rust/enip: convert to nom 8
...
Ticket: #8038
9 months ago
Jason Ish
d74f8522ee
rust/tftp: convert to nom 8
...
Ticket: #8037
9 months ago
Jason Ish
4b09622ebc
rust/dhcp: convert to nom 8
...
Ticket: #8036
9 months ago
Philippe Antoine
854201703e
util/var: add NULL check in VarNameStoreRegister
...
And check return value in entropy keyword setup
9 months ago
Philippe Antoine
6d703af505
detect: fix null deref with entropy keyword
...
Ticket: 7959
Usage of entropy with base64_data led to NULL dereference
9 months ago
Jason Ish
65e7e93f88
detect/http2: call correct free function on errors
...
Fix cases where the wrong free function was being called in error
handlers.
DetectHTTP2sizeUpdateSetup was calling DetectHTTP2settingsFree instead
of DetectHTTP2sizeUpdateFree in error case.
Moving http2.priority and http2.window to multi-integers, instead
of basic integers only modified the Free callback, but the
Setup function was still using the direct call to old obsolete free
function.
Using the callback Free abstration in Setup, allows to be
consistent and have less code to change.
9 months ago
Amir Boussejra
56c8db6cb6
flow-timeout: Use yaml config value for CAPTURE_BYPASSED flow
...
Instead of non configurable constant FLOW_BYPASSED_TIMEOUT
Ticket: #8014
10 months ago
Philippe Antoine
772bd9ca53
rust: reduce visibility of detect_parse_uint_notending
...
It is meant as an internal function
Also document the function
10 months ago
Philippe Antoine
b636dffd5b
detect: urilen keyword fails on trailing junk
...
Fails especailly on 1<>2 which looks like a range, but is invalid
as too small, and ended up being accepted as =1
Ticket: 8028
10 months ago
Philippe Antoine
2e9027fd5a
plugins: update SC_API_VERSION to 9
...
So that plugins built for 8 will fail to load with 9 as there
were already breaking changes in the structures and functions
prototypes
10 months ago
Jhonny Sousa
9935af67d6
detect/filestore: Convert unittest to new FAIL/PASS API
...
Ticket: #6317
10 months ago
Jason Ish
16d313cb8b
rust/applayertemplate: convert to nom 8
...
Ticket: #8027
10 months ago
Jason Ish
f0f4d88119
rust/sip+sdp: update to nom 8
...
Done together as there is a dependence of SDP by SIP.
Ticket: #8025
10 months ago
Jason Ish
58564a4b0e
rust/ftp: update to nom 8
...
Ticket: #8026
10 months ago
Jason Ish
54cc97b78e
rust/dns: convert to nom 8.0
...
Ticket: #8024
10 months ago