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

detect/asn1: handle in PMATCH #9932

Closed
wants to merge 1 commit into from

Conversation

victorjulien
Copy link
Member

Since the asn1 keyword is processing payload data, move the handling of the keyword into the PMATCH with content inspection.

Use u32 as buffer length in the Rust FFI

replaces #9922

Since the asn1 keyword is processing payload data, move the handling of
the keyword into the PMATCH with content inspection.

Use u32 as buffer length in the Rust FFI
Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Merging #9932 (76d6a5f) into master (9c3ab36) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9932      +/-   ##
==========================================
+ Coverage   82.35%   82.38%   +0.03%     
==========================================
  Files         972      972              
  Lines      273060   273063       +3     
==========================================
+ Hits       224870   224965      +95     
+ Misses      48190    48098      -92     
Flag Coverage Δ
fuzzcorpus 64.23% <23.07%> (+0.08%) ⬆️
suricata-verify 61.06% <23.07%> (-0.03%) ⬇️
unittests 62.92% <100.00%> (+<0.01%) ⬆️

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

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 16811

This was referenced Dec 2, 2023
Copy link
Member

@inashivb inashivb left a comment

Choose a reason for hiding this comment

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

LGTM. 🚀


const DetectAsn1Data *ad = (const DetectAsn1Data *)smd->ctx;
Asn1 *asn1 = rs_asn1_decode(buffer, buffer_len, offset, ad);
uint8_t ret = rs_asn1_checks(asn1, ad);
Copy link
Member

Choose a reason for hiding this comment

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

Seems like this fn could also return bool

@victorjulien victorjulien added this to the 8.0 milestone Dec 4, 2023
@victorjulien
Copy link
Member Author

Merged in #9964, thanks!

@victorjulien victorjulien deleted the asn1-payload/v2 branch June 23, 2024 06:23
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.

3 participants