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

Backports 5.0.x V2 Batched backports of several issues #4723

Closed
wants to merge 48 commits into from

Commits on Jan 29, 2020

  1. flow: expose last time as a function

    This function returns the individual components
    of the timeval in output pointers making it suitable
    for use over Rust FFI.
    jasonish authored and victorjulien committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    95a408f View commit details
    Browse the repository at this point in the history
  2. smb: handle file transactions post-GAP

    After a GAP all normal transactions are closed. File transactions
    are left open as they can handle GAPs in principle. However, the
    GAP might have contained the closing of a file and therefore it
    may remain active until the end of the flow.
    
    This patch introduces a time based heuristic for these transactions.
    After the GAP all file transactions are stamped with the current
    timestamp. If 60 seconds later a file has seen no update, its marked
    as closed.
    
    This is meant to fix resource starvation issues observed in long
    running SMB sessions where packet loss was causing GAPs.
    victorjulien committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    060781c View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2020

  1. Configuration menu
    Copy the full SHA
    36902ba View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2020

  1. defrag: set livedev on the reassembled packet (issue-3380)

    Set the livedev on reassembled packets to that of the parent
    packet. Fixes issues with multidetect, specifically a segfault
    as reported in issue 3380.
    
    Bug OISF#3380.
    
    (cherry picked from commit d1eab5a)
    jasonish authored and victorjulien committed Feb 10, 2020
    Configuration menu
    Copy the full SHA
    8a6d4ba View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2020

  1. afl: fix compilation

    (cherry picked from commit f05c12b)
    victorjulien committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    43ee9d8 View commit details
    Browse the repository at this point in the history
  2. init: Fix dropping privileges in nflog runmode

    Using the run-as configuration option with the nflog capture method
    results in the following error during the startup of suricata:
    [ERRCODE: SC_ERR_NFLOG_BIND(248)] - nflog_bind_pf() for AF_INET failed
    
    This is because SCDropMainThreadCaps does not have any capabilities
    defined for the nflog runmode (unlike other runmodes). Therefore, apply
    the same capabilities to the nflog runmode that are already defined for
    the nfqueue runmode. This has been confirmed to allow suricata start
    and drop its privileges in the nflog runmode.
    
    Fixes redmine issue OISF#3265.
    
    Signed-off-by: Timo Sigurdsson <public_timo.s@silentcreek.de>
    (cherry picked from commit 1262ecb)
    silentcreek authored and victorjulien committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    e1b363b View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2020

  1. Configuration menu
    Copy the full SHA
    72858ac View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6865043 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bd3fac7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    04d546d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5067357 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ff1076e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    966df16 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0fce017 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3ee1f57 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d635eab View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    67d53f9 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    e8573f4 View commit details
    Browse the repository at this point in the history
  13. proto: fix globals use

    victorjulien committed Feb 12, 2020
    Configuration menu
    Copy the full SHA
    11a97da View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    89757fe View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    15ad0d5 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    471bb2d View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    9985cc2 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    ac800d0 View commit details
    Browse the repository at this point in the history
  19. nfs: implement post-GAP transaction cleanup

    Close all prior transactions in the direction of the GAP, except the
    file xfers. Those use their own logic described below.
    
    After a GAP all normal transactions are closed. File transactions
    are left open as they can handle GAPs in principle. However, the
    GAP might have contained the closing of a file and therefore it
    may remain active until the end of the flow.
    
    This patch introduces a time based heuristic for these transactions.
    After the GAP all file transactions are stamped with the current
    timestamp. If 60 seconds later a file has seen no update, its marked
    as closed.
    
    This is meant to fix resource starvation issues observed in long
    running SMB sessions where packet loss was causing GAPs. Due to the
    similarity of the NFS and SMB parsers, this issue is fixed for NFS
    as well in this patch.
    
    Bug OISF#3424.
    Bug OISF#3425.
    
    (cherry picked from commit f68c255)
    victorjulien committed Feb 12, 2020
    Configuration menu
    Copy the full SHA
    908ba0f View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2020

  1. stream/reassembly: fix data overlap check

    Fix function CheckOverlap bug.
    
    (cherry picked from commit 2456f27)
    vanlink authored and victorjulien committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    61e938f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8ad874e View commit details
    Browse the repository at this point in the history
  3. version: release 5.0.2

    victorjulien committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    fd3c7d5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    988e74d View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2020

  1. stream: fix direction flags in corner case

    When a TCP DNS flow would start with a GAP on the TS side, the successful
    protocol detection on the TC side would trigger 'opposing side' reassembly
    and app-layer processing. In this case the stream flags would indicate the
    wrong direction and the wrong parser would be called.
    
    (cherry picked from commit efee458)
    victorjulien authored and jlucovsky committed Mar 22, 2020
    Configuration menu
    Copy the full SHA
    306adf2 View commit details
    Browse the repository at this point in the history
  2. dag: Skip over ERF_TYPE_META records

    Suricata generates an error on unrecognised ERF types.
    Suricata should ignore ERF 'Provenance' records with ERF_TYPE_META.
    
    (cherry picked from commit 47082dd)
    sfd authored and jlucovsky committed Mar 22, 2020
    Configuration menu
    Copy the full SHA
    1661248 View commit details
    Browse the repository at this point in the history
  3. smtp/mime: Restrict file name lengths

    This commit places restrictions on the length of the file name specified
    in attachments (`name=` or `filename=`) to `NAME_MAX`. Names exceeding
    these limits will be truncated and processing will continue with the
    truncated name.
    
    (cherry picked from commit d0d20bd)
    jlucovsky committed Mar 22, 2020
    Configuration menu
    Copy the full SHA
    6e69781 View commit details
    Browse the repository at this point in the history
  4. smtp/mime: Set event when name exceeds limit

    (cherry picked from commit 130b8d2)
    jlucovsky committed Mar 22, 2020
    Configuration menu
    Copy the full SHA
    f02ee89 View commit details
    Browse the repository at this point in the history
  5. smtp/mime: Fix typos

    (cherry picked from commit 9a33b5d)
    jlucovsky committed Mar 22, 2020
    Configuration menu
    Copy the full SHA
    96c1a3e View commit details
    Browse the repository at this point in the history
  6. mime: Test cases for filename length limit

    (cherry picked from commit c92975e)
    jlucovsky committed Mar 22, 2020
    Configuration menu
    Copy the full SHA
    821e43c View commit details
    Browse the repository at this point in the history
  7. util-error: define SC_ERR_PCRE_COPY_SUBSTRING

    (cherry picked from commit bcea730)
    jlucovsky committed Mar 22, 2020
    Configuration menu
    Copy the full SHA
    174e3f3 View commit details
    Browse the repository at this point in the history
  8. spelling: Fix spelling error

    (cherry picked from commit 6d94b09)
    jlucovsky committed Mar 22, 2020
    Configuration menu
    Copy the full SHA
    7a6e616 View commit details
    Browse the repository at this point in the history
  9. detect/ssl_state: Fix memory leaks from pcre_get_substring

    This commit replaces usages of pcre_get_substring with
    pcre_copy_substring to avoid leaking memory on error conditions.
    
    (cherry picked from commit 6c35039)
    jlucovsky committed Mar 22, 2020
    Configuration menu
    Copy the full SHA
    6597959 View commit details
    Browse the repository at this point in the history
  10. detect/flowvar: Fix memory leaks from pcre_get_substring

    This commit replaces usages of pcre_get_substring with
    pcre_copy_substring to avoid leaking memory on error conditions.
    
    (cherry picked from commit 9fe51a8)
    jlucovsky committed Mar 22, 2020
    Configuration menu
    Copy the full SHA
    cd89363 View commit details
    Browse the repository at this point in the history
  11. detect/filestore: Fix memory leaks from pcre_get_substring

    This commit replaces usages of pcre_get_substring with
    pcre_copy_substring to avoid leaking memory on error conditions.
    
    (cherry picked from commit c2071e1)
    jlucovsky committed Mar 22, 2020
    Configuration menu
    Copy the full SHA
    e57637e View commit details
    Browse the repository at this point in the history
  12. doc: Correct RST quote usage

    Corrects misplaced backticks preventing proper formatting of `mpm-algo`
    section.
    
    (cherry picked from commit 8c132c0)
    jlucovsky committed Mar 22, 2020
    Configuration menu
    Copy the full SHA
    14a789f View commit details
    Browse the repository at this point in the history
  13. decode: Fix typos/spelling

    (cherry picked from commit 427ec4e)
    (cherry picked from commit ed6c976)
    jlucovsky committed Mar 22, 2020
    Configuration menu
    Copy the full SHA
    8d946d7 View commit details
    Browse the repository at this point in the history
  14. decode: Handle ERSPAN Type I

    (cherry picked from commit aec4e9a)
    (cherry picked from commit e00de3d)
    jlucovsky committed Mar 22, 2020
    Configuration menu
    Copy the full SHA
    237964a View commit details
    Browse the repository at this point in the history
  15. decode/erspan: ERSPAN TypeI configurable

    For the backport, ERSPAN TypeI decode is
    
    1. Disabled by default
    2. Configurable: `decoder.erspan_typeI.enabled`
    
    (cherry picked from commit ae6beed)
    jlucovsky committed Mar 22, 2020
    Configuration menu
    Copy the full SHA
    33b56b3 View commit details
    Browse the repository at this point in the history
  16. detect/parse: move spaces skip up the stack

    Switch to isspace() as well.
    
    (cherry picked from commit 52970d8)
    catenacyber authored and jlucovsky committed Mar 22, 2020
    Configuration menu
    Copy the full SHA
    a3a2ea0 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2020

  1. doc: adds doc for ipv4.hdr signature keyword

    (cherry picked from commit 0715e13)
    catenacyber authored and jlucovsky committed Mar 23, 2020
    Configuration menu
    Copy the full SHA
    52a7358 View commit details
    Browse the repository at this point in the history
  2. doc: Remove bitmask documentation

    This commit removes documentation for the never-implemented bitmask
    option for the `byte_jump` and `byte_test` keywords.
    jlucovsky committed Mar 23, 2020
    Configuration menu
    Copy the full SHA
    3d7f654 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    db6edbc View commit details
    Browse the repository at this point in the history