Skip to content

Conversation

@NelsonVides
Copy link
Contributor

This will ensure that there's only one question at a given time. If a message has no question, it will return immediately; if it has more than one, it will discard all the tail questions and raise and event as a warning.

This will ensure that there's only one question at a given time. If a
message has no question, it will return immediately; if it has more than
one, it will discard all the tail questions and raise and event as a
warning.
@NelsonVides NelsonVides self-assigned this Jul 8, 2025
@NelsonVides NelsonVides added the enhancement New feature, enhancement or code changes, not related to defects label Jul 8, 2025
@NelsonVides NelsonVides requested review from DXTimer and weppos July 8, 2025 07:49
@coveralls
Copy link

coveralls commented Jul 8, 2025

Pull Request Test Coverage Report for Build 16137529487

Details

  • 15 of 15 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 80.782%

Totals Coverage Status
Change from base Build 16137153716: 0.2%
Covered Lines: 1177
Relevant Lines: 1457

💛 - Coveralls

Labels = dns:dname_to_lower_labels(Q1#dns_query.name),
Measurements = #{count => 1 + length(Rest)},
Metadata = #{host => Host, questions => [Q1, Q2 | Rest]},
telemetry:execute([erldns, pipeline, questions], Measurements, Metadata),
Copy link
Contributor

Choose a reason for hiding this comment

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

Multi-question messages are not of great interest to us, since in practice we only support a single question, and any additional questions can be ignored safely.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know, the idea is that an attacking client can wilfully submit messages with many many questions, which no real DNS server really supports so very likely this is either a buggy client or a carefully crafted packet for evil purposes, which we will waste resources parsing, and we never drop them, the answer will contain them so again we waste resources encoding them. We might just drop them early enough and if it is of any interest for DDoS ideas this can be analysed.

@NelsonVides NelsonVides merged commit 3073df9 into main Jul 8, 2025
7 checks passed
@NelsonVides NelsonVides deleted the pipelines_question_filter branch July 8, 2025 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, enhancement or code changes, not related to defects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants