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

Next/20210212/v7 #5840

Merged
merged 19 commits into from
Feb 12, 2021
Merged

Next/20210212/v7 #5840

merged 19 commits into from
Feb 12, 2021

Conversation

victorjulien
Copy link
Member

#5833
124fd94
#5827
#5816
#5805
#5834
13700b6
ef53224
#5838 minus the network layers fix

#5839 with formatting fixes

victorjulien and others added 19 commits February 3, 2021 14:09
Fix a 'skipped' transaction early in the list leading to all further
transactions getting skipped, even if they were fully processed and
ready to be cleaned up.
Sleep 250 microseconds instead of 100 as running in KVM cause the
old value to use 100% CPU for these threads.

Perf testing suggests no measurable impact for the non-KVM case.

Ticket: OISF#4096
In some cases, the InspectionBufferGet function would be followed by
a failure to set the buffer up, for example due to a HTTP body limit
not yet being reached. Yet each call to InspectionBufferGet would lead
to the matching list_id to be added to the
DetectEngineThreadCtx::inspect.to_clear_queue. This array is sized to
add each list only once, but in this case the same id could be added
multiple times, potentially overflowing the array.
This commit corrects the validation check between the number of
variables used and the number of specified capture groups.
This will prevent JSON entries like the following that occur
with the dedault configuration (ja3 deactivated and extended
tls ouput activated):

  "tls": {
    "subject": "C=GB, ST=London, L=London, O=Global Security, OU=IT Department, CN=example.com",
    "issuerdn": "C=GB, ST=London, L=London, O=Global Security, OU=IT Department, CN=example.com",
    "serial": "00:9C:FC:DA:1D:A4:70:87:5D",
    "fingerprint": "b8:18:2d:cb:c9:f8:1a:66:75:13:18:31:24:e0:92:35:42:ab:96:89",
    "version": "TLSv1",
    "notbefore": "2020-05-03T11:07:28",
    "notafter": "2021-05-03T11:07:28",
    "ja3": {},
    "ja3s": {}
  }
Commit 93642a0 did prevent to
specify the logging directory on command line and use the unix
socket.

It looks like the implementation has evolved and the arbitrary
limitation can be removed allowing a user to start unix socket
without editing the configuration file.
If the filename has to % sign and if pcap logging is using multi
mode, then the pcap capture will fail. So let's exit if ever this
is the case.
Exit with error if a keyword is not supported or not existing
and display a message.
Ignore .a library files as we now have one created in src/
as part of adding a Suricata library.
AppLayerRegisterParser was creating a link error when attempting
to use a convenience library for the Suricata C code, then linking
the library of C code with the library of Rust code into a final
Suricata executable, or use with fuzz targets.

By moving AppLayerRegisterParser to the context structure and
calling it like a callback the circular reference is removed
allowing the convenience libraries to work again.

This is also a stepping block to proving a Suricata library
as a single .a or .so file.
@victorjulien victorjulien requested review from jasonish and a team as code owners February 12, 2021 13:56
@victorjulien victorjulien mentioned this pull request Feb 12, 2021
@codecov
Copy link

codecov bot commented Feb 12, 2021

Codecov Report

Merging #5840 (8eebfd2) into master (62e665c) will increase coverage by 4.21%.
The diff coverage is 79.19%.

@@            Coverage Diff             @@
##           master    #5840      +/-   ##
==========================================
+ Coverage   72.38%   76.59%   +4.21%     
==========================================
  Files         604      604              
  Lines      179369   187557    +8188     
==========================================
+ Hits       129837   143662   +13825     
+ Misses      49532    43895    -5637     
Flag Coverage Δ
fuzzcorpus 52.53% <14.28%> (?)
suricata-verify 49.11% <66.15%> (-0.04%) ⬇️
unittests 63.07% <42.06%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants