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 b2 6 0 3/v1 #6186

Merged
merged 7 commits into from
Jun 14, 2021
Merged

Conversation

jasonish and others added 7 commits June 8, 2021 16:13
As part of commit ea15282,
some initialization was moved to happen even in unix socket mode,
however, this initialization does setup some loggers that can only have
one instance enabled (anomaly, drop, file-store).

This will cause these loggers to error out on the first pcap, but work
on subsequent runs of the pcap as some deinitialization is done after
each pcap.

This fix just runs the post pcap-file deinitialization routine to
reset some of the initialization done on startup, like is done after
running each pcap in unix socket mode.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/4225

Additionally this prevents alerts from being logged two times
on the first run of a pcap through the unix socket:

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/4434

(cherry picked from commit 488d5fb)
This especially allows for SSH bypass to work

(cherry picked from commit fdab22d)
Remove packet pointer from SigGetThresholdTypeIter() as it is
unused.

(cherry picked from commit b0b4fab)
Fix syntax of if statement in SigGetThresholdTypeIter()

(cherry picked from commit f47e437)
th_entry is resized using ThresholdHashRealloc() every time a rule with
a threshold using by_rule tracking is added. The problem is that this is
done before the rules are reordered, so occasionally a rule with by_rule
tracking gets a higher signature number (after reordering) than the
number of th_entries allocated, causing Suricata to crash.

This commit fixes this by allocating th_entries after all the rules are
loaded and reordered.

Backtrace from core dump:

  Program terminated with signal SIGSEGV, Segmentation fault.

  #0  0x000000000051b381 in ThresholdHandlePacket (p=p@entry=0x7fb0080f3960, lookup_tsh=0x51, new_tsh=new_tsh@entry=0x7fb016c316e0, td=td@entry=0x14adedf0, sid=9800979, gid=1, pa=0x7fb0080f3b18)
      at detect-engine-threshold.c:415
  415>----                if (TIMEVAL_DIFF_SEC(p->ts, lookup_tsh->tv1) < td->seconds) {

Bug OISF#4503.

(cherry picked from commit 2a32642)
That may not be the case in midstream/async configurations

(cherry picked from commit d00b755)
@inashivb inashivb requested review from jasonish, victorjulien and a team as code owners June 8, 2021 16:21
@victorjulien victorjulien merged commit 88c5e12 into OISF:master-6.0.x Jun 14, 2021
@inashivb inashivb deleted the backports-b2-6-0-3/v1 branch June 19, 2021 09:20
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jun 29, 2023
Ticket: OISF#6186

clang warns and errors on 64 to 32 bits integer conversion
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jun 29, 2023
Ticket: OISF#6186

Warnings about downcast from 64 to 32 bits
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jun 30, 2023
Ticket: OISF#6186

Warnings about downcast from 64 to 32 bits
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 6, 2023
Ticket: OISF#6186

clang warns and errors on 64 to 32 bits integer conversion
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 6, 2023
Ticket: OISF#6186

Warnings about downcast from 64 to 32 bits
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 7, 2023
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 7, 2023
Ticket: OISF#6186

clang warns and errors on 64 to 32 bits integer conversion
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 7, 2023
Ticket: OISF#6186

Warnings about downcast from 64 to 32 bits
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 7, 2023
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 10, 2023
Ticket: OISF#6186

Warnings about downcast from 64 to 32 bits
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 10, 2023
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 19, 2023
Ticket: OISF#6186

clang warns and errors on 64 to 32 bits integer conversion
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 19, 2023
Ticket: OISF#6186

Warnings about downcast from 64 to 32 bits
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 19, 2023
catenacyber added a commit to catenacyber/suricata that referenced this pull request Sep 19, 2023
Ticket: OISF#6186

Warnings about downcast from 64 to 32 bits
catenacyber added a commit to catenacyber/suricata that referenced this pull request Sep 19, 2023
catenacyber added a commit to catenacyber/suricata that referenced this pull request Sep 19, 2023
catenacyber added a commit to catenacyber/suricata that referenced this pull request Sep 19, 2023
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 9, 2024
victorjulien pushed a commit to victorjulien/suricata that referenced this pull request Jul 9, 2024
victorjulien pushed a commit to victorjulien/suricata that referenced this pull request Jul 9, 2024
victorjulien pushed a commit to victorjulien/suricata that referenced this pull request Jul 9, 2024
victorjulien pushed a commit to victorjulien/suricata that referenced this pull request Jul 9, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 17, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 17, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 17, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 17, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 17, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 17, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 19, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 19, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 19, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 29, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Jul 29, 2024
victorjulien pushed a commit to victorjulien/suricata that referenced this pull request Jul 31, 2024
victorjulien pushed a commit to victorjulien/suricata that referenced this pull request Jul 31, 2024
victorjulien pushed a commit to victorjulien/suricata that referenced this pull request Aug 1, 2024
victorjulien pushed a commit to victorjulien/suricata that referenced this pull request Aug 1, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Sep 2, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Sep 2, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Sep 3, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Sep 3, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Oct 8, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Oct 8, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Oct 13, 2024
catenacyber added a commit to catenacyber/suricata that referenced this pull request Oct 13, 2024
victorjulien pushed a commit to victorjulien/suricata that referenced this pull request Oct 14, 2024
victorjulien pushed a commit to victorjulien/suricata that referenced this pull request Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants