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/728/20250217/v1 #12590

Merged
merged 9 commits into from
Feb 17, 2025
Merged

Conversation

victorjulien and others added 9 commits February 17, 2025 07:31
If not all data is ACK'd during the FIN session shutdown, the last calls
to the parser can be with a non-NULL data pointer, but a input length of
0. This wasn't considered by the EOF check, which then lead to it being
seen as an error. No event was raised, but the tls error stats were
incremented.

Bug: OISF#7554.
Require a minimum version of 0.66.0.

Ticket: OISF#7341
Follow Rust convention of using a "sys" crate for bindings to C
functions. The bindings don't exist yet, but will be generated by
bindgen and put into this crate.

Ticket: OISF#7341
Bindgen works by processing a header file which includes all other
header files it should generate bindings for. For this I've created
bindgen.h which just includes app-layer-protos.h for now as an
example.

These bindings are then generated and saved in the "suricata-sys"
crate and become availale as "suricata_sys::sys".

Ticket: OISF#7341
Have bindgen generate bindings for app-layer-protos.h, then use the
generated definitions of AppProto/AppProtoEnum instead if defining
them ourselves.

This header was chosen as its used by Rust, and its a simple header
with no circular dependencies.

Ticket: OISF#7341
Regenerates the `sys.rs` and looks for any difference. Check will fail
if there is a difference.

Ticket: OISF#7341
We don't keep bindgen's autogenerated do not edit line as it contains
the bindgen version which could break the CI check for out of date
bindings. So add our own do not edit line.

Ticket: OISF#7341
Also disable bindgen's generated layout tests.  They are valid for the
platform generating the tests, but may not be valid for other
platforms. For example, if the tests are generated on a 64 bit
platform the tests will not be valid when run on a 32 bit platform as
pointers are a different size.

However, the generating bindings are valid for both platform.

Ticket: OISF#7341
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

Attention: Patch coverage is 88.57143% with 12 lines in your changes missing coverage. Please review.

Project coverage is 80.74%. Comparing base (c861685) to head (10ede91).
Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #12590   +/-   ##
=======================================
  Coverage   80.73%   80.74%           
=======================================
  Files         931      931           
  Lines      259136   259144    +8     
=======================================
+ Hits       209215   209242   +27     
+ Misses      49921    49902   -19     
Flag Coverage Δ
fuzzcorpus 56.96% <3.80%> (+<0.01%) ⬆️
livemode 19.38% <0.00%> (-0.01%) ⬇️
pcap 44.15% <3.80%> (+0.03%) ⬆️
suricata-verify 63.43% <88.57%> (+0.01%) ⬆️
unittests 58.34% <1.90%> (-0.01%) ⬇️

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

@suricata-qa
Copy link

WARNING:

field baseline test %
SURI_TLPW1_stats_chk
.app_layer.error.tls.parser 1204 1046 86.88%
SURI_TLPR1_stats_chk
.app_layer.error.tls.parser 23957 22493 93.89%

Pipeline 24749

@victorjulien victorjulien added the needs baseline update QA will need a new base line label Feb 17, 2025
@victorjulien
Copy link
Member Author

@ct0br0 can you prep a baseline update for this PR?

Copy link
Member

@jasonish jasonish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Staging looks OK.

@victorjulien victorjulien merged commit 10ede91 into OISF:master Feb 17, 2025
60 checks passed
@victorjulien victorjulien deleted the next/728/20250217/v1 branch February 17, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs baseline update QA will need a new base line
Development

Successfully merging this pull request may close these issues.

3 participants