Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple stream.bypass dependency from TLS encrypted bypass #9127

This pull request is big! We’re only showing the most recent 250 commits.

Commits on Dec 5, 2023

  1. Configuration menu
    Copy the full SHA
    6076b9e View commit details
    Browse the repository at this point in the history
  2. detect: remove redundant null setting

    de_ctx->dport_hash_table is already set to NULL in the fn
    DetectPortHashFree which is called right before this setting.
    Remove the redundant setting.
    inashivb authored and victorjulien committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    945ec4b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d8a887e View commit details
    Browse the repository at this point in the history
  4. detect/port: remove BUG_ON in favor of PORT_ER

    Either the BUG_ON condition would hit or PORT_ER. Prefer to return error
    in case of an error as the fn expects that.
    inashivb authored and victorjulien committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    8960a86 View commit details
    Browse the repository at this point in the history
  5. detect: remove misleading comment

    The comment seems to have come from the enum for addresses where IPv4
    and IPv6 matters.
    inashivb authored and victorjulien committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    77eb85e View commit details
    Browse the repository at this point in the history
  6. detect-engine: use ports only after edge case handling

    Also, add comments to clarify what's happening in the code.
    inashivb authored and victorjulien committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    c1bf955 View commit details
    Browse the repository at this point in the history
  7. pgsql: add unknonwn frontend message type

    We had unkonwn message type for the backend, but not the frontend
    messages. It's important to better identify those to improve pgsql
    probing functions.
    
    Related to
    Bug OISF#6080
    jufajardini authored and victorjulien committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    1ac5d97 View commit details
    Browse the repository at this point in the history
  8. pgsql: fix probing functions

    Some non-pgsql traffic seen by Suricata is mistankenly identified as
    pgsql, as the probing function is too generic. Now, if the parser sees
    an unknown message type, even if it looks like pgsql, it will fail.
    
    Bug OISF#6080
    jufajardini authored and victorjulien committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    4f85d06 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    afd6e4d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    53d29f6 View commit details
    Browse the repository at this point in the history
  11. pgsql: remove probe_ts function

    With the changes in the probing_ts function, this other one could become
    obsolete. Remove it, and directly call `parser::parse_request` when
    checking for gaps, instead.
    jufajardini authored and victorjulien committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    9aeeac5 View commit details
    Browse the repository at this point in the history
  12. ebpf: Update eBPF map to BTF defined map

    legacy map definition is removed from libbpf1.0+.
    update the legacy map definition to BTF defined map.
    
    Distros with < libbpf1.0 (0.5, 0.6, 0.7, 0.8) bpf_helpers.h
    support BTF map definition, this change does not break
    old libbpf and support new libpbf1.0+.
    
    Bug: OISF#6250
    
    Signed-off-by: Vincent Li <[email protected]>
    Co-authored-by: Victor Julien <[email protected]>
    vincentmli and victorjulien committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    64d12aa View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2023

  1. doc: add file.name information to http keyword doc

    Signed-off-by: jason taylor <[email protected]>
    jmtaylor90 authored and victorjulien committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    bbc17b1 View commit details
    Browse the repository at this point in the history
  2. doc: add file.name information to ftp keyword doc

    Signed-off-by: jason taylor <[email protected]>
    jmtaylor90 authored and victorjulien committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    bb1f757 View commit details
    Browse the repository at this point in the history
  3. doc: update ftp keyword doc example rule format

    Signed-off-by: jason taylor <[email protected]>
    jmtaylor90 authored and victorjulien committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    e4077b8 View commit details
    Browse the repository at this point in the history
  4. doc: add file.name information to smb keyword doc

    Signed-off-by: jason taylor <[email protected]>
    jmtaylor90 authored and victorjulien committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    327ba73 View commit details
    Browse the repository at this point in the history
  5. doc: add file.name information to nfs keyword doc

    Signed-off-by: jason taylor <[email protected]>
    jmtaylor90 authored and victorjulien committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    9d1ad01 View commit details
    Browse the repository at this point in the history
  6. doc: add file.name information to smtp keyword doc

    Signed-off-by: jason taylor <[email protected]>
    jmtaylor90 authored and victorjulien committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    fc81c99 View commit details
    Browse the repository at this point in the history
  7. pgsql: don't log password msg if password disabled

    If the logging of the password is disabled, there isn't much point in
    logging the password message itself.
    jufajardini authored and victorjulien committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    bdec2d8 View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2023

  1. util/time: Prevent usecs overflow

    This commit takes care of original seconds value and prevents the
    useconds field from overflowing pas its maximum value.
    
    Issue: 6372
    ilya-bakhtin authored and victorjulien committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    d3095ac View commit details
    Browse the repository at this point in the history
  2. napatech: Fix packet timestamps

    Initialize both seconds and useconds of packet timestamp from napatech
    timestamp format.
    
    This commit uses updated macro definitions from util-utime.h to avoid
    zero seconds value.
    
    Issue: 6372
    ilya-bakhtin authored and victorjulien committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    417806c View commit details
    Browse the repository at this point in the history
  3. util/time: Improve usecs handling in time macros

    Fix SCTIME_ADD_SECS zeroing subsecond part
    
    When adding s seconds to SCtime_t ts, don't zero out the ts.usecs field.
    
    Issue: 6584
    
    Fix SCTIME_FROM_TIMESPEC garbage microseconds part
    
    When converting nanosecond to microseconds divide by 1000 instead
    of multiplying by 1000.
    
    Issue: 6585
    sfd authored and victorjulien committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    0850e3d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a7c9028 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0ba4b29 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b1fa975 View commit details
    Browse the repository at this point in the history
  7. detect/content-inspect: assist branch prediction

    Hitting the recursion limit should be rare.
    victorjulien committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    1f265d9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b357532 View commit details
    Browse the repository at this point in the history
  9. detect/content-inspect: add entry for InspectionBuffer

    This is a convinience addition to abstract away the internals of
    the InspectionBuffer in keyword specific detection code.
    victorjulien committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    d73cce4 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c9ab95c View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6a01f40 View commit details
    Browse the repository at this point in the history
  12. detect/base64: move content inspection logic

    Integrate with rest of content inspect code.
    victorjulien committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    e9b33c4 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    97f78e1 View commit details
    Browse the repository at this point in the history
  14. detect/content-inspect: localize recursion counting

    Use stack local var instead of DetectEngineThreadCtx member. Instead
    setup a stack local struct that both counts and holds the limit. Make sure
    the limit is a const so we can avoid rereading it.
    
    This is part of an effort to reduce the size of the DetectEngineThreadCtx
    structure and reduce the number of memory writes to it. Additionally, it
    is part of an effect to reduce the number of places where detection
    tracks various forms of state.
    victorjulien committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    4cce7ba View commit details
    Browse the repository at this point in the history
  15. detect/content-inspect: flatten branches

    Flatten else branches after terminating ifs.
    victorjulien committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    c19d11f View commit details
    Browse the repository at this point in the history
  16. detect/isdataat: optimize recursion mismatches

    Since recursive content matching goes through the buffer from left to
    right, it is possible to bail early when isdataat is part of the
    recursive checking. If `isdataat:50,relative` fails for offset 10, it
    will surely also fail for offset 20. So break inspection in such cases.
    
    The exception is for dynamic isdataat, where the value is determined
    by a prior byte_extract that may be updated during the recursion.
    victorjulien committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    6db0256 View commit details
    Browse the repository at this point in the history
  17. detect/payload: remove unneeded pointer reset

    DetectEngineThreadCtx::replist is managed elsewhere.
    victorjulien committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    e2fbcf9 View commit details
    Browse the repository at this point in the history
  18. detect/bytemath: pass match ctx directly

    Adjust includes to enable this.
    victorjulien committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    5359170 View commit details
    Browse the repository at this point in the history
  19. detect: optimize struct layout

    Move reference count to top of DetectEngineThreadCtx, to move it to the
    same cache line as the other members that are checked first in Detect().
    victorjulien committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    0014077 View commit details
    Browse the repository at this point in the history
  20. detect/content-inspect: optimize struct layout

    Move members used by DetectEngineContentInspection() to the same cache line.
    victorjulien committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    06c8095 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    332c2ea View commit details
    Browse the repository at this point in the history
  22. github/action: fix Debian 12 intermittent failures

    Parallel builds caused issues during `cargo vendor`. So do just a single
    thread build.
    
     make[4]: Entering directory '/__w/suricata/suricata/rust'
    cbindgen --config /__w/suricata/suricata/rust/cbindgen.toml \
    	--quiet --output /__w/suricata/suricata/rust/dist/rust-bindings.h
    CARGO_HOME="/github/home/.cargo"  /usr/bin/cargo vendor
        Blocking waiting for file lock on package cache
        Blocking waiting for file lock on package cache
    ERROR: Couldn't execute `cargo metadata` with manifest "/__w/suricata/suricata/rust/Cargo.toml": Metadata(Output { status: ExitStatus(unix_wait_status(25856)), stdout: "", stderr: "    Blocking waiting for file lock on package cache\n    Blocking waiting for file lock on package cache\nerror: failed to download `adler v1.0.2`\n\nCaused by:\n  unable to get packages from source\n\nCaused by:\n  failed to parse manifest at `/github/home/.cargo/registry/src/github.com-1ecc6299db9ec823/adler-1.0.2/Cargo.toml`\n\nCaused by:\n  no targets specified in the manifest\n  either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present\n" })
    ERROR: Couldn't generate bindings for /__w/suricata/suricata/rust.
    make[4]: *** [Makefile:597: dist/rust-bindings.h] Error 1
    make[4]: *** Waiting for unfinished jobs....
    victorjulien committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    c82d934 View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2023

  1. doc: clarify IP-only with iprep

    inashivb authored and victorjulien committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    b9540df View commit details
    Browse the repository at this point in the history
  2. detect: rename SigAddressPrepare fns to SigPrepare

    There is nothing Address specific going on in the preparations.
    Stage 1: Preprocessing happens. Sigs classified as IP Only, Masks
    applied, content specific limits applied, etc and sig array built.
    Stage 2: Sigs grouped by IPOnly, ports and protocols.
    Stage 3: Decoder Events SGH built.
    Stage 4: File flags set, sig grouping done per prefilter, etc.
    inashivb authored and victorjulien committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    bd41b31 View commit details
    Browse the repository at this point in the history
  3. detect-engine: use bool return type

    inashivb authored and victorjulien committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    47c9a14 View commit details
    Browse the repository at this point in the history
  4. detect-engine: use flag SIG_FLAG_MPM_NEG

    The flag SIG_FLAG_MPM_NEG is set before whitelisting the rules. Make it
    better by checking for the flag in the beginning and return immediately.
    inashivb authored and victorjulien committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    3485880 View commit details
    Browse the repository at this point in the history
  5. detect/flowbits: remove DETECT_FLOWBITS_CMD_NOALERT

    DETECT_FLOWBITS_CMD_NOALERT is misleading as it gives an impression that
    noalert is a flowbit specific command that'll be used and dealt with at
    some point but as soon as noalert is found in the rule lang, signature
    flag for noalert is set and control is returned. It never gets added to
    cmd of the flowbits object.
    inashivb authored and victorjulien committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    75471dd View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2023

  1. http2: do not have leading space for response line

    Ticket: 6547
    catenacyber authored and victorjulien committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    1b5e04b View commit details
    Browse the repository at this point in the history
  2. cppcheck/detect: Address cppcheck memory leak

    Issue: 6527
    
    Ensure that the `map->string` memory isn't leaked following an error
    return from `HashListTableAdd`
    jlucovsky authored and victorjulien committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    8b2fd43 View commit details
    Browse the repository at this point in the history
  3. cppcheck: Address cpcheck report of an FP

    Issue: 6527
    
    Address the FP raised by cppcheck -- note that although the code
    corectly checks to ensure that `to_shift != &sb->reqion`, the logic was
    detected as a FP. Rework the code to eliminate the FP.
    jlucovsky authored and victorjulien committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    40e3514 View commit details
    Browse the repository at this point in the history
  4. clang-format.sh: prefer clang-format-14

    Add clang-format-14 as the preferred version, this is the default on
    Ubuntu 22.04.
    jasonish authored and victorjulien committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    5ebae1e View commit details
    Browse the repository at this point in the history
  5. github-ci/formatting: update to Ubuntu 22.04

    Update the formatting CI job to Ubuntu 22.04 to get a newer version of
    clang-format, in this case clang-format-14.
    jasonish authored and victorjulien committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    9307150 View commit details
    Browse the repository at this point in the history
  6. doc/userguide: update guidance on 5 to 6 upgrading

    TCP memory use can be higher than expected in certain configs.
    
    Ticket: OISF#6552.
    victorjulien committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    3456dea View commit details
    Browse the repository at this point in the history
  7. endace: Fix source-dag timestamps

    Bug: OISF#6618.
    
    Fix Endace ERF to SCTime_t timestamp conversion
    
    Fix typo preventing compilation with --enable-dag
    sfd authored and victorjulien committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    879db3d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    774f05d View commit details
    Browse the repository at this point in the history
  9. detect: rename DetectAppLayerMpmRegister2 to DetectAppLayerMpmRegister

    The old DetectAppLayerMpmRegister has not been around since 4.1.x.
    Rename the v2 of this function to a versionless function as there is no
    documentation referring to what the 2 means.
    jasonish authored and victorjulien committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    50be098 View commit details
    Browse the repository at this point in the history
  10. detect: rename DetectAppLayerInspectEngineRegister2

    Rename DetectAppLayerInspectEngineRegister2 to
    DetectAppLayerInspectEngineRegister as there is no other variant of
    this function, and the versioning with lack of supporting
    documentation can lead to confusion.
    jasonish authored and victorjulien committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    b11bb1c View commit details
    Browse the repository at this point in the history
  11. detect: rename InspectEngineFuncPtr2 to InspectEngineFuncPtr

    Version 1 of the API no longer exists.
    jasonish authored and victorjulien committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    66ff23f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    4620776 View commit details
    Browse the repository at this point in the history
  13. dns: rustfmt with latest stable

    jasonish authored and victorjulien committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    e2d7a7f View commit details
    Browse the repository at this point in the history
  14. dns: consolidate DNSRequest and DNSResponse to DNSMessage

    DNS request and response messages follow the same format so there is
    no reason not to use the same data structure for each. While its
    unlikely to see fields like answers in a request, the message format
    does not disallow them, so it might be interesting data to have the
    ability to log.
    jasonish authored and victorjulien committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    9464d0b View commit details
    Browse the repository at this point in the history
  15. dns: add dns.answer.name keyword

    This sticky buffer will allow content matching on the answer names.
    While ansers typically only occur in DNS responses, we allow the buffer
    to be used in request context as well as the request message format
    allows it.
    
    Feature: OISF#6496
    jasonish authored and victorjulien committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    5f99abb View commit details
    Browse the repository at this point in the history
  16. dns: add dns.query.name sticky buffer

    This buffer is much like dns.query_name but allows for detection in both
    directions.
    
    Feature: OISF#6497
    jasonish authored and victorjulien committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    482325e View commit details
    Browse the repository at this point in the history
  17. dns: replace usage of rs_dns_tx_get_query_name with SCDnsTxGetQueryName

    SCDnsTxGetQueryName was introduced to allow for getting the query name
    in responses as well as requests, so covers the functionality of
    rs_dns_tx_get_query_name.
    jasonish authored and victorjulien committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    f91122e View commit details
    Browse the repository at this point in the history
  18. doc/userguide: document dns.query.name, dns.answer.name

    With some other minor cleanups in the DNS keyword section.
    jasonish authored and victorjulien committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    c1a8dbc View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    97744b7 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    7d95c4c View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2023

  1. eve/stream: add sb main region size; segment count

    Gives more detail about memory use.
    victorjulien committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    0ab32be View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b8440a0 View commit details
    Browse the repository at this point in the history
  3. detect/analyzer: print int keyword values correctly

    To avoid negative values to be misrepresented.
    
    Bug: OISF#6615.
    victorjulien committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    de5b8ae View commit details
    Browse the repository at this point in the history
  4. detect/bytejump: don't reuse content flag

    To avoid future problems with overlapping flag values, give bytejump
    its own DETECT_BYTEJUMP_OFFSET_VAR flag.
    
    The values are currently not overlapping, so this patch should have
    no side effects.
    victorjulien committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    1014520 View commit details
    Browse the repository at this point in the history
  5. detect/bytejump: test cleanup

    Just one used during debugging.
    victorjulien committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    fb497bf View commit details
    Browse the repository at this point in the history
  6. detect/bytemath: bump length to uint32_t

    This puts the logic in line with the other payload inspection
    functions.
    victorjulien committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    83ed2c3 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    804a40e View commit details
    Browse the repository at this point in the history
  8. detect/byte: remove unneeded SIG_FLAG_APPLAYER sets

    Flag will be set during list(s) setup if needed.
    victorjulien committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    3ba8e2d View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2023

  1. pgsql: extract length validation into function

    This is called so many times that it seems to make sense that we use a
    function for this.
    jufajardini authored and victorjulien committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    7fa8bbf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7dcc2e7 View commit details
    Browse the repository at this point in the history
  3. pgsql: add cancel request message

    A CanceldRequest can occur after any query request, and is sent over a
    new connection, leading to a new flow. It won't take any reply, but, if
    processed by the backend, will lead to an ErrorResponse.
    
    Task OISF#6577
    jufajardini authored and victorjulien committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    30ac77c View commit details
    Browse the repository at this point in the history
  4. userguide/eve: explain pgsql requests & responses

    Add a more visible explanation of that requests, responses, frontend and
    and backend are, in Pgsql context, to avoid having to repeat that over
    different portions of the docs.
    jufajardini authored and victorjulien committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    bba3d4f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    467c3f2 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2023

  1. stats: always use tcp/udp prefix

    Even when on detection-only mode.
    So that we always have enip_tcp and enip_udp in stats
    and never just `enip`.
    
    Ticket: 6304
    catenacyber authored and victorjulien committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    4bcdc79 View commit details
    Browse the repository at this point in the history
  2. schema: adds missing modbus field

    ./stats/app_layer/error/modbus
    catenacyber authored and victorjulien committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f714678 View commit details
    Browse the repository at this point in the history
  3. stats: incr app-proto flow counter for detection-only

    Ticket: 6633
    catenacyber authored and victorjulien committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    3103505 View commit details
    Browse the repository at this point in the history
  4. pgsql: remove unused msg field

    The `ConsolidatedDataRow` struct had a `length` field that wasn't truly
    used.
    
    Related to
    Bug OISF#6389
    jufajardini authored and victorjulien committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    1afb485 View commit details
    Browse the repository at this point in the history
  5. feature: provide a Rust binding to the feature API

    As the feature module is not available for Rust unit tests, a mock
    version is also provided.
    jasonish authored and victorjulien committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    15ed51f View commit details
    Browse the repository at this point in the history
  6. requires: add requires keyword

    Add a new rule keyword "requires" that allows a rule to require specific
    Suricata versions and/or Suricata features to be enabled.
    
    Example:
    
      requires: feature geoip, version >= 7.0.0, version < 8;
      requires: version >= 7.0.3 < 8
      requires: version >= 7.0.3 < 8 | >= 8.0.3
    
    Feature: OISF#5972
    
    Co-authored-by: Philippe Antoine <[email protected]>
    2 people authored and victorjulien committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    5d5b050 View commit details
    Browse the repository at this point in the history
  7. requires: pre-scan rule for requires expressions

    Add a "pre-scan" rule parse that will check for requires statement. It
    will return a special error code (-4) if the requires fails due to
    missing requirements.
    
    Syntactic errors will also abort parsing here.
    
    Feature: OISF#5972
    jasonish authored and victorjulien committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    435c031 View commit details
    Browse the repository at this point in the history
  8. detect-parse: parse sid in pre-scan

    During the pre-scan for "requires", also parse the SID if possible. If
    the rule fails high level parsing (syntax), the SID will not be
    parsed.
    
    But every keyword other than "sid" and "requires" should expect to be
    provided with a parsed sid.
    jasonish authored and victorjulien committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    71bbba9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5cc872f View commit details
    Browse the repository at this point in the history
  10. stats: add rules skipped

    Rule skipped is a count of the number of rules that are skipped due to
    missing requirements.
    
    Feature: OISF#6637
    jasonish committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    b453eea View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2023

  1. mqtt: Move conf code to rust

    Issue: 6387
    
    This commit moves the configuration logic to Rust.
    jlucovsky authored and victorjulien committed Dec 28, 2023
    Configuration menu
    Copy the full SHA
    f12e026 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2024

  1. devguide: make 'contributing' a chapter

    This could be justified from a semantic point of view, and also can help
    in bringing more attention to where this information is, as it is less
    hidden, now.
    
    Also add Dev Guide as one of our resources in our Readme.
    jufajardini authored and victorjulien committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    08eb67f View commit details
    Browse the repository at this point in the history
  2. devguide: reorganize pr-workflow section

    This section seemed to aim both at PR reviewers and PR authors at the
    same time, even though some info is probably of low value for
    contributors.
    
    Created new section for PR reviewers and maintainers, and kept the info
    for PR authors separated. Also highlighted information on requested
    changes and stale PRs.
    jufajardini authored and victorjulien committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    71e4ca8 View commit details
    Browse the repository at this point in the history
  3. devguide: doc from behavior changes needs ticket #

    If a commit introduces code that changes Suricata behavior, the related
    documentation changes should go in a separate commit, but refer to the
    same ticket number.
    This reduces the chances of said changes being lost if there are backports
    while still keeping the backporting process a bit less bulky, for each
    commit.
    
    Related to
    Task OISF#6568
    jufajardini authored and victorjulien committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    de8bffd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9fbdfd2 View commit details
    Browse the repository at this point in the history
  5. devguide: update branches, refer to backports guide

    Update the list of active branches to include 7 renaming and new master,
    link to backports document.
    jufajardini authored and victorjulien committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    d15877b View commit details
    Browse the repository at this point in the history
  6. devguide: fix main channels list

    Sphinx and RtD sometimes render lists in weird ways. The communication
    channels list barely looked like one, at all...
    jufajardini authored and victorjulien committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    fc2acf8 View commit details
    Browse the repository at this point in the history
  7. rust: allow clippy::items_after_test_module

    As clippy began to complain about jsonbuilder.rs
    catenacyber authored and victorjulien committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    673d13d View commit details
    Browse the repository at this point in the history
  8. detect: case-insensitive comparison for requires

    Ticket: 6656
    catenacyber authored and victorjulien committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    d321838 View commit details
    Browse the repository at this point in the history
  9. devguide: explain example-rule container usage

    Have these options documented, so that whoever writes rule-related
    documentation can easily know what they could use to make the doc look
    better.
    jufajardini authored and victorjulien committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    a37fa62 View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2024

  1. doc: fix byte_test examples

    As this keyword has 4 mandatory arguments, and some examples
    had only three...
    
    Ticket: 6629
    catenacyber authored and victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    4933b81 View commit details
    Browse the repository at this point in the history
  2. pgsql: fix u16 overflow in query data_row

    Found by oss-fuzz with quadfuzz.
    
    Cf https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63113
    
    According to PostgreSQL documentation the maximum number of rows can be
    the maximum of tuples that can fit onto max u32 pages - 4,294,967,295 (cf
    https://www.postgresql.org/docs/current/limits.html). Some rough
    calculations for that indicate that this could go over max u32, so
    updating the data_row data type to u64.
    
    Bug OISF#6389
    jufajardini authored and victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    8d3de85 View commit details
    Browse the repository at this point in the history
  3. detect/profiling: improve pcap reading performance

    When reading a pcap, packet time can move much faster than wall
    clock time. This would trigger many more profile syncs than before.
    
    As the sync is using a lock to synchronize with other threads, this
    is an expensive operation.
    
    Bug: OISF#6619.
    
    Fixes: b591813 ("profiling/rules: reduce sync logic scope")
    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    bcb2b50 View commit details
    Browse the repository at this point in the history
  4. detect/content-inspect: use of replace keyword is rare

    Hint compiler about this.
    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    e3f2b34 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9dc35fb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    18dfa69 View commit details
    Browse the repository at this point in the history
  7. detect/pcre: localize match limit option parsing

    No need to put it into a per ctx flag.
    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    eca6639 View commit details
    Browse the repository at this point in the history
  8. detect/bytemath: fix u32 buffer size logic

    Remove u16 cast. Remove debug assert for u16 size.
    
    In 83ed2c3 the input was changed to
    u32
    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    3e8db97 View commit details
    Browse the repository at this point in the history
  9. detect/pcre: remove unused match member

    pcre2_match_data is created per thread when needed.
    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    f2e9c25 View commit details
    Browse the repository at this point in the history
  10. detect/bytetest: remove unused Match function

    All matching is done as part of content inspection.
    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    fd75aca View commit details
    Browse the repository at this point in the history
  11. detect/content-inspect: add negation tests

    Test mixing of negation, endswith and depth.
    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    222dcf7 View commit details
    Browse the repository at this point in the history
  12. detect: implement --qa-skip-prefilter

    Option meant for testing performance of rule engine w/o prefilter
    optimizations.
    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    bd66504 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    4558c5c View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ea5cf44 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    4a6a3dc View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    0172c01 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    18eafb6 View commit details
    Browse the repository at this point in the history
  18. detect/content: fix offset for negative distance

    Fix offset calculation on sigs with negative distance. Can lead to FN
    in certain cases.
    
    Bug: OISF#6661.
    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    2911656 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    2b3ec34 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    4f0f7b1 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    e06d2c4 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    88cc999 View commit details
    Browse the repository at this point in the history
  23. app-layer: micro optimization for AppProtoEquals

    Add most common condition first.
    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    fd4ca53 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    e4550be View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    91f153f View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    db24842 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    11bf60a View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    aad403d View commit details
    Browse the repository at this point in the history
  29. mpm/ac: pointer hygene

    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    96aee64 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    7b2d6b6 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    5c6089f View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    72841be View commit details
    Browse the repository at this point in the history
  33. detect/rule-header: use bool type

    Update frame prototype as well, to match already returned true/false values.
    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    44a8bf4 View commit details
    Browse the repository at this point in the history
  34. detect: remove DCERPC mask logic

    Added nothing over alproto check already in place.
    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    3b8ed93 View commit details
    Browse the repository at this point in the history
  35. detect: consolidate per rule group file loops

    Don't loop multiple times over the per group sig array.
    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    75c1b7f View commit details
    Browse the repository at this point in the history
  36. flow: minor optimization

    Most of the time FlowGetFlowFromHash will succeed.
    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    609cac5 View commit details
    Browse the repository at this point in the history
  37. eve/email: improve logging binary data

    Use jb_append_string_from_bytes() as it works better than
    BytesToString+jb_append_string when logging binary data.
    
    Bug: OISF#6664.
    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    f5565f4 View commit details
    Browse the repository at this point in the history
  38. eve/http: use numeric status code by default

    To avoid costly string operations.
    victorjulien committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    9a14d7a View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    1dcf69b View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2024

  1. detect: strip_pseudo_headers transform

    Ticket: 6546
    catenacyber authored and victorjulien committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    adf5e6d View commit details
    Browse the repository at this point in the history
  2. ipfw: close(2) instead shutdown(2) of the divert(4) socket

    The shutdown(2) syscall would always return ENOTCONN for FreeBSD 11,
    FreeBSD 12, FreeBSD 13 and FreeBSD 14.  It could do some action on the
    socket in the kernel in FreeBSD 10 and before, did not test.
    glebius authored and victorjulien committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    b239e88 View commit details
    Browse the repository at this point in the history
  3. rust: fix assertions_on_constants for assert!(true)

    Which will be optimized away by the compiler
    catenacyber authored and victorjulien committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    c49463c View commit details
    Browse the repository at this point in the history
  4. rust: fix assertions_on_constants for assert!(false)

    using panic! instead with a string message
    catenacyber authored and victorjulien committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    a8199bf View commit details
    Browse the repository at this point in the history
  5. rust: fix zero_prefixed_literal

    warning: this is a decimal constant
       --> src/mqtt/parser.rs:888:19
        |
    888 |             0x00, 06, /* Topic Length: 6 */
        |                   ^^
        |
    catenacyber authored and victorjulien committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    85329f5 View commit details
    Browse the repository at this point in the history
  6. rust: fix vec_init_then_push

    warning: calls to `push` immediately after creation
        --> src/pgsql/parser.rs:1179:9
         |
    1179 | /         let mut database_param: Vec<PgsqlParameter> = Vec::new();
    1180 | |         database_param.push(database);
         | |______________________________________^
    help: consider using the `vec![]` macro: `let database_param: Vec<PgsqlParameter> = vec![..];`
    catenacyber authored and victorjulien committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    9a84681 View commit details
    Browse the repository at this point in the history
  7. rust: fix single_match

    warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
       --> src/http2/parser.rs:882:17
        |
    882 | /                 match ctx.value {
    883 | |                     Some(_) => {
    884 | |                         panic!("Unexpected value");
    885 | |                     }
    886 | |                     None => {}
    887 | |                 }
        | |_________________^
    catenacyber authored and victorjulien committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    b141eb9 View commit details
    Browse the repository at this point in the history
  8. rust: fix single_binding

    error: this match could be written as a `let` statement
       --> src/nfs/nfs3_records.rs:747:9
        |
    747 | /         match result {
    748 | |             (r, request) => {
    749 | |                 assert_eq!(r.len(), 0);
    750 | |                 assert_eq!(request.handle, expected_handle);
    751 | |                 assert_eq!(request.name_vec, br#"bln"#);
    752 | |             }
    753 | |         }
        | |_________^
    catenacyber authored and victorjulien committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    259cdf1 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    bedd485 View commit details
    Browse the repository at this point in the history
  10. rust: update test_case crate

    fixes unused_unit
    
    warning: unneeded unit expression
       --> src/bittorrent_dht/parser.rs:590:5
        |
    590 | /     #[test_case(
    591 | |         b"",
    592 | |         "Error: discovered Dict but expected EOF" ;
    593 | |         "test parse bittorrent dht packet err 1"
    594 | |     )]
        | |______^
    catenacyber authored and victorjulien committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    6896a93 View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2024

  1. flow-bypass: Set bypass thread to running state

    When running Suricata in XDP bypass mode (bypass: yes),
    
    Suricata started up with error:
    Error: threads: thread "FB" failed to start in time: flags 0003
    
    "FB" thread does not transition from THV_INIT_DONE to THV_RUNNING.
    
    Set "FB" thread THV_RUNNING state in BypassedFlowManager().
    
    Bug: OISF#6254
    
    Signed-off-by: Vincent Li <[email protected]>
    vincentmli authored and victorjulien committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    f80d26d View commit details
    Browse the repository at this point in the history
  2. eve/schema: allow authorities in dns.answers in alert

    Factor out dns.authorities to a definition.
    jasonish authored and victorjulien committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    90ae3a2 View commit details
    Browse the repository at this point in the history
  3. conf/log: Remove sguil mode

    Issue: 6347
    jlucovsky authored and victorjulien committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    ff609f5 View commit details
    Browse the repository at this point in the history
  4. log/pcap: Remove sguil mode

    Issue: 6347
    
    Remove sguil-mode pcap logging capability.
    jlucovsky authored and victorjulien committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    9101878 View commit details
    Browse the repository at this point in the history
  5. doc/pcap-log: Remove squil documentation

    Issue: 6347
    jlucovsky authored and victorjulien committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    58f882d View commit details
    Browse the repository at this point in the history
  6. htp/swf: Remove flash deprecation notice

    Issue: 6605
    
    Flash decompression will remain so the deprecation notice is not needed.
    jlucovsky authored and victorjulien committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    995f5fc View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    778820b View commit details
    Browse the repository at this point in the history
  8. detect: remove unneeded size in DetectEngineCtx

    sig_array_size can easily be calculated with length and is only used at
    one place for debugging purposes. Remove it from the DetectEngineCtx
    struct to avoid making it unnecessarily heavy.
    inashivb authored and victorjulien committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    588af05 View commit details
    Browse the repository at this point in the history
  9. detect: make SigMatch.is_last bool

    It is used like bool so much so that nothing needs to be changed even
    after changing its type.
    inashivb authored and victorjulien committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    26b81ca View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2024

  1. source/erf-dag: compiler warnings

    Bug: OISF#6667.
    
    Fix compiler warnings for function pointer parameters missing const with --enable-dag
    sfd authored and victorjulien committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    c28cc93 View commit details
    Browse the repository at this point in the history
  2. dpdk: rework hugepage hints to use per-numa information

    Previous integration of hugepage analysis only fetched data
    from /proc/meminfo. However this proved to be often
    deceiving mainly for providing only global information and
    not taking into account different hugepage sizes (e.g. 1GB
    hugepages) and different NUMA nodes.
    
    Ticket: OISF#6419
    Lukas Sismis authored and victorjulien committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    ca6f7c2 View commit details
    Browse the repository at this point in the history
  3. dpdk: add interrupt (power-saving) mode

    When the packet load is low, Suricata can run in interrupt
    mode. This more resembles the classic approach of processing
    packets - CPU cores run low and only fetch packets
    on interrupt.
    
    Ticket: OISF#5839
    Lukas Sismis authored and victorjulien committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    2a28980 View commit details
    Browse the repository at this point in the history
  4. doc: remove references to prehistoric versions

    Remove references that are mentioning Suricata 3 or less
    As a note - only one Suricata 4 reference found:
    (suricata-yaml.rst:"In 4.1.x")
    Fast pattern selection criteria can be internally found by inspecting
    SupportFastPatternForSigMatchList and SigTableSetup functions.
    
    Ticket: OISF#6570
    Lukas Sismis authored and victorjulien committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    6e4cc79 View commit details
    Browse the repository at this point in the history
  5. userguide: clarify midstream exception policy

    The description of behavior when midstream is enabled and exception
    policy is set to ignore wasn't descriptive enough.
    
    Fix typos.
    jufajardini authored and victorjulien committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    df64448 View commit details
    Browse the repository at this point in the history
  6. smb: add smb.version keyword

    Ticket: OISF#5075
    
    Signed-off-by: jason taylor <[email protected]>
    zer1t0 authored and victorjulien committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    415722d View commit details
    Browse the repository at this point in the history
  7. smb: add smb.keyword documentation

    zer1t0 authored and victorjulien committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    a4901a1 View commit details
    Browse the repository at this point in the history
  8. rust: fix rustfmt warnings for smb detect

    Signed-off-by: jason taylor <[email protected]>
    jmtaylor90 authored and victorjulien committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    bfc0790 View commit details
    Browse the repository at this point in the history
  9. detect: update smb.version keyword

    Signed-off-by: jason taylor <[email protected]>
    jmtaylor90 authored and victorjulien committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    3cb7112 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2024

  1. detect/requires: reset sigerror flags for each rule

    "sigerror_ok" and "sigerror_requires" were not being reset after each
    rule which could lead to a rule load error being incorrectly tracked
    as skipped rather than failed.
    
    Also initialize "skippedsigs" to 0 along with "goodsigs" and
    "badsigs", while not directly related to this issue, could also throw
    off some stats.
    
    Ticket: OISF#6710
    jasonish committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    de3cbe4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8bf8131 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2024

  1. requirements: use libhtp 0.5.x

    Move to libhtp to the 0.5.x branch instead of 0.5.45.
    jasonish authored and victorjulien committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    c3b3c11 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2024

  1. detect: avoids case of useless detection on txs

    When a TCP flow packet has not led to app-layer updates,
    it is useless to run DetectRunTx, as there cannot be new
    matches.
    
    This happens for instance, when one side sends in a row multiple
    packets which are not acked (and thus not parsed in IDS mode).
    
    Doing so requires to move up the call to
    AppLayerParserSetTransactionInspectId
    so that it is run the same times DetectRunTx is run, and not in the
    case where the transaction was not updated.
    
    Ticket: 6299
    catenacyber authored and victorjulien committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    9240ae2 View commit details
    Browse the repository at this point in the history
  2. detect: merge sorted lists instead of qsort

    Ticket: OISF#6299
    
    Simply because it is faster (just linear).
    
    This is for merging match_array into tx_candidates
    catenacyber authored and victorjulien committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    5bb8800 View commit details
    Browse the repository at this point in the history
  3. detect: do not store state without flags

    If flags are zero, there is nothing to store and remember.
    
    Stored signatures will be reused on a later packet, and
    qsorted (which may be expensive), with newer matches candidates.
    
    Avoiding to store, leads to avoid the call to qsort.
    catenacyber authored and victorjulien committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    2fb5059 View commit details
    Browse the repository at this point in the history
  4. mqtt: fix logic when setting event

    Especially sets transactions to complete when we get a response
    without having seen the request, so that the transactions
    end up getting cleaned (instead of living/leaking in the state).
    
    Also try to set the event on the relevant transaction, instead
    of creating a new transaction just for the purpose of having
    the event.
    
    Ticket: OISF#6299
    catenacyber authored and victorjulien committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    89936b6 View commit details
    Browse the repository at this point in the history
  5. rust: make cargo clippy clean

    Fixing single_match and manual_find intertwined with SCLogDebug
    catenacyber authored and victorjulien committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    38db51b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d73ccd0 View commit details
    Browse the repository at this point in the history
  7. detect: integer keywords now support hexadecimal

    So that we can write enip.revision: 0x203
    
    Ticket: 6645
    catenacyber authored and victorjulien committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    3b65a2b View commit details
    Browse the repository at this point in the history
  8. detect: integer keywords now accept negated ranges

    Ticket: 6646
    catenacyber authored and victorjulien committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    06c5dd3 View commit details
    Browse the repository at this point in the history
  9. detect/integer: rust derive for enumerations

    Ticket: 6647
    
    Allows keywords using integers to use strings in signature
    parsing based on a rust enumeration with a derive.
    catenacyber authored and victorjulien committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    370ac05 View commit details
    Browse the repository at this point in the history
  10. detect: integer keywords now accept bitmasks

    Ticket: 6648
    
    Like &0x40=0x40 to test for a specific bit set
    catenacyber authored and victorjulien committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    d05f3ac View commit details
    Browse the repository at this point in the history
  11. doc: integer keywords

    Ticket: 6628
    
    Document the generic detection capabilities for integer keywords.
    and make every integer keyword pointing to this section.
    catenacyber authored and victorjulien committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    b8bc2c7 View commit details
    Browse the repository at this point in the history
  12. userguide: fix explanation about bsize ranges

    Our code handles Uint ranges as exclusive, but for bsize, our
    documentation stated that they're inclusive.
    
    Cf. from uint.rs:
    
        DetectUintMode::DetectUintModeRange => {
            if val > x.arg1 && val < x.arg2 {
                return true;
            }
        }
    
    Task OISF#6708
    jufajardini authored and victorjulien committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    244a35d View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2024

  1. util/streaming-buffer: remove unneeded fn param

    StreamingBuffer is not required to find the intersecting regions, so,
    don't pass it as a param to the fn.
    inashivb authored and victorjulien committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    8fc0faf View commit details
    Browse the repository at this point in the history
  2. detect: dns.opcode as first-class integer

    Ticket: 5446
    
    That means it can accept ranges
    catenacyber authored and victorjulien committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    f6e1a20 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6de885c View commit details
    Browse the repository at this point in the history
  4. detect: remove unused port in SigGroupHeadInitData

    port is not used and logically makes sense to not be in this struct as
    this struct is already referenced by DetectPort itself as a part of
    SigGroupHead.
    inashivb authored and victorjulien committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    264101b View commit details
    Browse the repository at this point in the history
  5. detect/engine: set max sig ID per SGH

    Present scenario
    ----------------
    Currently, as a part of setting signature count per SGH, a max_idx is
    passed which could be as high as the highest signature number (internal
    ID).
    
    Issue
    -----
    Not every SGH needs to evaluate all the signatures while setting
    the signature count or while creating the match_array.
    In a nonideal scenario, when say, there are 2 SGHs and one SGH has 2
    signatures and the other one has 60k, given the current scheme of
    evaluating max_idx, the max_idx will be set to 60k, and this shall
    later be passed on to SigGroupHeadSetSigCnt or
    SigGroupHeadBuildMatchArra which shall traverse over all the 60k sigs
    for either SGHs.
    
    Other info
    ----------
    This is a very fast operation as the internal arithmetic is done
    bitwise.
    
    Patch
    -----
    The functions SigGroupHeadSetSigCnt and SigGroupHeadBuildMatchArray can
    be optimized by storing the max signature id (internal) per SGH (which
    also seemed to be the initial intention as per fn comments).
    As a result of this, the sig_array is only walked up until the max sig
    id of that respective SGH.
    inashivb authored and victorjulien committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    395c74d View commit details
    Browse the repository at this point in the history
  6. detect: remove unneeded max_idx

    inashivb authored and victorjulien committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    7f89aaf View commit details
    Browse the repository at this point in the history
  7. detect: errors on 65k filestore signatures

    Errors when a detection engine gets 65k filestore signatures to
    avoid the hard limit to have 65k filestore per signature group
    head
    
    Ticket: OISF#6393
    catenacyber authored and victorjulien committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    db99c45 View commit details
    Browse the repository at this point in the history
  8. http2: handle reassembly for continuation frames

    Ticket: 5926
    
    HTTP2 continuation frames are defined in RFC 9113.
    They allow header blocks to be split over multiple HTTP2 frames.
    For Suricata to process correctly these header blocks, it
    must do the reassembly of the payload of these HTTP2 frames.
    Otherwise, we get incomplete decoding for headers names and/or
    values while decoding a single frame.
    
    Design is to add a field to the HTTP2 state, as the RFC states that
    these continuation frames form a discrete unit :
    > Field blocks MUST be transmitted as a contiguous sequence of frames,
    > with no interleaved frames of any other type or from any other stream.
    So, we do not have to duplicate this reassembly field per stream id.
    
    Another design choice is to wait for the reassembly to be complete
    before doing any decoding, to avoid quadratic complexity on partially
    decoding of the data.
    catenacyber authored and victorjulien committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    aff54f2 View commit details
    Browse the repository at this point in the history
  9. http1: remove transactions from their list

    instead of keeping a NULL pointer in an array
    
    Ticket: OISF#5921
    catenacyber authored and victorjulien committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    8f63a8f View commit details
    Browse the repository at this point in the history
  10. http1: configurable max number of live tx per flow

    Ticket: OISF#5921
    
    Co-authored-by: Jason Ish <[email protected]>
    2 people authored and victorjulien committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    4175680 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    8f73a0a View commit details
    Browse the repository at this point in the history
  12. smtp: avoid creating empty transaction

    Ticket: 6477
    
    So as to avoid ending up with too many empty transactions.
    
    This happens when Suricata sees a DATA command in the current
    transaction but did not have a confirmation response for it.
    Then, if Suricata receives another DATA command, it will
    create another new transaction, even if the previous one
    is empty. And so, a malicious client can create many empty
    transactions by just sending a repeated amount of DATA commands
    without having a confirmation code for them.
    
    Suricata cannot use state->current_command == SMTP_COMMAND_DATA
    to prevent this attack and needs to resort to a new boolean
    is_data because the malicious client may send another dummy command
    after each DATA command.
    
    This patch leaves only one call to SMTPTransactionCreate
    catenacyber authored and victorjulien committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    61f2e4e View commit details
    Browse the repository at this point in the history
  13. detect: fixes use-after-free with http.request_header

    Ticket: OISF#6441
    
    This keyword and the response one use a multiple inspection buffer.
    But the different instances point to the same memory address
    that comes from HttpHeaderGetBufferSpace and is not owned
    by the transaction, and is rebuilt, which is a functional
    bug in itself.
    
    As it gets crafted, it can get reallocated if one header
    is over 1024 bytes, while the previous freed pointer will still get
    used for the previous headers.
    catenacyber authored and victorjulien committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    bc422c1 View commit details
    Browse the repository at this point in the history
  14. pgsql: parse auth message within its bound

    If the next PDU is already in the slice next, do not use it and
    restrict ourselves to the length of this PDU.
    Avoids overconsumption of memory by quadratic complexity, when
    having many small PDUS in one big chunk being parsed
    
    Ticket: OISF#6411
    catenacyber authored and victorjulien committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    f52c033 View commit details
    Browse the repository at this point in the history
  15. pgsql: parse only PDU when type is unknown

    A next PDU may already be in the slice to parse.
    Do not skip its parsing, ie do not use rest, but take just
    the length of the pdu
    catenacyber authored and victorjulien committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    86de7cf View commit details
    Browse the repository at this point in the history
  16. http2: limit number of concurrent transactions

    Ticket: 6481
    
    Instead of just setting the old transactions to a drop state so
    that they get later cleaned up by Suricata, fail creating new ones.
    
    This is because one call to app-layer parsing can create many
    transactions, and quadratic complexity could happen in one
    single app-layer parsing because of find_or_create_tx
    catenacyber authored and victorjulien committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    80abc22 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2024

  1. ci: authors check using OISF repo

    As flagged critical by codescan
    catenacyber authored and victorjulien committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    7f5e98e View commit details
    Browse the repository at this point in the history
  2. rust: fix clippy ptr_arg warnings

    error: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
       --> src/dns/log.rs:371:29
        |
    371 | pub fn dns_print_addr(addr: &Vec<u8>) -> std::string::String {
        |                             ^^^^^^^^ help: change this to: `&[u8]`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
    catenacyber authored and victorjulien committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    68b0052 View commit details
    Browse the repository at this point in the history
  3. detect-http: add superfluous alloc check for cocci

    Add not-needed SCCalloc return check to satisfy our Cocci malloc
    checks as it can't see that the caller immediately checks the return
    value of this simple wrapper around SCCalloc.
    jasonish authored and victorjulien committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    f800ed0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b48ec8a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7e4dba7 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2024

  1. util/mime: fix memory leak

    Fix memory leak at util-decode-mime:MimeDecInitParser, which
    root cause is not-freeing allocated memory for mimeMsg
    
    Bug: OISF#6745
    jtstrs authored and victorjulien committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    231c892 View commit details
    Browse the repository at this point in the history
  2. netmap: Release lock to avoid deadlock

    Issue: 6755
    
    When NetmapOpen encounters an error opening the netmap device, it'll
    retry a bit. When the retry limit is reached, it'll shutdown Suricata.
    
    This commit ensures that the device list lock is not held when before
    closing all open devices before terminating Suricata.
    jlucovsky authored and victorjulien committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    364adee View commit details
    Browse the repository at this point in the history
  3. config/nss: Remove libnspr/libnss traces

    Issue: 6712
    jlucovsky authored and victorjulien committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    ee6208b View commit details
    Browse the repository at this point in the history
  4. config/jansson: Remove excess libjansson mentions

    Issue: 6712
    
    Remove multiple occurrences of libjansson installation packages.
    jlucovsky authored and victorjulien committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    9fe00ff View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2024

  1. multi-tenant: fix loader dead lock

    A dead lock could occur at start up, where a loader thread would
    get stuck on it's condition variable, while the main thread was
    polling the loaders task results.
    
    The vector to the dead lock is as follows:
    
    main	                        loader
    DetectEngineMultiTenantSetup
    -DetectLoaderSetupLoadTenant
    --DetectLoaderQueueTask
    ---lock loader
    ---add task
    ---unlock loader
    	                        lock loader
    	                        check/exec tasks
    	                        unlock loader
    ---wake up threads
    	                        lock ctrl mutx
    	                        cond wait ctrl
    	                        unlock ctrl
    -DetectLoadersSync
    --lock loader
    --check tasks
    --unlock loader
    
    Between the main thread unlocking the loader and waking up the
    threads, it is possible that the loader has already moved ahead
    but not yet entered its conditional wait. The main thread sends
    its condition signal, but since the loader isn't yet waiting on
    it the signal is ignored. Then when the loader does enter its
    conditional wait, the signal is not sent again.
    
    This patch updates the logic to send signals much more often.
    It also makes sure that the signal is sent under lock, as the
    API requires.
    
    Bug: OISF#6766.
    victorjulien committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    7956fa5 View commit details
    Browse the repository at this point in the history
  2. rust: weekly cargo audit and update

    Add GitHub actions to perform:
    
    - cargo audit: catch new warnings in dependendent packages
    - cargo update: catch updated dependencies that depend on a new MSRV
        than we use
    jasonish committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    edfda9f View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2024

  1. github-ci: move centos-7 build to its own workflow

    CentOS 7 requires older actions due to newer GitHub actions depending
    on a newer glibc. So move to its own workflow file so the main builds
    can move forward to newer versions of actions.
    jasonish authored and victorjulien committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    6922fef View commit details
    Browse the repository at this point in the history
  2. github-ci: use all cores available

    GitHub action Linux runners now have 4 cores, instead of hardcoding
    the number, use nproc to determine how many cores are available and
    use them.
    jasonish authored and victorjulien committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    8522256 View commit details
    Browse the repository at this point in the history
  3. github-ci: update {download,upload} artifact actions

    Multiple uploads can no longer use the same name, so give the cbindgen
    artifact its own name of "cbindgen". Requires an additional download
    for each build depending on this cbindgen artifact.
    jasonish authored and victorjulien committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    5bfaeb3 View commit details
    Browse the repository at this point in the history
  4. github-ci: update actions/cache

    jasonish authored and victorjulien committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    32d55fe View commit details
    Browse the repository at this point in the history
  5. github-ci: update actions/checkout

    jasonish authored and victorjulien committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    e786297 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    49834ea View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d5a3bfc View commit details
    Browse the repository at this point in the history
  8. github-ci: cancel previous job for all workflows

    Previously only enabled in build.yml, apply cancen-in-progress to all
    workflow files.
    jasonish authored and victorjulien committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    7c98134 View commit details
    Browse the repository at this point in the history
  9. github-actions: bump codecov/codecov-action from 3.1.1 to 4.0.1

    Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.1 to 4.0.1.
    - [Release notes](https://github.com/codecov/codecov-action/releases)
    - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
    - [Commits](codecov/codecov-action@d9f34f8...e0b68c6)
    
    ---
    updated-dependencies:
    - dependency-name: codecov/codecov-action
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    dependabot[bot] authored and victorjulien committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    be07d96 View commit details
    Browse the repository at this point in the history
  10. github-actions: bump github/codeql-action from 2 to 3

    Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
    - [Release notes](https://github.com/github/codeql-action/releases)
    - [Commits](github/codeql-action@v2...v3)
    
    ---
    updated-dependencies:
    - dependency-name: github/codeql-action
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    dependabot[bot] authored Feb 13, 2024
    Configuration menu
    Copy the full SHA
    7881e85 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2024

  1. codeql: add security-extended query suite

    Add the CodeQL security-extended suite to
    the CodeQL workflow configuration.
    0xEniola authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    f9a4e9c View commit details
    Browse the repository at this point in the history
  2. doc: add pcap file logging variable details

    Signed-off-by: jason taylor <[email protected]>
    jmtaylor90 authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    e891ef3 View commit details
    Browse the repository at this point in the history
  3. threads/mutex: Ensure mutex held before signaling

    Ensure that the mutex protecting the condition variable is held before
    signaling it. This ensures that the thread(s) awaiting the signal are
    notified.
    
    Issue: 6569
    jlucovsky authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    2a1a70b View commit details
    Browse the repository at this point in the history
  4. app-layer/template: use a max number of txs

    Ticket: 6773
    catenacyber authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    c99d93c View commit details
    Browse the repository at this point in the history
  5. http: code simplification

    removing function unused parameter tx_id in HTPFileOpen
    And using directly tx instead of its id in HTPFileOpenWithRange
    catenacyber authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    3a7a4cd View commit details
    Browse the repository at this point in the history
  6. dpdk: sanitize integer overflow in the configuration

    Ticket: OISF#6737
    Lukas Sismis authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    cc2eb2d View commit details
    Browse the repository at this point in the history
  7. dpdk: max cache size should be lower than one of the constraints

    Ticket: 6741
    Lukas Sismis authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    c65ff35 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    356f9ff View commit details
    Browse the repository at this point in the history
  9. security: update policy wrt CVE ID's

    To match that we'll now request CVE ID's ourselves as well,
    and we can do it for reported issues as well.
    
    See also:
    https://forum.suricata.io/t/security-new-cve-policy/4473
    victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    abbd507 View commit details
    Browse the repository at this point in the history
  10. github-ci: apply read-only permissions to more workflows

    - authors.yml
    - codeql.yml
    - scan-build.yml
    jasonish authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    a87943d View commit details
    Browse the repository at this point in the history
  11. dependabot: ignore actions/{cache,checkout} v3

    The CentOS 7 build requires older GitHub actions, try to make
    dependabot ignore these older versions.
    jasonish authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    c7cb3e9 View commit details
    Browse the repository at this point in the history
  12. dependabot: disable rust checks

    As we don't have a Cargo.toml and a Cargo.lock, dependabot for Rust
    hasn't been working correctly. Disable, as we now have our own cargo
    audit and update workflows.
    jasonish authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    5c686af View commit details
    Browse the repository at this point in the history
  13. github-ci: fix authors check with special characters

    Dependabot is always getting flagged as a new author even tho it uses
    a consistent author of:
    
    dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    
    But this doesn't work with plain grep. Fix by telling grep to treat
    the value as a fixed string instead of a regular expression.
    jasonish authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    2242d10 View commit details
    Browse the repository at this point in the history
  14. detect/tls.certs: fix direction handling

    Direction flag was checked against wrong field, leading to undefined behavior.
    
    Bug: OISF#6778.
    victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    3c06457 View commit details
    Browse the repository at this point in the history
  15. github-actions: bump github/codeql-action from 2.24.0 to 3.24.1

    Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.24.0 to 3.24.1.
    - [Release notes](https://github.com/github/codeql-action/releases)
    - [Commits](github/codeql-action@v2.24.0...v3.24.1)
    
    ---
    updated-dependencies:
    - dependency-name: github/codeql-action
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    dependabot[bot] authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    fa98c48 View commit details
    Browse the repository at this point in the history
  16. mqtt: Improve frame parsing w/mult. PDUs

    This commit improves the mqtt parsing of frames to handle multiple PDUs.
    
    Issue: 6592
    jlucovsky authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    f9a20da View commit details
    Browse the repository at this point in the history
  17. multi-tenant: fix coverity warning

    Rework locking logic to avoid the following coverity warning.
    
    ** CID 1591966:  Concurrent data access violations  (MISSING_LOCK)
    /src/detect-engine-loader.c: 475 in DetectLoadersSync()
    
        474                     SCCtrlMutexLock(loader->tv->ctrl_mutex);
        >>>     CID 1591966:  Concurrent data access violations  (MISSING_LOCK)
        >>>     Accessing "loader->tv" without holding lock "DetectLoaderControl_.m". Elsewhere, "DetectLoaderControl_.tv" is written to with "DetectLoaderControl_.m" held 1 out of 1 times (1 of these accesses strongly imply that it is necessary).
        475                     pthread_cond_broadcast(loader->tv->ctrl_cond);
        476                     SCCtrlMutexUnlock(loader->tv->ctrl_mutex);
    
    The warning itself is harmless.
    victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    2d7c3d8 View commit details
    Browse the repository at this point in the history
  18. ci: right sha for authors check

    catenacyber authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    41a6211 View commit details
    Browse the repository at this point in the history
  19. detect: respect directionality for filestore

    Ticket: 6617
    
    So that rules with keyword like `filestore:to_server,flow`
    only store the files to server and not the ones to client...
    
    Directionality only worked with the default scope, ie the
    current file, and not the scope tx or scope flow.
    For non-default scope, tx or flow, both directions were stored
    whatever the directionality specified.
    
    For these non-default scopes, this commit keeps a default
    of both directions, but use only one direction if specified.
    
    Need to split flag FLOWFILE_STORE per direction, so that Suricata
    can retain this (optional) directional info from the filestore
    keyword.
    
    Fixes: 79499e4 ("app-layer: move files into transactions")
    catenacyber authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    63caa0b View commit details
    Browse the repository at this point in the history
  20. detect-engine-iponly: improve ip list performance

    The runtime complexity of insertion sort is approx. O(h*n)^2 where
    h is the size of the HOME_NET and n is the number of ip only rules
    that use the HOME_NET.
    
    Replacing this with qsort significantly improves rule load time when
    a large HOME_NET is used in combination with a moderate amount of ip
    only rules.
    cccs-sadugas authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    17f9d7a View commit details
    Browse the repository at this point in the history
  21. stats: Do not expand dots of tm_name

    When an interface with dots is used, per worker stats are nested by the
    dot-separated-components of the interface due to the usage of
    OutputStats2Json().
    
    Prevent this by using OutputStats2Json() on a per-thread specific object
    and setting this object into the threads object using the
    json_object_set_new() which won't do the dot expansion.
    
    This was tested by creating an interface with dots in the name
    and checking the stats.
    
        ip link add name a.b.c type dummy
    
    With Suricata 7.0.2, sniffing on the a.b.c interface results in the
    following worker stats format:
    
        "threads": {
          "W#01-a": {
            "b": {
              "c": {
                "capture": {
                  "kernel_packets": 0,
    
    After this fix, the output looks as follows:
    
        "threads": {
          "W#01-a.b.c": {
            "capture": {
              "kernel_packets": 0,
    
    Ticket: OISF#6732
    awelzel authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    b8b8aa6 View commit details
    Browse the repository at this point in the history
  22. stats: Add unittest for basic stats serialization

    Main purpose is to validate that the 30 of bond0.30 isn't expanded into
    a nested object during serialization.
    awelzel authored and victorjulien committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    08db0f3 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2024

  1. multi-tenant: remove futile mutex lock

    No shared resource is being changed when the lock is held, it is
    immediately unlocked. So, remove it.
    inashivb authored and victorjulien committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    7477307 View commit details
    Browse the repository at this point in the history
  2. eve/stats: add description for common fields

    Ticket 6434
    inashivb authored and victorjulien committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    5a1a32b View commit details
    Browse the repository at this point in the history
  3. eve/stats: add description for applayer errors

    Ticket 6434
    inashivb authored and victorjulien committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    1816e98 View commit details
    Browse the repository at this point in the history
  4. eve/stats: add description for expectations

    Ticket 6434
    inashivb authored and victorjulien committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    8817514 View commit details
    Browse the repository at this point in the history
  5. eve/stats: add description for applayer flows

    Ticket 6434
    inashivb authored and victorjulien committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    487ba82 View commit details
    Browse the repository at this point in the history
  6. github-ci: use all cpus for coccinelle checks

    Also put "cocci" in the job name and install parallel so the script can
    actually run with concurrency.
    jasonish authored and victorjulien committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    6198ea5 View commit details
    Browse the repository at this point in the history
  7. cocci/run-check: log if parallel command is not found

    If CONCURRENCY_LEVEL was set, the script would log a concurrency level
    even if the parallel command was not available. Not log if parallel is
    not available and set concurrency to 1.
    jasonish authored and victorjulien committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    f7114b7 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2024

  1. stream: decouple stream.bypass dependency from tls bypass

    Decouple app.protocols.tls.encryption-handling and stream.bypass.
    There's no apparent reason why encrypted TLS bypass traffic should
    depend on stream bypass, as these are unrelated features.
    msdean committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    1c11a19 View commit details
    Browse the repository at this point in the history
  2. userguide: update encrypted traffic bypass

    Update documentation to reflect the new features and changes.
    msdean committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    6bddaef View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    84afef8 View commit details
    Browse the repository at this point in the history