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

dns: new keywords: dns.answer.name, dns.query.name - v6 #9920

Closed
wants to merge 12 commits into from

Conversation

jasonish
Copy link
Member

Previous PR: #9813
Changes from last PR:

  • Remove prototypes that are not needed.

Introduce two new DNS keywords, dns.query.name and dns.answer.name.

Tickets:

SV_BRANCH=OISF/suricata-verify#1464

While this introduces 2 new keywords, I'm also trying to create a good example
of a sticky buffer keyword, and then migrate that into the template, so please
consider the full structure of the files implementing the sticky buffers.

I probably should have left out the "cleanups", can do in a subsequent PR.

The old DetectAppLayerMpmRegister has not been around since 4.1.x.
Rename the v2 of this function to a versionless function as there is no
documentation referring to what the 2 means.
Rename DetectAppLayerInspectEngineRegister2 to
DetectAppLayerInspectEngineRegister as there is no other variant of
this function, and the versioning with lack of supporting
documentation can lead to confusion.
DNS request and response messages follow the same format so there is
no reason not to use the same data structure for each. While its
unlikely to see fields like answers in a request, the message format
does not disallow them, so it might be interesting data to have the
ability to log.
This sticky buffer will allow content matching on the answer names.
While ansers typically only occur in DNS responses, we allow the buffer
to be used in request context as well as the request message format
allows it.

Feature: OISF#6496
This buffer is much like dns.query_name but allows for detection in both
directions.

Feature: OISF#6497
SCDnsTxGetQueryName was introduced to allow for getting the query name
in responses as well as requests, so covers the functionality of
rs_dns_tx_get_query_name.
With some other minor cleanups in the DNS keyword section.
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

Merging #9920 (29479a6) into master (9c3ab36) will decrease coverage by 0.05%.
Report is 90 commits behind head on master.
The diff coverage is 97.69%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9920      +/-   ##
==========================================
- Coverage   82.35%   82.30%   -0.05%     
==========================================
  Files         972      974       +2     
  Lines      273060   273121      +61     
==========================================
- Hits       224870   224789      -81     
- Misses      48190    48332     +142     
Flag Coverage Δ
fuzzcorpus 64.12% <79.00%> (-0.03%) ⬇️
suricata-verify 60.91% <97.28%> (-0.19%) ⬇️
unittests 62.88% <78.67%> (-0.05%) ⬇️

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

@suricata-qa
Copy link

WARNING:

field baseline test %
SURI_TLPW2_autofp_stats_chk
.uptime 181 198 109.39%
SURI_TLPR1_stats_chk
.uptime 955 1028 107.64%

Pipeline 16796

@jasonish
Copy link
Member Author

jasonish commented Dec 5, 2023

Ping @victorjulien, we need a good clean example/template for Outreachy.

@victorjulien victorjulien added this to the 8.0 milestone Dec 13, 2023
@victorjulien victorjulien self-requested a review December 13, 2023 05:58
@victorjulien
Copy link
Member

Doesn't compile after rebase.

@victorjulien victorjulien added the needs rebase Needs rebase to master label Dec 13, 2023
Copy link
Member

@victorjulien victorjulien left a comment

Choose a reason for hiding this comment

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

Needs to be updated to compile after rebase.

@jasonish
Copy link
Member Author

Fixed: #10045

@jasonish jasonish closed this Dec 13, 2023
@jasonish jasonish deleted the dns-keywords/v6 branch December 14, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs rebase Needs rebase to master
3 participants