Skip to content

DNS: Ensure query id is not predictible#16870

Merged
normanmaurer merged 1 commit into
4.1from
dns_id_41
Jun 1, 2026
Merged

DNS: Ensure query id is not predictible#16870
normanmaurer merged 1 commit into
4.1from
dns_id_41

Conversation

@normanmaurer
Copy link
Copy Markdown
Member

Motivation:

Netty's DNS resolver uses a predictable PRNG for generating DNS transaction IDs and defaults to a static UDP source port. This combination reduces the entropy of DNS queries, enabling DNS Cache Poisoning (Kaminsky attack).

Modifications:

  • Replace usage of ThreadLocalRandom with SecureRandom

Result:

query id is not predictible anymore

Motivation:

Netty's DNS resolver uses a predictable PRNG for generating DNS transaction IDs and defaults to a static UDP source port. This combination reduces the entropy of DNS queries, enabling DNS Cache Poisoning (Kaminsky attack).

Modifications:

- Replace usage of ThreadLocalRandom with SecureRandom

Result:

query id is not predictible anymore
@normanmaurer normanmaurer added the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Jun 1, 2026
@normanmaurer normanmaurer added this to the 4.1.135.Final milestone Jun 1, 2026
@normanmaurer normanmaurer merged commit 06eb73d into 4.1 Jun 1, 2026
15 of 20 checks passed
@normanmaurer normanmaurer deleted the dns_id_41 branch June 1, 2026 16:48
@netty-project-bot
Copy link
Copy Markdown
Contributor

Could not create auto-port PR.
Got conflicts when cherry-picking onto 5.0.

@chrisvest
Copy link
Copy Markdown
Member

Port to 5.0: #16914

@chrisvest chrisvest removed the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Jun 4, 2026
chrisvest added a commit that referenced this pull request Jun 5, 2026
- #16881
- #16876
- #16866
- #16870
- #16837
- #16858
- #16882
- #16893

---------

Co-authored-by: Norman Maurer <[email protected]>
Co-authored-by: Violeta Georgieva <[email protected]>
Co-authored-by: Szymon Habrainski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants