Page MenuHomeFreeBSD

Fix SAD DNS Exploit CVE-2020-25705
AbandonedPublic

Authored by cy on Nov 30 2020, 3:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 4 2024, 8:54 AM
Unknown Object (File)
Sep 4 2024, 5:52 PM
Unknown Object (File)
Aug 24 2024, 8:55 PM
Unknown Object (File)
Aug 18 2024, 12:41 PM
Unknown Object (File)
Aug 14 2024, 12:51 PM
Unknown Object (File)
Aug 11 2024, 5:56 PM
Unknown Object (File)
Jul 27 2024, 10:02 AM
Unknown Object (File)
Jun 4 2024, 12:44 AM
Subscribers

Details

Summary

https://www.saddns.net/ discusses a DNS poisoning attack by leveraging network side channels by attempting to solicit ICMP_UNREACH_PORT replies. The source port number can be inferred from the rate at which ICMP_UNREACH_PORT is rate limited. The solution, as implemented on Linux, is randomize rate limiting. This patch randomizes icmplim with a modulus of a random number divided by icmplim. This patch introduces a new icmpden (ICMP denominator) which is used to calculate the modulus. An icmpden of zero disables randomization.

Test Plan

To be determined at the moment.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

cy requested review of this revision.Nov 30 2020, 3:10 AM

Use git diff -U99999 instead of git diff to create this patch. No functional change.

This patch is significantly smaller. The difference is icmplim could be exceeded by the modulus of the divisor whereas gnn's patch uses icmplim as an upper limit.

yuripv added inline comments.
sys/netinet/ip_icmp.c
1141

Should the rest of the function use icmp_bandlim instead of V_icmplim?