Debian Codegraph @

rfc9267.html

raw
1 <!DOCTYPE html>
2 <html lang="en" class="RFC">
3 <head>
4 <meta charset="utf-8">
5 <meta content="Common,Latin" name="scripts">
6 <meta content="initial-scale=1.0" name="viewport">
7 <title>RFC 9267: Common Implementation Anti-Patterns Related to Domain Name System (DNS) Resource Record (RR) Processing</title>
8 <meta content="Stanislav Dashevskyi" name="author">
9 <meta content="Daniel dos Santos" name="author">
10 <meta content="Jos Wetzels" name="author">
11 <meta content="Amine Amri" name="author">
12 <meta content="
13
14 This memo describes common vulnerabilities related to Domain Name
15 System (DNS) resource record (RR) processing as seen in several DNS
16 client implementations. These vulnerabilities may lead to successful
17 Denial-of-Service and Remote Code Execution attacks against the
18 affected software. Where applicable, violations of RFC 1035 are
19 mentioned.
20 " name="description">
21 <meta content="xml2rfc 3.12.10" name="generator">
22 <meta content="vulnerabilities" name="keyword">
23 <meta content="vulnerability" name="keyword">
24 <meta content="9267" name="rfc.number">
25 <!-- Generator version information:
26 xml2rfc 3.12.10
27 Python 3.6.15
28 appdirs 1.4.4
29 ConfigArgParse 1.4.1
30 google-i18n-address 2.4.0
31 html5lib 1.0.1
32 intervaltree 3.0.2
33 Jinja2 2.11.3
34 kitchen 1.2.6
35 lxml 4.7.1
36 MarkupSafe 2.0.1
37 pycairo 1.15.1
38 pycountry 19.8.18
39 pyflakes 2.1.1
40 PyYAML 5.4.1
41 requests 2.24.0
42 setuptools 40.5.0
43 six 1.14.0
44 WeasyPrint 52.5
45 -->
46 <link href="rfc9267.xml" rel="alternate" type="application/rfc+xml">
47 <link href="#copyright" rel="license">
48 <style type="text/css">/*
49
50 NOTE: Changes at the bottom of this file overrides some earlier settings.
51
52 Once the style has stabilized and has been adopted as an official RFC style,
53 this can be consolidated so that style settings occur only in one place, but
54 for now the contents of this file consists first of the initial CSS work as
55 provided to the RFC Formatter (xml2rfc) work, followed by itemized and
56 commented changes found necssary during the development of the v3
57 formatters.
58
59 */
60
61 /* fonts */
62 @import url('https://fonts.googleapis.com/css?family=Noto+Sans'); /* Sans-serif */
63 @import url('https://fonts.googleapis.com/css?family=Noto+Serif'); /* Serif (print) */
64 @import url('https://fonts.googleapis.com/css?family=Roboto+Mono'); /* Monospace */
65
66 @viewport {
67 zoom: 1.0;
68 width: extend-to-zoom;
69 }
70 @-ms-viewport {
71 width: extend-to-zoom;
72 zoom: 1.0;
73 }
74 /* general and mobile first */
75 html {
76 }
77 body {
78 max-width: 90%;
79 margin: 1.5em auto;
80 color: #222;
81 background-color: #fff;
82 font-size: 14px;
83 font-family: 'Noto Sans', Arial, Helvetica, sans-serif;
84 line-height: 1.6;
85 scroll-behavior: smooth;
86 }
87 .ears {
88 display: none;
89 }
90
91 /* headings */
92 #title, h1, h2, h3, h4, h5, h6 {
93 margin: 1em 0 0.5em;
94 font-weight: bold;
95 line-height: 1.3;
96 }
97 #title {
98 clear: both;
99 border-bottom: 1px solid #ddd;
100 margin: 0 0 0.5em 0;
101 padding: 1em 0 0.5em;
102 }
103 .author {
104 padding-bottom: 4px;
105 }
106 h1 {
107 font-size: 26px;
108 margin: 1em 0;
109 }
110 h2 {
111 font-size: 22px;
112 margin-top: -20px; /* provide offset for in-page anchors */
113 padding-top: 33px;
114 }
115 h3 {
116 font-size: 18px;
117 margin-top: -36px; /* provide offset for in-page anchors */
118 padding-top: 42px;
119 }
120 h4 {
121 font-size: 16px;
122 margin-top: -36px; /* provide offset for in-page anchors */
123 padding-top: 42px;
124 }
125 h5, h6 {
126 font-size: 14px;
127 }
128 #n-copyright-notice {
129 border-bottom: 1px solid #ddd;
130 padding-bottom: 1em;
131 margin-bottom: 1em;
132 }
133 /* general structure */
134 p {
135 padding: 0;
136 margin: 0 0 1em 0;
137 text-align: left;
138 }
139 div, span {
140 position: relative;
141 }
142 div {
143 margin: 0;
144 }
145 .alignRight.art-text {
146 background-color: #f9f9f9;
147 border: 1px solid #eee;
148 border-radius: 3px;
149 padding: 1em 1em 0;
150 margin-bottom: 1.5em;
151 }
152 .alignRight.art-text pre {
153 padding: 0;
154 }
155 .alignRight {
156 margin: 1em 0;
157 }
158 .alignRight > *:first-child {
159 border: none;
160 margin: 0;
161 float: right;
162 clear: both;
163 }
164 .alignRight > *:nth-child(2) {
165 clear: both;
166 display: block;
167 border: none;
168 }
169 svg {
170 display: block;
171 }
172 .alignCenter.art-text {
173 background-color: #f9f9f9;
174 border: 1px solid #eee;
175 border-radius: 3px;
176 padding: 1em 1em 0;
177 margin-bottom: 1.5em;
178 }
179 .alignCenter.art-text pre {
180 padding: 0;
181 }
182 .alignCenter {
183 margin: 1em 0;
184 }
185 .alignCenter > *:first-child {
186 border: none;
187 margin: 0 auto;
188 }
189
190 /* lists */
191 ol, ul {
192 padding: 0;
193 margin: 0 0 1em 2em;
194 }
195 ol ol, ul ul, ol ul, ul ol {
196 margin-left: 1em;
197 }
198 li {
199 margin: 0 0 0.25em 0;
200 }
201 .ulCompact li {
202 margin: 0;
203 }
204 ul.empty, .ulEmpty {
205 list-style-type: none;
206 }
207 ul.empty li, .ulEmpty li {
208 margin-top: 0.5em;
209 }
210 ul.ulBare, li.ulBare {
211 margin-left: 0em !important;
212 }
213 ul.compact, .ulCompact,
214 ol.compact, .olCompact {
215 line-height: 100%;
216 margin: 0 0 0 2em;
217 }
218
219 /* definition lists */
220 dl {
221 }
222 dl > dt {
223 float: left;
224 margin-right: 1em;
225 }
226 /*
227 dl.nohang > dt {
228 float: none;
229 }
230 */
231 dl > dd {
232 margin-bottom: .8em;
233 min-height: 1.3em;
234 }
235 dl.compact > dd, .dlCompact > dd {
236 margin-bottom: 0em;
237 }
238 dl > dd > dl {
239 margin-top: 0.5em;
240 margin-bottom: 0em;
241 }
242
243 /* links */
244 a {
245 text-decoration: none;
246 }
247 a[href] {
248 color: #22e; /* Arlen: WCAG 2019 */
249 }
250 a[href]:hover {
251 background-color: #f2f2f2;
252 }
253 figcaption a[href],
254 a[href].selfRef {
255 color: #222;
256 }
257 /* XXX probably not this:
258 a.selfRef:hover {
259 background-color: transparent;
260 cursor: default;
261 } */
262
263 /* Figures */
264 tt, code, pre, code {
265 background-color: #f9f9f9;
266 font-family: 'Roboto Mono', monospace;
267 }
268 pre {
269 border: 1px solid #eee;
270 margin: 0;
271 padding: 1em;
272 }
273 img {
274 max-width: 100%;
275 }
276 figure {
277 margin: 0;
278 }
279 figure blockquote {
280 margin: 0.8em 0.4em 0.4em;
281 }
282 figcaption {
283 font-style: italic;
284 margin: 0 0 1em 0;
285 }
286 @media screen {
287 pre {
288 overflow-x: auto;
289 max-width: 100%;
290 max-width: calc(100% - 22px);
291 }
292 }
293
294 /* aside, blockquote */
295 aside, blockquote {
296 margin-left: 0;
297 padding: 1.2em 2em;
298 }
299 blockquote {
300 background-color: #f9f9f9;
301 color: #111; /* Arlen: WCAG 2019 */
302 border: 1px solid #ddd;
303 border-radius: 3px;
304 margin: 1em 0;
305 }
306 cite {
307 display: block;
308 text-align: right;
309 font-style: italic;
310 }
311
312 /* tables */
313 table {
314 width: 100%;
315 margin: 0 0 1em;
316 border-collapse: collapse;
317 border: 1px solid #eee;
318 }
319 th, td {
320 text-align: left;
321 vertical-align: top;
322 padding: 0.5em 0.75em;
323 }
324 th {
325 text-align: left;
326 background-color: #e9e9e9;
327 }
328 tr:nth-child(2n+1) > td {
329 background-color: #f5f5f5;
330 }
331 table caption {
332 font-style: italic;
333 margin: 0;
334 padding: 0;
335 text-align: left;
336 }
337 table p {
338 /* XXX to avoid bottom margin on table row signifiers. If paragraphs should
339 be allowed within tables more generally, it would be far better to select on a class. */
340 margin: 0;
341 }
342
343 /* pilcrow */
344 a.pilcrow {
345 color: #666; /* Arlen: AHDJ 2019 */
346 text-decoration: none;
347 visibility: hidden;
348 user-select: none;
349 -ms-user-select: none;
350 -o-user-select:none;
351 -moz-user-select: none;
352 -khtml-user-select: none;
353 -webkit-user-select: none;
354 -webkit-touch-callout: none;
355 }
356 @media screen {
357 aside:hover > a.pilcrow,
358 p:hover > a.pilcrow,
359 blockquote:hover > a.pilcrow,
360 div:hover > a.pilcrow,
361 li:hover > a.pilcrow,
362 pre:hover > a.pilcrow {
363 visibility: visible;
364 }
365 a.pilcrow:hover {
366 background-color: transparent;
367 }
368 }
369
370 /* misc */
371 hr {
372 border: 0;
373 border-top: 1px solid #eee;
374 }
375 .bcp14 {
376 font-variant: small-caps;
377 }
378
379 .role {
380 font-variant: all-small-caps;
381 }
382
383 /* info block */
384 #identifiers {
385 margin: 0;
386 font-size: 0.9em;
387 }
388 #identifiers dt {
389 width: 3em;
390 clear: left;
391 }
392 #identifiers dd {
393 float: left;
394 margin-bottom: 0;
395 }
396 /* Fix PDF info block run off issue */
397 @media print {
398 #identifiers dd {
399 float: none;
400 }
401 }
402 #identifiers .authors .author {
403 display: inline-block;
404 margin-right: 1.5em;
405 }
406 #identifiers .authors .org {
407 font-style: italic;
408 }
409
410 /* The prepared/rendered info at the very bottom of the page */
411 .docInfo {
412 color: #666; /* Arlen: WCAG 2019 */
413 font-size: 0.9em;
414 font-style: italic;
415 margin-top: 2em;
416 }
417 .docInfo .prepared {
418 float: left;
419 }
420 .docInfo .prepared {
421 float: right;
422 }
423
424 /* table of contents */
425 #toc {
426 padding: 0.75em 0 2em 0;
427 margin-bottom: 1em;
428 }
429 nav.toc ul {
430 margin: 0 0.5em 0 0;
431 padding: 0;
432 list-style: none;
433 }
434 nav.toc li {
435 line-height: 1.3em;
436 margin: 0.75em 0;
437 padding-left: 1.2em;
438 text-indent: -1.2em;
439 }
440 /* references */
441 .references dt {
442 text-align: right;
443 font-weight: bold;
444 min-width: 7em;
445 }
446 .references dd {
447 margin-left: 8em;
448 overflow: auto;
449 }
450
451 .refInstance {
452 margin-bottom: 1.25em;
453 }
454
455 .references .ascii {
456 margin-bottom: 0.25em;
457 }
458
459 /* index */
460 .index ul {
461 margin: 0 0 0 1em;
462 padding: 0;
463 list-style: none;
464 }
465 .index ul ul {
466 margin: 0;
467 }
468 .index li {
469 margin: 0;
470 text-indent: -2em;
471 padding-left: 2em;
472 padding-bottom: 5px;
473 }
474 .indexIndex {
475 margin: 0.5em 0 1em;
476 }
477 .index a {
478 font-weight: 700;
479 }
480 /* make the index two-column on all but the smallest screens */
481 @media (min-width: 600px) {
482 .index ul {
483 -moz-column-count: 2;
484 -moz-column-gap: 20px;
485 }
486 .index ul ul {
487 -moz-column-count: 1;
488 -moz-column-gap: 0;
489 }
490 }
491
492 /* authors */
493 address.vcard {
494 font-style: normal;
495 margin: 1em 0;
496 }
497
498 address.vcard .nameRole {
499 font-weight: 700;
500 margin-left: 0;
501 }
502 address.vcard .label {
503 font-family: "Noto Sans",Arial,Helvetica,sans-serif;
504 margin: 0.5em 0;
505 }
506 address.vcard .type {
507 display: none;
508 }
509 .alternative-contact {
510 margin: 1.5em 0 1em;
511 }
512 hr.addr {
513 border-top: 1px dashed;
514 margin: 0;
515 color: #ddd;
516 max-width: calc(100% - 16px);
517 }
518
519 /* temporary notes */
520 .rfcEditorRemove::before {
521 position: absolute;
522 top: 0.2em;
523 right: 0.2em;
524 padding: 0.2em;
525 content: "The RFC Editor will remove this note";
526 color: #9e2a00; /* Arlen: WCAG 2019 */
527 background-color: #ffd; /* Arlen: WCAG 2019 */
528 }
529 .rfcEditorRemove {
530 position: relative;
531 padding-top: 1.8em;
532 background-color: #ffd; /* Arlen: WCAG 2019 */
533 border-radius: 3px;
534 }
535 .cref {
536 background-color: #ffd; /* Arlen: WCAG 2019 */
537 padding: 2px 4px;
538 }
539 .crefSource {
540 font-style: italic;
541 }
542 /* alternative layout for smaller screens */
543 @media screen and (max-width: 1023px) {
544 body {
545 padding-top: 2em;
546 }
547 #title {
548 padding: 1em 0;
549 }
550 h1 {
551 font-size: 24px;
552 }
553 h2 {
554 font-size: 20px;
555 margin-top: -18px; /* provide offset for in-page anchors */
556 padding-top: 38px;
557 }
558 #identifiers dd {
559 max-width: 60%;
560 }
561 #toc {
562 position: fixed;
563 z-index: 2;
564 top: 0;
565 right: 0;
566 padding: 0;
567 margin: 0;
568 background-color: inherit;
569 border-bottom: 1px solid #ccc;
570 }
571 #toc h2 {
572 margin: -1px 0 0 0;
573 padding: 4px 0 4px 6px;
574 padding-right: 1em;
575 min-width: 190px;
576 font-size: 1.1em;
577 text-align: right;
578 background-color: #444;
579 color: white;
580 cursor: pointer;
581 }
582 #toc h2::before { /* css hamburger */
583 float: right;
584 position: relative;
585 width: 1em;
586 height: 1px;
587 left: -164px;
588 margin: 6px 0 0 0;
589 background: white none repeat scroll 0 0;
590 box-shadow: 0 4px 0 0 white, 0 8px 0 0 white;
591 content: "";
592 }
593 #toc nav {
594 display: none;
595 padding: 0.5em 1em 1em;
596 overflow: auto;
597 height: calc(100vh - 48px);
598 border-left: 1px solid #ddd;
599 }
600 }
601
602 /* alternative layout for wide screens */
603 @media screen and (min-width: 1024px) {
604 body {
605 max-width: 724px;
606 margin: 42px auto;
607 padding-left: 1.5em;
608 padding-right: 29em;
609 }
610 #toc {
611 position: fixed;
612 top: 42px;
613 right: 42px;
614 width: 25%;
615 margin: 0;
616 padding: 0 1em;
617 z-index: 1;
618 }
619 #toc h2 {
620 border-top: none;
621 border-bottom: 1px solid #ddd;
622 font-size: 1em;
623 font-weight: normal;
624 margin: 0;
625 padding: 0.25em 1em 1em 0;
626 }
627 #toc nav {
628 display: block;
629 height: calc(90vh - 84px);
630 bottom: 0;
631 padding: 0.5em 0 0;
632 overflow: auto;
633 }
634 img { /* future proofing */
635 max-width: 100%;
636 height: auto;
637 }
638 }
639
640 /* pagination */
641 @media print {
642 body {
643
644 width: 100%;
645 }
646 p {
647 orphans: 3;
648 widows: 3;
649 }
650 #n-copyright-notice {
651 border-bottom: none;
652 }
653 #toc, #n-introduction {
654 page-break-before: always;
655 }
656 #toc {
657 border-top: none;
658 padding-top: 0;
659 }
660 figure, pre {
661 page-break-inside: avoid;
662 }
663 figure {
664 overflow: scroll;
665 }
666 pre.breakable {
667 break-inside: auto;
668 }
669 h1, h2, h3, h4, h5, h6 {
670 page-break-after: avoid;
671 }
672 h2+*, h3+*, h4+*, h5+*, h6+* {
673 page-break-before: avoid;
674 }
675 pre {
676 white-space: pre-wrap;
677 word-wrap: break-word;
678 font-size: 10pt;
679 }
680 table {
681 border: 1px solid #ddd;
682 }
683 td {
684 border-top: 1px solid #ddd;
685 }
686 }
687
688 /* This is commented out here, as the string-set: doesn't
689 pass W3C validation currently */
690 /*
691 .ears thead .left {
692 string-set: ears-top-left content();
693 }
694
695 .ears thead .center {
696 string-set: ears-top-center content();
697 }
698
699 .ears thead .right {
700 string-set: ears-top-right content();
701 }
702
703 .ears tfoot .left {
704 string-set: ears-bottom-left content();
705 }
706
707 .ears tfoot .center {
708 string-set: ears-bottom-center content();
709 }
710
711 .ears tfoot .right {
712 string-set: ears-bottom-right content();
713 }
714 */
715
716 @page :first {
717 padding-top: 0;
718 @top-left {
719 content: normal;
720 border: none;
721 }
722 @top-center {
723 content: normal;
724 border: none;
725 }
726 @top-right {
727 content: normal;
728 border: none;
729 }
730 }
731
732 @page {
733 size: A4;
734 margin-bottom: 45mm;
735 padding-top: 20px;
736 /* The follwing is commented out here, but set appropriately by in code, as
737 the content depends on the document */
738 /*
739 @top-left {
740 content: 'Internet-Draft';
741 vertical-align: bottom;
742 border-bottom: solid 1px #ccc;
743 }
744 @top-left {
745 content: string(ears-top-left);
746 vertical-align: bottom;
747 border-bottom: solid 1px #ccc;
748 }
749 @top-center {
750 content: string(ears-top-center);
751 vertical-align: bottom;
752 border-bottom: solid 1px #ccc;
753 }
754 @top-right {
755 content: string(ears-top-right);
756 vertical-align: bottom;
757 border-bottom: solid 1px #ccc;
758 }
759 @bottom-left {
760 content: string(ears-bottom-left);
761 vertical-align: top;
762 border-top: solid 1px #ccc;
763 }
764 @bottom-center {
765 content: string(ears-bottom-center);
766 vertical-align: top;
767 border-top: solid 1px #ccc;
768 }
769 @bottom-right {
770 content: '[Page ' counter(page) ']';
771 vertical-align: top;
772 border-top: solid 1px #ccc;
773 }
774 */
775
776 }
777
778 /* Changes introduced to fix issues found during implementation */
779 /* Make sure links are clickable even if overlapped by following H* */
780 a {
781 z-index: 2;
782 }
783 /* Separate body from document info even without intervening H1 */
784 section {
785 clear: both;
786 }
787
788
789 /* Top align author divs, to avoid names without organization dropping level with org names */
790 .author {
791 vertical-align: top;
792 }
793
794 /* Leave room in document info to show Internet-Draft on one line */
795 #identifiers dt {
796 width: 8em;
797 }
798
799 /* Don't waste quite as much whitespace between label and value in doc info */
800 #identifiers dd {
801 margin-left: 1em;
802 }
803
804 /* Give floating toc a background color (needed when it's a div inside section */
805 #toc {
806 background-color: white;
807 }
808
809 /* Make the collapsed ToC header render white on gray also when it's a link */
810 @media screen and (max-width: 1023px) {
811 #toc h2 a,
812 #toc h2 a:link,
813 #toc h2 a:focus,
814 #toc h2 a:hover,
815 #toc a.toplink,
816 #toc a.toplink:hover {
817 color: white;
818 background-color: #444;
819 text-decoration: none;
820 }
821 }
822
823 /* Give the bottom of the ToC some whitespace */
824 @media screen and (min-width: 1024px) {
825 #toc {
826 padding: 0 0 1em 1em;
827 }
828 }
829
830 /* Style section numbers with more space between number and title */
831 .section-number {
832 padding-right: 0.5em;
833 }
834
835 /* prevent monospace from becoming overly large */
836 tt, code, pre, code {
837 font-size: 95%;
838 }
839
840 /* Fix the height/width aspect for ascii art*/
841 pre.sourcecode,
842 .art-text pre {
843 line-height: 1.12;
844 }
845
846
847 /* Add styling for a link in the ToC that points to the top of the document */
848 a.toplink {
849 float: right;
850 margin-right: 0.5em;
851 }
852
853 /* Fix the dl styling to match the RFC 7992 attributes */
854 dl > dt,
855 dl.dlParallel > dt {
856 float: left;
857 margin-right: 1em;
858 }
859 dl.dlNewline > dt {
860 float: none;
861 }
862
863 /* Provide styling for table cell text alignment */
864 table td.text-left,
865 table th.text-left {
866 text-align: left;
867 }
868 table td.text-center,
869 table th.text-center {
870 text-align: center;
871 }
872 table td.text-right,
873 table th.text-right {
874 text-align: right;
875 }
876
877 /* Make the alternative author contact informatio look less like just another
878 author, and group it closer with the primary author contact information */
879 .alternative-contact {
880 margin: 0.5em 0 0.25em 0;
881 }
882 address .non-ascii {
883 margin: 0 0 0 2em;
884 }
885
886 /* With it being possible to set tables with alignment
887 left, center, and right, { width: 100%; } does not make sense */
888 table {
889 width: auto;
890 }
891
892 /* Avoid reference text that sits in a block with very wide left margin,
893 because of a long floating dt label.*/
894 .references dd {
895 overflow: visible;
896 }
897
898 /* Control caption placement */
899 caption {
900 caption-side: bottom;
901 }
902
903 /* Limit the width of the author address vcard, so names in right-to-left
904 script don't end up on the other side of the page. */
905
906 address.vcard {
907 max-width: 30em;
908 margin-right: auto;
909 }
910
911 /* For address alignment dependent on LTR or RTL scripts */
912 address div.left {
913 text-align: left;
914 }
915 address div.right {
916 text-align: right;
917 }
918
919 /* Provide table alignment support. We can't use the alignX classes above
920 since they do unwanted things with caption and other styling. */
921 table.right {
922 margin-left: auto;
923 margin-right: 0;
924 }
925 table.center {
926 margin-left: auto;
927 margin-right: auto;
928 }
929 table.left {
930 margin-left: 0;
931 margin-right: auto;
932 }
933
934 /* Give the table caption label the same styling as the figcaption */
935 caption a[href] {
936 color: #222;
937 }
938
939 @media print {
940 .toplink {
941 display: none;
942 }
943
944 /* avoid overwriting the top border line with the ToC header */
945 #toc {
946 padding-top: 1px;
947 }
948
949 /* Avoid page breaks inside dl and author address entries */
950 .vcard {
951 page-break-inside: avoid;
952 }
953
954 }
955 /* Tweak the bcp14 keyword presentation */
956 .bcp14 {
957 font-variant: small-caps;
958 font-weight: bold;
959 font-size: 0.9em;
960 }
961 /* Tweak the invisible space above H* in order not to overlay links in text above */
962 h2 {
963 margin-top: -18px; /* provide offset for in-page anchors */
964 padding-top: 31px;
965 }
966 h3 {
967 margin-top: -18px; /* provide offset for in-page anchors */
968 padding-top: 24px;
969 }
970 h4 {
971 margin-top: -18px; /* provide offset for in-page anchors */
972 padding-top: 24px;
973 }
974 /* Float artwork pilcrow to the right */
975 @media screen {
976 .artwork a.pilcrow {
977 display: block;
978 line-height: 0.7;
979 margin-top: 0.15em;
980 }
981 }
982 /* Make pilcrows on dd visible */
983 @media screen {
984 dd:hover > a.pilcrow {
985 visibility: visible;
986 }
987 }
988 /* Make the placement of figcaption match that of a table's caption
989 by removing the figure's added bottom margin */
990 .alignLeft.art-text,
991 .alignCenter.art-text,
992 .alignRight.art-text {
993 margin-bottom: 0;
994 }
995 .alignLeft,
996 .alignCenter,
997 .alignRight {
998 margin: 1em 0 0 0;
999 }
1000 /* In print, the pilcrow won't show on hover, so prevent it from taking up space,
1001 possibly even requiring a new line */
1002 @media print {
1003 a.pilcrow {
1004 display: none;
1005 }
1006 }
1007 /* Styling for the external metadata */
1008 div#external-metadata {
1009 background-color: #eee;
1010 padding: 0.5em;
1011 margin-bottom: 0.5em;
1012 display: none;
1013 }
1014 div#internal-metadata {
1015 padding: 0.5em; /* to match the external-metadata padding */
1016 }
1017 /* Styling for title RFC Number */
1018 h1#rfcnum {
1019 clear: both;
1020 margin: 0 0 -1em;
1021 padding: 1em 0 0 0;
1022 }
1023 /* Make .olPercent look the same as <ol><li> */
1024 dl.olPercent > dd {
1025 margin-bottom: 0.25em;
1026 min-height: initial;
1027 }
1028 /* Give aside some styling to set it apart */
1029 aside {
1030 border-left: 1px solid #ddd;
1031 margin: 1em 0 1em 2em;
1032 padding: 0.2em 2em;
1033 }
1034 aside > dl,
1035 aside > ol,
1036 aside > ul,
1037 aside > table,
1038 aside > p {
1039 margin-bottom: 0.5em;
1040 }
1041 /* Additional page break settings */
1042 @media print {
1043 figcaption, table caption {
1044 page-break-before: avoid;
1045 }
1046 }
1047 /* Font size adjustments for print */
1048 @media print {
1049 body { font-size: 10pt; line-height: normal; max-width: 96%; }
1050 h1 { font-size: 1.72em; padding-top: 1.5em; } /* 1*1.2*1.2*1.2 */
1051 h2 { font-size: 1.44em; padding-top: 1.5em; } /* 1*1.2*1.2 */
1052 h3 { font-size: 1.2em; padding-top: 1.5em; } /* 1*1.2 */
1053 h4 { font-size: 1em; padding-top: 1.5em; }
1054 h5, h6 { font-size: 1em; margin: initial; padding: 0.5em 0 0.3em; }
1055 }
1056 /* Sourcecode margin in print, when there's no pilcrow */
1057 @media print {
1058 .artwork,
1059 .sourcecode {
1060 margin-bottom: 1em;
1061 }
1062 }
1063 /* Avoid narrow tables forcing too narrow table captions, which may render badly */
1064 table {
1065 min-width: 20em;
1066 }
1067 /* ol type a */
1068 ol.type-a { list-style-type: lower-alpha; }
1069 ol.type-A { list-style-type: upper-alpha; }
1070 ol.type-i { list-style-type: lower-roman; }
1071 ol.type-I { list-style-type: lower-roman; }
1072 /* Apply the print table and row borders in general, on request from the RPC,
1073 and increase the contrast between border and odd row background sligthtly */
1074 table {
1075 border: 1px solid #ddd;
1076 }
1077 td {
1078 border-top: 1px solid #ddd;
1079 }
1080 tr:nth-child(2n+1) > td {
1081 background-color: #f8f8f8;
1082 }
1083 /* Use style rules to govern display of the TOC. */
1084 @media screen and (max-width: 1023px) {
1085 #toc nav { display: none; }
1086 #toc.active nav { display: block; }
1087 }
1088 /* Add support for keepWithNext */
1089 .keepWithNext {
1090 break-after: avoid-page;
1091 break-after: avoid-page;
1092 }
1093 /* Add support for keepWithPrevious */
1094 .keepWithPrevious {
1095 break-before: avoid-page;
1096 }
1097 /* Change the approach to avoiding breaks inside artwork etc. */
1098 figure, pre, table, .artwork, .sourcecode {
1099 break-before: auto;
1100 break-after: auto;
1101 }
1102 /* Avoid breaks between <dt> and <dd> */
1103 dl {
1104 break-before: auto;
1105 break-inside: auto;
1106 }
1107 dt {
1108 break-before: auto;
1109 break-after: avoid-page;
1110 }
1111 dd {
1112 break-before: avoid-page;
1113 break-after: auto;
1114 orphans: 3;
1115 widows: 3
1116 }
1117 span.break, dd.break {
1118 margin-bottom: 0;
1119 min-height: 0;
1120 break-before: auto;
1121 break-inside: auto;
1122 break-after: auto;
1123 }
1124 /* Undo break-before ToC */
1125 @media print {
1126 #toc {
1127 break-before: auto;
1128 }
1129 }
1130 /* Text in compact lists should not get extra bottim margin space,
1131 since that would makes the list not compact */
1132 ul.compact p, .ulCompact p,
1133 ol.compact p, .olCompact p {
1134 margin: 0;
1135 }
1136 /* But the list as a whole needs the extra space at the end */
1137 section ul.compact,
1138 section .ulCompact,
1139 section ol.compact,
1140 section .olCompact {
1141 margin-bottom: 1em; /* same as p not within ul.compact etc. */
1142 }
1143 /* The tt and code background above interferes with for instance table cell
1144 backgrounds. Changed to something a bit more selective. */
1145 tt, code {
1146 background-color: transparent;
1147 }
1148 p tt, p code, li tt, li code {
1149 background-color: #f8f8f8;
1150 }
1151 /* Tweak the pre margin -- 0px doesn't come out well */
1152 pre {
1153 margin-top: 0.5px;
1154 }
1155 /* Tweak the comact list text */
1156 ul.compact, .ulCompact,
1157 ol.compact, .olCompact,
1158 dl.compact, .dlCompact {
1159 line-height: normal;
1160 }
1161 /* Don't add top margin for nested lists */
1162 li > ul, li > ol, li > dl,
1163 dd > ul, dd > ol, dd > dl,
1164 dl > dd > dl {
1165 margin-top: initial;
1166 }
1167 /* Elements that should not be rendered on the same line as a <dt> */
1168 /* This should match the element list in writer.text.TextWriter.render_dl() */
1169 dd > div.artwork:first-child,
1170 dd > aside:first-child,
1171 dd > figure:first-child,
1172 dd > ol:first-child,
1173 dd > div:first-child > pre.sourcecode,
1174 dd > table:first-child,
1175 dd > ul:first-child {
1176 clear: left;
1177 }
1178 /* fix for weird browser behaviour when <dd/> is empty */
1179 dt+dd:empty::before{
1180 content: "\00a0";
1181 }
1182 /* Make paragraph spacing inside <li> smaller than in body text, to fit better within the list */
1183 li > p {
1184 margin-bottom: 0.5em
1185 }
1186 /* Don't let p margin spill out from inside list items */
1187 li > p:last-of-type {
1188 margin-bottom: 0;
1189 }
1190 </style>
1191 <link href="rfc-local.css" rel="stylesheet" type="text/css">
1192 <link href="https://dx.doi.org/10.17487/rfc9267" rel="alternate">
1193 <link href="urn:issn:2070-1721" rel="alternate">
1194 <link href="https://datatracker.ietf.org/doc/draft-dashevskyi-dnsrr-antipatterns-06" rel="prev">
1195 </head>
1196 <body>
1197 <script src="https://www.rfc-editor.org/js/metadata.min.js"></script>
1198 <table class="ears">
1199 <thead><tr>
1200 <td class="left">RFC 9267</td>
1201 <td class="center">Vulnerabilities in DNS RR Processing</td>
1202 <td class="right">July 2022</td>
1203 </tr></thead>
1204 <tfoot><tr>
1205 <td class="left">Dashevskyi, et al.</td>
1206 <td class="center">Informational</td>
1207 <td class="right">[Page]</td>
1208 </tr></tfoot>
1209 </table>
1210 <div id="external-metadata" class="document-information"></div>
1211 <div id="internal-metadata" class="document-information">
1212 <dl id="identifiers">
1213 <dt class="label-stream">Stream:</dt>
1214 <dd class="stream">Independent Submission</dd>
1215 <dt class="label-rfc">RFC:</dt>
1216 <dd class="rfc"><a href="https://www.rfc-editor.org/rfc/rfc9267" class="eref">9267</a></dd>
1217 <dt class="label-category">Category:</dt>
1218 <dd class="category">Informational</dd>
1219 <dt class="label-published">Published:</dt>
1220 <dd class="published">
1221 <time datetime="2022-07" class="published">July 2022</time>
1222 </dd>
1223 <dt class="label-issn">ISSN:</dt>
1224 <dd class="issn">2070-1721</dd>
1225 <dt class="label-authors">Authors:</dt>
1226 <dd class="authors">
1227 <div class="author">
1228 <div class="author-name">S. Dashevskyi</div>
1229 <div class="org">Forescout Technologies</div>
1230 </div>
1231 <div class="author">
1232 <div class="author-name">D. dos Santos</div>
1233 <div class="org">Forescout Technologies</div>
1234 </div>
1235 <div class="author">
1236 <div class="author-name">J. Wetzels</div>
1237 <div class="org">Forescout Technologies</div>
1238 </div>
1239 <div class="author">
1240 <div class="author-name">A. Amri</div>
1241 <div class="org">Forescout Technologies</div>
1242 </div>
1243 </dd>
1244 </dl>
1245 </div>
1246 <h1 id="rfcnum">RFC 9267</h1>
1247 <h1 id="title">Common Implementation Anti-Patterns Related to Domain Name System (DNS) Resource Record (RR) Processing</h1>
1248 <section id="section-abstract">
1249 <h2 id="abstract"><a href="#abstract" class="selfRef">Abstract</a></h2>
1250 <p id="section-abstract-1">
1251 This memo describes common vulnerabilities related to Domain Name
1252 System (DNS) resource record (RR) processing as seen in several DNS
1253 client implementations. These vulnerabilities may lead to successful
1254 Denial-of-Service and Remote Code Execution attacks against the
1255 affected software. Where applicable, violations of RFC 1035 are
1256 mentioned.<a href="#section-abstract-1" class="pilcrow">¶</a></p>
1257 </section>
1258 <div id="status-of-memo">
1259 <section id="section-boilerplate.1">
1260 <h2 id="name-status-of-this-memo">
1261 <a href="#name-status-of-this-memo" class="section-name selfRef">Status of This Memo</a>
1262 </h2>
1263 <p id="section-boilerplate.1-1">
1264 This document is not an Internet Standards Track specification; it is
1265 published for informational purposes.<a href="#section-boilerplate.1-1" class="pilcrow">¶</a></p>
1266 <p id="section-boilerplate.1-2">
1267 This is a contribution to the RFC Series, independently of any
1268 other RFC stream. The RFC Editor has chosen to publish this
1269 document at its discretion and makes no statement about its value
1270 for implementation or deployment. Documents approved for
1271 publication by the RFC Editor are not candidates for any level of
1272 Internet Standard; see Section 2 of RFC 7841.<a href="#section-boilerplate.1-2" class="pilcrow">¶</a></p>
1273 <p id="section-boilerplate.1-3">
1274 Information about the current status of this document, any
1275 errata, and how to provide feedback on it may be obtained at
1276 <span><a href="https://www.rfc-editor.org/info/rfc9267">https://www.rfc-editor.org/info/rfc9267</a></span>.<a href="#section-boilerplate.1-3" class="pilcrow">¶</a></p>
1277 </section>
1278 </div>
1279 <div id="copyright">
1280 <section id="section-boilerplate.2">
1281 <h2 id="name-copyright-notice">
1282 <a href="#name-copyright-notice" class="section-name selfRef">Copyright Notice</a>
1283 </h2>
1284 <p id="section-boilerplate.2-1">
1285 Copyright (c) 2022 IETF Trust and the persons identified as the
1286 document authors. All rights reserved.<a href="#section-boilerplate.2-1" class="pilcrow">¶</a></p>
1287 <p id="section-boilerplate.2-2">
1288 This document is subject to BCP 78 and the IETF Trust's Legal
1289 Provisions Relating to IETF Documents
1290 (<span><a href="https://trustee.ietf.org/license-info">https://trustee.ietf.org/license-info</a></span>) in effect on the date of
1291 publication of this document. Please review these documents
1292 carefully, as they describe your rights and restrictions with
1293 respect to this document.<a href="#section-boilerplate.2-2" class="pilcrow">¶</a></p>
1294 </section>
1295 </div>
1296 <div id="toc">
1297 <section id="section-toc.1">
1298 <a href="#" onclick="scroll(0,0)" class="toplink">▲</a><h2 id="name-table-of-contents">
1299 <a href="#name-table-of-contents" class="section-name selfRef">Table of Contents</a>
1300 </h2>
1301 <nav class="toc"><ul class="compact toc ulBare ulEmpty">
1302 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.1">
1303 <p id="section-toc.1-1.1.1" class="keepWithNext"><a href="#section-1" class="xref">1</a>.  <a href="#name-introduction" class="xref">Introduction</a></p>
1304 </li>
1305 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2">
1306 <p id="section-toc.1-1.2.1" class="keepWithNext"><a href="#section-2" class="xref">2</a>.  <a href="#name-compression-pointer-and-off" class="xref">Compression Pointer and Offset Validation</a></p>
1307 </li>
1308 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3">
1309 <p id="section-toc.1-1.3.1" class="keepWithNext"><a href="#section-3" class="xref">3</a>.  <a href="#name-label-and-name-length-valid" class="xref">Label and Name Length Validation</a></p>
1310 </li>
1311 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4">
1312 <p id="section-toc.1-1.4.1"><a href="#section-4" class="xref">4</a>.  <a href="#name-null-terminator-placement-v" class="xref">Null-Terminator Placement Validation</a></p>
1313 </li>
1314 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5">
1315 <p id="section-toc.1-1.5.1"><a href="#section-5" class="xref">5</a>.  <a href="#name-response-data-length-valida" class="xref">Response Data Length Validation</a></p>
1316 </li>
1317 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.6">
1318 <p id="section-toc.1-1.6.1"><a href="#section-6" class="xref">6</a>.  <a href="#name-record-count-validation" class="xref">Record Count Validation</a></p>
1319 </li>
1320 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7">
1321 <p id="section-toc.1-1.7.1"><a href="#section-7" class="xref">7</a>.  <a href="#name-security-considerations" class="xref">Security Considerations</a></p>
1322 </li>
1323 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8">
1324 <p id="section-toc.1-1.8.1"><a href="#section-8" class="xref">8</a>.  <a href="#name-iana-considerations" class="xref">IANA Considerations</a></p>
1325 </li>
1326 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.9">
1327 <p id="section-toc.1-1.9.1"><a href="#section-9" class="xref">9</a>.  <a href="#name-references" class="xref">References</a></p>
1328 <ul class="compact toc ulBare ulEmpty">
1329 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.9.2.1">
1330 <p id="section-toc.1-1.9.2.1.1"><a href="#section-9.1" class="xref">9.1</a>.  <a href="#name-normative-references" class="xref">Normative References</a></p>
1331 </li>
1332 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.9.2.2">
1333 <p id="section-toc.1-1.9.2.2.1"><a href="#section-9.2" class="xref">9.2</a>.  <a href="#name-informative-references" class="xref">Informative References</a></p>
1334 </li>
1335 </ul>
1336 </li>
1337 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.10">
1338 <p id="section-toc.1-1.10.1"><a href="#appendix-A" class="xref"></a><a href="#name-acknowledgements" class="xref">Acknowledgements</a></p>
1339 </li>
1340 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.11">
1341 <p id="section-toc.1-1.11.1"><a href="#appendix-B" class="xref"></a><a href="#name-authors-addresses" class="xref">Authors' Addresses</a></p>
1342 </li>
1343 </ul>
1344 </nav>
1345 </section>
1346 </div>
1347 <div id="sect-1">
1348 <section id="section-1">
1349 <h2 id="name-introduction">
1350 <a href="#section-1" class="section-number selfRef">1. </a><a href="#name-introduction" class="section-name selfRef">Introduction</a>
1351 </h2>
1352 <p id="section-1-1">
1353 Major vulnerabilities in DNS implementations recently became evident and raised attention to this protocol as an important attack vector, as discussed in <span>[<a href="#SIGRED" class="xref">SIGRED</a>]</span>, <span>[<a href="#SADDNS" class="xref">SADDNS</a>]</span>, and
1354 <span>[<a href="#DNSPOOQ" class="xref">DNSPOOQ</a>]</span>, the latter being a set of 7 critical issues affecting the DNS
1355 forwarder "dnsmasq".<a href="#section-1-1" class="pilcrow">¶</a></p>
1356 <p id="section-1-2">
1357 The authors of this memo have analyzed the DNS client implementations
1358 of several major TCP/IP protocol stacks and found a set of
1359 vulnerabilities that share common implementation flaws
1360 (anti-patterns). These flaws are related to processing DNS resource records (RRs)
1361 (discussed in <span>[<a href="#RFC1035" class="xref">RFC1035</a>]</span>) and may lead to critical security
1362 vulnerabilities.<a href="#section-1-2" class="pilcrow">¶</a></p>
1363 <p id="section-1-3">
1364 While implementation flaws may differ from one software project to
1365 another, these anti-patterns are highly likely to span
1366 multiple implementations. In fact, one of the first "Common Vulnerabilities and Exposures" (CVE) documents related to
1367 one of the anti-patterns <span>[<a href="#CVE-2000-0333" class="xref">CVE-2000-0333</a>]</span> dates back to the year 2000.
1368 The observations are not limited to DNS client implementations.
1369 Any software that processes DNS RRs may be affected, such as
1370 firewalls, intrusion detection systems, or general-purpose DNS packet
1371 dissectors (e.g., the DNS dissector in Wireshark; see <span>[<a href="#CVE-2017-9345" class="xref">CVE-2017-9345</a>]</span>). Similar issues may
1372 also occur in DNS-over-HTTPS <span>[<a href="#RFC8484" class="xref">RFC8484</a>]</span> and DNS-over-TLS <span>[<a href="#RFC7858" class="xref">RFC7858</a>]</span>
1373 implementations. However, any implementation that deals with the DNS
1374 wire format is subject to the considerations discussed in this document.<a href="#section-1-3" class="pilcrow">¶</a></p>
1375 <p id="section-1-4">
1376 <span>[<a href="#I-D.ietf-dnsind-local-compression" class="xref">DNS-COMPRESSION</a>]</span> and <span>[<a href="#RFC5625" class="xref">RFC5625</a>]</span> briefly mention some of these
1377 anti-patterns, but the main purpose of this memo is to provide
1378 technical details behind these anti-patterns, so that the common
1379 mistakes can be eradicated.<a href="#section-1-4" class="pilcrow">¶</a></p>
1380 <p id="section-1-5">
1381 We provide general recommendations on mitigating the anti-patterns.
1382 We also suggest that all implementations should drop
1383 malicious/malformed DNS replies and (optionally) log them.<a href="#section-1-5" class="pilcrow">¶</a></p>
1384 </section>
1385 </div>
1386 <div id="sect-2">
1387 <section id="section-2">
1388 <h2 id="name-compression-pointer-and-off">
1389 <a href="#section-2" class="section-number selfRef">2. </a><a href="#name-compression-pointer-and-off" class="section-name selfRef">Compression Pointer and Offset Validation</a>
1390 </h2>
1391 <p id="section-2-1">
1392 <span>[<a href="#RFC1035" class="xref">RFC1035</a>]</span> defines the DNS message compression scheme that can be used
1393 to reduce the size of messages. When it is used, an entire domain
1394 name or several name labels are replaced with a (compression) pointer
1395 to a prior occurrence of the same name.<a href="#section-2-1" class="pilcrow">¶</a></p>
1396 <p id="section-2-2">
1397 The compression pointer is a combination of two octets: the two most
1398 significant bits are set to 1, and the remaining 14 bits are the
1399 OFFSET field. This field specifies the offset from the beginning of
1400 the DNS header, at which another domain name or label is located:<a href="#section-2-2" class="pilcrow">¶</a></p>
1401 <div class="alignLeft art-text artwork" id="section-2-3">
1402 <pre>
1403 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
1404 | 1 1| OFFSET |
1405 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
1406 </pre><a href="#section-2-3" class="pilcrow">¶</a>
1407 </div>
1408 <p id="section-2-4">
1409 The message compression scheme explicitly allows a domain name to be
1410 represented as one of the following: (1) a sequence of unpacked labels ending with a zero
1411 octet, (2) a pointer, or (3) a sequence of labels ending with a pointer.<a href="#section-2-4" class="pilcrow">¶</a></p>
1412 <p id="section-2-5">
1413 However, <span>[<a href="#RFC1035" class="xref">RFC1035</a>]</span> does not explicitly state that blindly following
1414 compression pointers of any kind can be harmful <span>[<a href="#I-D.ietf-dnsind-local-compression" class="xref">DNS-COMPRESSION</a>]</span>, as we
1415 could not have had any assumptions about various implementations
1416 that would follow.<a href="#section-2-5" class="pilcrow">¶</a></p>
1417 <p id="section-2-6">
1418 Yet, any DNS packet parser that attempts to decompress domain names
1419 without validating the value of OFFSET is likely susceptible to
1420 memory corruption bugs and buffer overruns. These bugs make it easier to perform
1421 Denial-of-Service attacks and may result in successful Remote Code
1422 Execution attacks.<a href="#section-2-6" class="pilcrow">¶</a></p>
1423 <p id="section-2-7">
1424 Pseudocode that illustrates a typical example of a broken domain name
1425 parsing implementation is shown below (<a href="#snippet_1" class="xref">Figure 1</a>):<a href="#section-2-7" class="pilcrow">¶</a></p>
1426 <span id="name-a-broken-implementation-of-"></span><div id="snippet_1">
1427 <figure id="figure-1">
1428 <div id="section-2-8.1">
1429 <pre class="lang-pseudocode sourcecode">
1430 1: decompress_domain_name(*name, *dns_payload) {
1431 2:
1432 3: name_buffer[255];
1433 4: copy_offset = 0;
1434 5:
1435 6: label_len_octet = name;
1436 7: dest_octet = name_buffer;
1437 8:
1438 9: while (*label_len_octet != 0x00) {
1439 10:
1440 11: if (is_compression_pointer(*label_len_octet)) {
1441 12: ptr_offset = get_offset(label_len_octet,
1442 label_len_octet+1);
1443 13: label_len_octet = dns_payload + ptr_offset + 1;
1444 14: }
1445 15:
1446 16: else {
1447 17: length = *label_len_octet;
1448 18: copy(dest_octet + copy_offset,
1449 label_len_octet+1, *length);
1450 19:
1451 20: copy_offset += length;
1452 21: label_len_octet += length + 1;
1453 22: }
1454 23:
1455 24: }
1456 25: }
1457 </pre>
1458 </div>
1459 <figcaption><a href="#figure-1" class="selfRef">Figure 1</a>:
1460 <a href="#name-a-broken-implementation-of-" class="selfRef">A Broken Implementation of a Function That Is Used for Decompressing DNS Domain Names (Pseudocode)</a>
1461 </figcaption></figure>
1462 </div>
1463 <p id="section-2-9">
1464 Such implementations typically have a dedicated function for
1465 decompressing domain names (for example, see <span>[<a href="#CVE-2020-24338" class="xref">CVE-2020-24338</a>]</span> and
1466 <span>[<a href="#CVE-2020-27738" class="xref">CVE-2020-27738</a>]</span>). Among other parameters, these functions may
1467 accept a pointer to the beginning of the first name label within an
1468 RR ("name") and a pointer to the beginning of the DNS payload to be
1469 used as a starting point for the compression pointer
1470 ("dns_payload"). The destination buffer for the domain name
1471 ("name_buffer") is typically limited to 255 bytes as per
1472 <span>[<a href="#RFC1035" class="xref">RFC1035</a>]</span> and can be allocated either in the stack or in the heap
1473 memory region.<a href="#section-2-9" class="pilcrow">¶</a></p>
1474 <p id="section-2-10">
1475 The code of the function in <a href="#snippet_1" class="xref">Figure 1</a> reads the domain name
1476 label by label from an RR until it reaches the NUL octet ("0x00") that
1477 signifies the end of a domain name. If the current label length octet
1478 ("label_len_octet") is a compression pointer, the code extracts the
1479 value of the compression offset and uses it to "jump" to another
1480 label length octet. If the current label length octet is not a
1481 compression pointer, the label bytes will be copied into the name
1482 buffer, and the number of bytes copied will correspond to the value
1483 of the current label length octet. After the copy operation, the code
1484 will move on to the next label length octet.<a href="#section-2-10" class="pilcrow">¶</a></p>
1485 <p id="section-2-11">
1486 The first issue with this implementation is due to unchecked
1487 compression offset values. The second issue is due to the absence of
1488 checks that ensure that a pointer will eventually arrive at a
1489 decompressed domain label. We describe these issues in more detail
1490 below.<a href="#section-2-11" class="pilcrow">¶</a></p>
1491 <p id="section-2-12">
1492
1493 <span>[<a href="#RFC1035" class="xref">RFC1035</a>]</span> states that a compression pointer is "a pointer to a prior occurance [sic] of the same name." Also, according to <span>[<a href="#RFC1035" class="xref">RFC1035</a>]</span>,
1494 the maximum size of DNS packets that can be sent over UDP
1495 is limited to 512 octets.<a href="#section-2-12" class="pilcrow">¶</a></p>
1496 <p id="section-2-13">
1497 The pseudocode in <a href="#snippet_1" class="xref">Figure 1</a> violates these constraints, as it will
1498 accept a compression pointer that forces the code to read outside the
1499 bounds of a DNS packet. For instance, a compression pointer set to
1500 "0xffff" will produce an offset of 16383 octets, which is most
1501 definitely pointing to a label length octet somewhere past the bounds of the
1502 original DNS packet. Supplying such offset values will most likely
1503 cause memory corruption issues and may lead to Denial-of-Service
1504 conditions (e.g., a Null pointer dereference after "label_len_octet"
1505 is set to an invalid address in memory). For additional examples,
1506 see <span>[<a href="#CVE-2020-25767" class="xref">CVE-2020-25767</a>]</span>, <span>[<a href="#CVE-2020-24339" class="xref">CVE-2020-24339</a>]</span>, and <span>[<a href="#CVE-2020-24335" class="xref">CVE-2020-24335</a>]</span>.<a href="#section-2-13" class="pilcrow">¶</a></p>
1507 <p id="section-2-14">
1508 The pseudocode in <a href="#snippet_1" class="xref">Figure 1</a> allows jumping from a compression
1509 pointer to another compression pointer and does not restrict the
1510 number of such jumps. That is, if a label length octet that is
1511 currently being parsed is a compression pointer, the code will
1512 perform a jump to another label, and if that other label is a
1513 compression pointer as well, the code will perform another jump, and
1514 so forth until it reaches a decompressed label. This may lead to
1515 unforeseen side effects that result in security issues.<a href="#section-2-14" class="pilcrow">¶</a></p>
1516 <p id="section-2-15">Consider the DNS packet excerpt illustrated below:<a href="#section-2-15" class="pilcrow">¶</a></p>
1517 <div class="alignLeft art-text artwork" id="section-2-16">
1518 <pre>
1519 +----+----+----+----+----+----+----+----+----+----+----+----+
1520 +0x00 | ID | FLAGS | QDCOUNT | ANCOUNT | NSCOUNT | ARCOUNT |
1521 +----+----+----+----+----+----+----+----+----+----+----+----+
1522 -&gt;+0x0c |0xc0|0x0c| TYPE | CLASS |0x04| t | e | s | t |0x03|
1523 | +----+--|-+----+----+----+----+----+----+----+----+----+----+
1524 | +0x18 | c | o| | m |0x00| TYPE | CLASS | ................ |
1525 | +----+--|-+----+----+----+----+----+----+----+----+----+----+
1526 | |
1527 -----------------
1528 </pre><a href="#section-2-16" class="pilcrow">¶</a>
1529 </div>
1530 <p id="section-2-17">
1531 The packet begins with a DNS header at offset +0x00, and its DNS
1532 payload contains several RRs. The first RR begins at an offset of
1533 12 octets (+0x0c); its first label length octet is set to the
1534 value "0xc0", which indicates that it is a compression pointer. The
1535 compression pointer offset is computed from the two octets "0xc00c"
1536 and is equal to 12. Since the broken implementation in <a href="#snippet_1" class="xref">Figure 1</a>
1537 follows this offset value blindly, the pointer will jump back to
1538 the first octet of the first RR (+0x0c) over and over again. The
1539 code in <a href="#snippet_1" class="xref">Figure 1</a> will enter an infinite-loop state, since it will
1540 never leave the "TRUE" branch of the "while" loop.<a href="#section-2-17" class="pilcrow">¶</a></p>
1541 <p id="section-2-18">
1542 Apart from achieving infinite loops, the implementation flaws in
1543 <a href="#snippet_1" class="xref">Figure 1</a> make it possible to achieve various pointer loops that have
1544 other undesirable effects. For instance, consider the DNS packet excerpt shown
1545 below:<a href="#section-2-18" class="pilcrow">¶</a></p>
1546 <div class="alignLeft art-text artwork" id="section-2-19">
1547 <pre>
1548 +----+----+----+----+----+----+----+----+----+----+----+----+
1549 +0x00 | ID | FLAGS | QDCOUNT | ANCOUNT | NSCOUNT | ARCOUNT |
1550 +----+----+----+----+----+----+----+----+----+----+----+----+
1551 -&gt;+0x0c |0x04| t | e | s | t |0xc0|0x0c| ...................... |
1552 | +----+----+----+----+----+----+--|-+----+----+----+----+----+
1553 | |
1554 ------------------------------------------
1555 </pre><a href="#section-2-19" class="pilcrow">¶</a>
1556 </div>
1557 <p id="section-2-20">
1558 With such a domain name, the implementation in <a href="#snippet_1" class="xref">Figure 1</a> will first
1559 copy the domain label at offset "0xc0" ("test"); it will then
1560 fetch the next label length octet, which happens to be a compression pointer
1561 ("0xc0"). The compression pointer offset is computed from the two
1562 octets "0xc00c" and is equal to 12 octets. The code will jump back
1563 to offset "0xc0" where the first label "test" is located. The
1564 code will again copy the "test" label and then jump back to it,
1565 following the compression pointer, over and over again.<a href="#section-2-20" class="pilcrow">¶</a></p>
1566 <p id="section-2-21">
1567 <a href="#snippet_1" class="xref">Figure 1</a> does not contain any logic that restricts multiple jumps
1568 from the same compression pointer and does not ensure that no more
1569 than 255 octets are copied into the name buffer ("name_buffer"). In
1570 fact,<a href="#section-2-21" class="pilcrow">¶</a></p>
1571 <ul class="normal">
1572 <li class="normal" id="section-2-22.1">the code will continue to write the label "test" into it,
1573 overwriting the name buffer and the stack of the heap metadata.<a href="#section-2-22.1" class="pilcrow">¶</a>
1574 </li>
1575 <li class="normal" id="section-2-22.2">attackers would have a significant degree of freedom in
1576 constructing shell code, since they can create arbitrary copy chains
1577 with various combinations of labels and compression pointers.<a href="#section-2-22.2" class="pilcrow">¶</a>
1578 </li>
1579 </ul>
1580 <p id="section-2-23">Therefore, blindly following compression pointers may lead not only to
1581 Denial-of-Service conditions, as pointed out by <span>[<a href="#I-D.ietf-dnsind-local-compression" class="xref">DNS-COMPRESSION</a>]</span>, but also to successful Remote
1582 Code Execution attacks, as there may be other implementation issues present
1583 within the corresponding code.<a href="#section-2-23" class="pilcrow">¶</a></p>
1584 <p id="section-2-24">
1585 Some implementations may not follow <span>[<a href="#RFC1035" class="xref">RFC1035</a>]</span>, which states:<a href="#section-2-24" class="pilcrow">¶</a></p>
1586 <blockquote id="section-2-25">The first two bits are ones. This allows a pointer to be distinguished
1587 from a label, since the label must begin with two zero bits because
1588 labels are restricted to 63 octets or less. (The 10 and 01 combinations
1589 are reserved for future use.)<a href="#section-2-25" class="pilcrow">¶</a>
1590 </blockquote>
1591 <p id="section-2-26">
1592 Figures <a href="#snippet_2" class="xref">2</a> and <a href="#snippet_3" class="xref">3</a> show pseudocode that implements two functions that check whether a given octet is a compression pointer; <a href="#snippet_2" class="xref">Figure 2</a> shows a correct implementation, and <a href="#snippet_3" class="xref">Figure 3</a> shows an incorrect (broken) implementation.<a href="#section-2-26" class="pilcrow">¶</a></p>
1593 <span id="name-correct-compression-pointer"></span><div id="snippet_2">
1594 <figure id="figure-2">
1595 <div id="section-2-27.1">
1596 <pre class="lang-pseudocode sourcecode">
1597 1: unsigned char is_compression_pointer(*octet) {
1598 2: if ((*octet &amp; 0xc0) == 0xc0)
1599 3: return true;
1600 4: } else {
1601 5: return false;
1602 6: }
1603 7: }
1604 </pre>
1605 </div>
1606 <figcaption><a href="#figure-2" class="selfRef">Figure 2</a>:
1607 <a href="#name-correct-compression-pointer" class="selfRef">Correct Compression Pointer Check</a>
1608 </figcaption></figure>
1609 </div>
1610 <span id="name-broken-compression-pointer-"></span><div id="snippet_3">
1611 <figure id="figure-3">
1612 <div id="section-2-28.1">
1613 <pre class="lang-pseudocode sourcecode">
1614 1: unsigned char is_compression_pointer(*octet) {
1615 2: if (*octet &amp; 0xc0) {
1616 3: return true;
1617 4: } else {
1618 5: return false;
1619 6: }
1620 7: }
1621 </pre>
1622 </div>
1623 <figcaption><a href="#figure-3" class="selfRef">Figure 3</a>:
1624 <a href="#name-broken-compression-pointer-" class="selfRef">Broken Compression Pointer Check</a>
1625 </figcaption></figure>
1626 </div>
1627 <p id="section-2-29">
1628 The correct implementation (<a href="#snippet_2" class="xref">Figure 2</a>) ensures that the two most
1629 significant bits of an octet are both set, while the broken
1630 implementation (<a href="#snippet_3" class="xref">Figure 3</a>) would consider an octet with only one of
1631 the two bits set to be a compression pointer. This is likely an
1632 implementation mistake rather than an intended violation of
1633 <span>[<a href="#RFC1035" class="xref">RFC1035</a>]</span>, because there are no benefits in supporting such
1634 compression pointer values. The implementations related to
1635 <span>[<a href="#CVE-2020-24338" class="xref">CVE-2020-24338</a>]</span> and <span>[<a href="#CVE-2020-24335" class="xref">CVE-2020-24335</a>]</span> had a broken
1636 compression pointer check, similar to the code shown in <a href="#snippet_3" class="xref">Figure 3</a>.<a href="#section-2-29" class="pilcrow">¶</a></p>
1637 <p id="section-2-30">
1638 While incorrect implementations alone do not lead to vulnerabilities,
1639 they may have unforeseen side effects when combined with other
1640 vulnerabilities. For instance, the first octet of the value "0x4130"
1641 may be incorrectly interpreted as a label length by a broken
1642 implementation. Such a label length (65) is invalid and is larger
1643 than 63 (as per <span>[<a href="#RFC1035" class="xref">RFC1035</a>]</span>); a packet that has this value should
1644 be discarded. However, the function shown in <a href="#snippet_3" class="xref">Figure 3</a> will
1645 consider "0x41" to be a valid compression pointer, and the packet
1646 may pass the validation steps.<a href="#section-2-30" class="pilcrow">¶</a></p>
1647 <p id="section-2-31">
1648 This might give attackers additional leverage for constructing
1649 payloads and circumventing the existing DNS packet validation
1650 mechanisms.<a href="#section-2-31" class="pilcrow">¶</a></p>
1651 <p id="section-2-32">
1652 The first occurrence of a compression pointer in an RR (an octet with
1653 the two highest bits set to 1) must resolve to an octet within a DNS
1654 record with a value that is greater than 0 (i.e., it must not be a
1655 Null-terminator) and less than 64. The offset at which this octet is
1656 located must be smaller than the offset at which the compression
1657 pointer is located; once an implementation makes sure of that,
1658 compression pointer loops can never occur.<a href="#section-2-32" class="pilcrow">¶</a></p>
1659 <p id="section-2-33">
1660 In small DNS implementations (e.g., embedded TCP/IP stacks),
1661 support for nested compression pointers (pointers that point to a
1662 compressed name) should be discouraged: there is very little to be
1663 gained in terms of performance versus the high probability of
1664 introducing errors such as those discussed above.<a href="#section-2-33" class="pilcrow">¶</a></p>
1665 <p id="section-2-34">
1666 The code that implements domain name parsing should check the offset
1667 with respect to not only the bounds of a packet but also its
1668 position with respect to the compression pointer in question. A
1669 compression pointer must not be "followed" more than once. We have
1670 seen several implementations using a check that ensures that
1671 a compression pointer is not followed more than several times. A
1672 better alternative may be to ensure that the target of a compression
1673 pointer is always located before the location of the pointer in the
1674 packet.<a href="#section-2-34" class="pilcrow">¶</a></p>
1675 </section>
1676 </div>
1677 <div id="sect-3">
1678 <section id="section-3">
1679 <h2 id="name-label-and-name-length-valid">
1680 <a href="#section-3" class="section-number selfRef">3. </a><a href="#name-label-and-name-length-valid" class="section-name selfRef">Label and Name Length Validation</a>
1681 </h2>
1682 <p id="section-3-1">
1683 <span>[<a href="#RFC1035" class="xref">RFC1035</a>]</span> restricts the length of name labels to 63 octets and
1684 lengths of domain names to 255 octets (i.e., label octets and label
1685 length octets). Some implementations do not explicitly enforce these
1686 restrictions.<a href="#section-3-1" class="pilcrow">¶</a></p>
1687 <p id="section-3-2">
1688 Consider the function "copy_domain_name()" shown in <a href="#snippet_4" class="xref">Figure 4</a> below.
1689 The function is a variant of the "decompress_domain_name()" function
1690 (<a href="#snippet_1" class="xref">Figure 1</a>), with the difference that it does not support compressed
1691 labels and only copies decompressed labels into the name buffer.<a href="#section-3-2" class="pilcrow">¶</a></p>
1692 <span id="name-a-broken-implementation-of-a"></span><div id="snippet_4">
1693 <figure id="figure-4">
1694 <div id="section-3-3.1">
1695 <pre class="lang-pseudocode sourcecode">
1696 1: copy_domain_name(*name, *dns_payload) {
1697 2:
1698 3: name_buffer[255];
1699 4: copy_offset = 0;
1700 5:
1701 6: label_len_octet = name;
1702 7: dest_octet = name_buffer;
1703 8:
1704 9: while (*label_len_octet != 0x00) {
1705 10:
1706 11: if (is_compression_pointer(*label_len_octet)) {
1707 12: length = 2;
1708 13: label_len_octet += length + 1;
1709 14: }
1710 15:
1711 16: else {
1712 17: length = *label_len_octet;
1713 18: copy(dest_octet + copy_offset,
1714 label_len_octet+1, *length);
1715 19:
1716 20: copy_offset += length;
1717 21: label_len_octet += length + 1;
1718 22: }
1719 23:
1720 24: }
1721 25: }
1722 </pre>
1723 </div>
1724 <figcaption><a href="#figure-4" class="selfRef">Figure 4</a>:
1725 <a href="#name-a-broken-implementation-of-a" class="selfRef">A Broken Implementation of a Function That Is Used for Copying Non-⁠compressed Domain Names</a>
1726 </figcaption></figure>
1727 </div>
1728 <p id="section-3-4">
1729 This implementation does not explicitly check for the value of the
1730 label length octet: this value can be up to 255 octets, and a single
1731 label can fill the name buffer. Depending on the memory layout of the
1732 target, how the name buffer is allocated, and the size of the
1733 malformed packet, it is possible to trigger various memory corruption
1734 issues.<a href="#section-3-4" class="pilcrow">¶</a></p>
1735 <p id="section-3-5">
1736 Both Figures <a href="#snippet_1" class="xref">1</a> and <a href="#snippet_4" class="xref">4</a> restrict the size of the name buffer to 255
1737 octets; however, there are no restrictions on the actual number of
1738 octets that will be copied into this buffer. In this particular case,
1739 a subsequent copy operation (if another label is present in the
1740 packet) will write past the name buffer, allowing heap
1741 or stack metadata to be overwritten in a controlled manner.<a href="#section-3-5" class="pilcrow">¶</a></p>
1742 <p id="section-3-6">
1743 Similar examples of vulnerable implementations can be found in the
1744 code relevant to <span>[<a href="#CVE-2020-25110" class="xref">CVE-2020-25110</a>]</span>, <span>[<a href="#CVE-2020-15795" class="xref">CVE-2020-15795</a>]</span>, and
1745 <span>[<a href="#CVE-2020-27009" class="xref">CVE-2020-27009</a>]</span>.<a href="#section-3-6" class="pilcrow">¶</a></p>
1746 <p id="section-3-7">
1747 As a general recommendation, a domain label length octet must have a
1748 value of more than 0 and less than 64 <span>[<a href="#RFC1035" class="xref">RFC1035</a>]</span>. If this is not the case,
1749 an invalid value has been provided within the packet, or a value at an
1750 invalid position might be interpreted as a domain name length due to other
1751 errors in the packet (e.g., misplaced Null-terminator or invalid
1752 compression pointer).<a href="#section-3-7" class="pilcrow">¶</a></p>
1753 <p id="section-3-8">
1754 The number of domain label characters must correspond to the value of
1755 the domain label octet. To avoid possible errors when interpreting
1756 the characters of a domain label, developers may consider
1757 recommendations for the preferred domain name syntax outlined in
1758 <span>[<a href="#RFC1035" class="xref">RFC1035</a>]</span>.<a href="#section-3-8" class="pilcrow">¶</a></p>
1759 <p id="section-3-9">
1760 The domain name length must not be more than 255 octets, including
1761 the size of decompressed domain names. The NUL octet ("0x00") must
1762 be present at the end of the domain name and must be within the maximum name
1763 length (255 octets).<a href="#section-3-9" class="pilcrow">¶</a></p>
1764 </section>
1765 </div>
1766 <div id="sect-4">
1767 <section id="section-4">
1768 <h2 id="name-null-terminator-placement-v">
1769 <a href="#section-4" class="section-number selfRef">4. </a><a href="#name-null-terminator-placement-v" class="section-name selfRef">Null-Terminator Placement Validation</a>
1770 </h2>
1771 <p id="section-4-1">
1772 A domain name must end with a NUL ("0x00") octet, as per <span>[<a href="#RFC1035" class="xref">RFC1035</a>]</span>.
1773 The implementations shown in Figures <a href="#snippet_1" class="xref">1</a> and <a href="#snippet_4" class="xref">4</a> assume that this is the
1774 case for the RRs that they process; however, names that do not have a
1775 NUL octet placed at the proper position within an RR are not
1776 discarded.<a href="#section-4-1" class="pilcrow">¶</a></p>
1777 <p id="section-4-2">
1778 This issue is closely related to the absence of label and name length
1779 checks. For example, the logic behind Figures <a href="#snippet_1" class="xref">1</a> and <a href="#snippet_4" class="xref">4</a> will continue
1780 to copy octets into the name buffer until a NUL octet is
1781 encountered. This octet can be placed at an arbitrary position
1782 within an RR or not placed at all.<a href="#section-4-2" class="pilcrow">¶</a></p>
1783 <p id="section-4-3">
1784 Consider the pseudocode function shown in <a href="#snippet_5" class="xref">Figure 5</a>. The function
1785 returns the length of a domain name ("name") in octets to be used
1786 elsewhere (e.g., to allocate a name buffer of a certain size): for
1787 compressed domain names, the function returns 2; for decompressed
1788 names, it returns their true length using the "strlen(3)" function.<a href="#section-4-3" class="pilcrow">¶</a></p>
1789 <span id="name-a-broken-implementation-of-a-"></span><div id="snippet_5">
1790 <figure id="figure-5">
1791 <div id="section-4-4.1">
1792 <pre class="lang-pseudocode sourcecode">
1793 1: get_name_length(*name) {
1794 2:
1795 3: if (is_compression_pointer(name))
1796 4: return 2;
1797 5:
1798 6: name_len = strlen(name) + 1;
1799 7: return name_len;
1800 8: }
1801 </pre>
1802 </div>
1803 <figcaption><a href="#figure-5" class="selfRef">Figure 5</a>:
1804 <a href="#name-a-broken-implementation-of-a-" class="selfRef">A Broken Implementation of a Function That Returns the Length of a Domain Name</a>
1805 </figcaption></figure>
1806 </div>
1807 <p id="section-4-5">
1808 "strlen(3)" is a standard C library function that returns the length
1809 of a given sequence of characters terminated by the NUL ("0x00")
1810 octet. Since this function also expects names to be explicitly
1811 Null-terminated, the return value "strlen(3)" may also be controlled
1812 by attackers. Through the value of "name_len", attackers may control
1813 the allocation of internal buffers or specify the number by octets
1814 copied into these buffers, or they may perform other operations, depending on the
1815 implementation specifics.<a href="#section-4-5" class="pilcrow">¶</a></p>
1816 <p id="section-4-6">
1817 The absence of explicit checks for placement of the NUL octet may also
1818 facilitate controlled memory reads and writes. An example of
1819 vulnerable implementations can be found in the code relevant to
1820 <span>[<a href="#CVE-2020-25107" class="xref">CVE-2020-25107</a>]</span>, <span>[<a href="#CVE-2020-17440" class="xref">CVE-2020-17440</a>]</span>, <span>[<a href="#CVE-2020-24383" class="xref">CVE-2020-24383</a>]</span>, and
1821 <span>[<a href="#CVE-2020-27736" class="xref">CVE-2020-27736</a>]</span>.<a href="#section-4-6" class="pilcrow">¶</a></p>
1822 <p id="section-4-7">
1823 As a general recommendation for mitigating such issues, developers
1824 should never trust user data to be Null-terminated. For example, to
1825 fix/mitigate the issue shown in the code in <a href="#snippet_5" class="xref">Figure 5</a>, developers should use
1826 the function "strnlen(3)", which reads at most X characters (the second
1827 argument of the function), and ensure that X is not larger than the
1828 buffer allocated for the name.<a href="#section-4-7" class="pilcrow">¶</a></p>
1829 </section>
1830 </div>
1831 <div id="sect-5">
1832 <section id="section-5">
1833 <h2 id="name-response-data-length-valida">
1834 <a href="#section-5" class="section-number selfRef">5. </a><a href="#name-response-data-length-valida" class="section-name selfRef">Response Data Length Validation</a>
1835 </h2>
1836 <p id="section-5-1">
1837 As stated in <span>[<a href="#RFC1035" class="xref">RFC1035</a>]</span>, every RR contains a variable-length string of
1838 octets that contains the retrieved resource data (RDATA) (e.g., an IP
1839 address that corresponds to a domain name in question). The length of
1840 the RDATA field is regulated by the resource data length field
1841 (RDLENGTH), which is also present in an RR.<a href="#section-5-1" class="pilcrow">¶</a></p>
1842 <p id="section-5-2">
1843 Implementations that process RRs may not check for the validity of
1844 the RDLENGTH field value when retrieving RDATA. Failing to do so may
1845 lead to out-of-bound read issues, whose impact may
1846 vary significantly, depending on the implementation specifics. We have
1847 observed instances of Denial-of-Service conditions and information
1848 leaks.<a href="#section-5-2" class="pilcrow">¶</a></p>
1849 <p id="section-5-3">
1850 Therefore, the value of the data length byte in response DNS records
1851 (RDLENGTH) must reflect the number of bytes available in the field
1852 that describes the resource (RDATA). The format of RDATA must
1853 conform to the TYPE and CLASS fields of the RR.<a href="#section-5-3" class="pilcrow">¶</a></p>
1854 <p id="section-5-4">
1855 Examples of vulnerable implementations can be found in the code
1856 relevant to <span>[<a href="#CVE-2020-25108" class="xref">CVE-2020-25108</a>]</span>, <span>[<a href="#CVE-2020-24336" class="xref">CVE-2020-24336</a>]</span>, and <span>[<a href="#CVE-2020-27009" class="xref">CVE-2020-27009</a>]</span>.<a href="#section-5-4" class="pilcrow">¶</a></p>
1857 </section>
1858 </div>
1859 <div id="sect-6">
1860 <section id="section-6">
1861 <h2 id="name-record-count-validation">
1862 <a href="#section-6" class="section-number selfRef">6. </a><a href="#name-record-count-validation" class="section-name selfRef">Record Count Validation</a>
1863 </h2>
1864 <p id="section-6-1">
1865 According to <span>[<a href="#RFC1035" class="xref">RFC1035</a>]</span>, the DNS header contains four two-octet
1866 fields that specify the amount of question records (QDCOUNT), answer
1867 records (ANCOUNT), authority records (NSCOUNT), and additional
1868 records (ARCOUNT).<a href="#section-6-1" class="pilcrow">¶</a></p>
1869 <p id="section-6-2">
1870 <a href="#snippet_6" class="xref">Figure 6</a> illustrates a recurring implementation anti-pattern for a
1871 function that processes DNS RRs. The function "process_dns_records()"
1872 extracts the value of ANCOUNT ("num_answers") and the pointer to the
1873 DNS data payload ("data_ptr"). The function processes answer records
1874 in a loop, decrementing the "num_answers" value after processing each
1875 record until the value of "num_answers" becomes zero. For
1876 simplicity, we assume that there is only one domain name per answer.
1877 Inside the loop, the code calculates the domain name length
1878 ("name_length") and adjusts the data payload pointer ("data_ptr") by the
1879 offset that corresponds to "name_length + 1", so that the pointer
1880 lands on the first answer record. Next, the answer record is
1881 retrieved and processed, and the "num_answers" value is decremented.<a href="#section-6-2" class="pilcrow">¶</a></p>
1882 <span id="name-a-broken-implementation-of-a-f"></span><div id="snippet_6">
1883 <figure id="figure-6">
1884 <div id="section-6-3.1">
1885 <pre class="lang-pseudocode sourcecode">
1886 1: process_dns_records(dns_header, ...) {
1887 // ...
1888 2: num_answers = dns_header-&gt;ancount
1889 3: data_ptr = dns_header-&gt;data
1890 4:
1891 5: while (num_answers &gt; 0) {
1892 6: name_length = get_name_length(data_ptr);
1893 7: data_ptr += name_length + 1;
1894 8:
1895 9: answer = (struct dns_answer_record *)data_ptr;
1896 10:
1897 11: // process the answer record
1898 12:
1899 13: --num_answers;
1900 14: }
1901 // ...
1902 15: }
1903 </pre>
1904 </div>
1905 <figcaption><a href="#figure-6" class="selfRef">Figure 6</a>:
1906 <a href="#name-a-broken-implementation-of-a-f" class="selfRef">A Broken Implementation of a Function That Processes RRs</a>
1907 </figcaption></figure>
1908 </div>
1909 <p id="section-6-4">
1910 If the ANCOUNT number retrieved from the header
1911 ("dns_header-&gt;ancount") is not checked against the amount of data
1912 available in the packet and it is, for example, larger than the number of
1913 answer records available, the data pointer ("data_ptr") will read outside
1914 the bounds of the packet. This may result in Denial-of-Service
1915 conditions.<a href="#section-6-4" class="pilcrow">¶</a></p>
1916 <p id="section-6-5">
1917 In this section, we used an example of processing answer records.
1918 However, the same logic is often reused for implementing the
1919 processing of other types of records, e.g., the number of question
1920 (QDCOUNT), authority (NSCOUNT), and additional (ARCOUNT) records. The
1921 specified numbers of these records must correspond to the actual data
1922 present within the packet. Therefore, all record count fields must
1923 be checked before fully parsing the contents of a packet.
1924 Specifically, <span><a href="https://www.rfc-editor.org/rfc/rfc5625#section-6.3" class="relref">Section 6.3</a> of [<a href="#RFC5625" class="xref">RFC5625</a>]</span> recommends that such malformed
1925 DNS packets should be dropped and (optionally) logged.<a href="#section-6-5" class="pilcrow">¶</a></p>
1926 <p id="section-6-6">
1927 Examples of vulnerable implementations can be found in the code
1928 relevant to <span>[<a href="#CVE-2020-25109" class="xref">CVE-2020-25109</a>]</span>, <span>[<a href="#CVE-2020-24340" class="xref">CVE-2020-24340</a>]</span>, <span>[<a href="#CVE-2020-24334" class="xref">CVE-2020-24334</a>]</span>, and
1929 <span>[<a href="#CVE-2020-27737" class="xref">CVE-2020-27737</a>]</span>.<a href="#section-6-6" class="pilcrow">¶</a></p>
1930 </section>
1931 </div>
1932 <div id="sect-7">
1933 <section id="section-7">
1934 <h2 id="name-security-considerations">
1935 <a href="#section-7" class="section-number selfRef">7. </a><a href="#name-security-considerations" class="section-name selfRef">Security Considerations</a>
1936 </h2>
1937 <p id="section-7-1">
1938 Security issues are discussed throughout this memo; it
1939 discusses implementation flaws (anti-patterns) that affect the
1940 functionality of processing DNS RRs. The presence of such
1941 anti-patterns leads to bugs that cause buffer overflows,
1942 read-out-of-bounds, and infinite-loop issues. These issues have the
1943 following security impacts: information leaks, Denial-of-Service attacks, and
1944 Remote Code Execution attacks.<a href="#section-7-1" class="pilcrow">¶</a></p>
1945 <p id="section-7-2">
1946 This document lists general recommendations for the developers of DNS
1947 record parsing functionality that allow those developers to prevent such
1948 implementation flaws, e.g., by rigorously checking the data received
1949 over the wire before processing it.<a href="#section-7-2" class="pilcrow">¶</a></p>
1950 </section>
1951 </div>
1952 <div id="sect-8">
1953 <section id="section-8">
1954 <h2 id="name-iana-considerations">
1955 <a href="#section-8" class="section-number selfRef">8. </a><a href="#name-iana-considerations" class="section-name selfRef">IANA Considerations</a>
1956 </h2>
1957 <p id="section-8-1">
1958 This document has no IANA actions. Please see
1959 <span>[<a href="#RFC6895" class="xref">RFC6895</a>]</span> for a complete review of the IANA considerations
1960 introduced by DNS.<a href="#section-8-1" class="pilcrow">¶</a></p>
1961 </section>
1962 </div>
1963 <section id="section-9">
1964 <h2 id="name-references">
1965 <a href="#section-9" class="section-number selfRef">9. </a><a href="#name-references" class="section-name selfRef">References</a>
1966 </h2>
1967 <section id="section-9.1">
1968 <h3 id="name-normative-references">
1969 <a href="#section-9.1" class="section-number selfRef">9.1. </a><a href="#name-normative-references" class="section-name selfRef">Normative References</a>
1970 </h3>
1971 <dl class="references">
1972 <dt id="RFC1035">[RFC1035]</dt>
1973 <dd>
1974 <span class="refAuthor">Mockapetris, P.</span>, <span class="refTitle">"Domain names - implementation and specification"</span>, <span class="seriesInfo">STD 13</span>, <span class="seriesInfo">RFC 1035</span>, <span class="seriesInfo">DOI 10.17487/RFC1035</span>, <time datetime="1987-11" class="refDate">November 1987</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc1035">https://www.rfc-editor.org/info/rfc1035</a>&gt;</span>. </dd>
1975 <dd class="break"></dd>
1976 <dt id="RFC5625">[RFC5625]</dt>
1977 <dd>
1978 <span class="refAuthor">Bellis, R.</span>, <span class="refTitle">"DNS Proxy Implementation Guidelines"</span>, <span class="seriesInfo">BCP 152</span>, <span class="seriesInfo">RFC 5625</span>, <span class="seriesInfo">DOI 10.17487/RFC5625</span>, <time datetime="2009-08" class="refDate">August 2009</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc5625">https://www.rfc-editor.org/info/rfc5625</a>&gt;</span>. </dd>
1979 <dd class="break"></dd>
1980 </dl>
1981 </section>
1982 <section id="section-9.2">
1983 <h3 id="name-informative-references">
1984 <a href="#section-9.2" class="section-number selfRef">9.2. </a><a href="#name-informative-references" class="section-name selfRef">Informative References</a>
1985 </h3>
1986 <dl class="references">
1987 <dt id="CVE-2000-0333">[CVE-2000-0333]</dt>
1988 <dd>
1989 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2000-0333: A denial-of-service vulnerability in tcpdump, Ethereal, and other sniffer packages via malformed DNS packets"</span>, <time datetime="2000" class="refDate">2000</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2000-0333">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2000-0333</a>&gt;</span>. </dd>
1990 <dd class="break"></dd>
1991 <dt id="CVE-2017-9345">[CVE-2017-9345]</dt>
1992 <dd>
1993 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2017-9345: An infinite loop in the DNS dissector of Wireshark"</span>, <time datetime="2017" class="refDate">2017</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9345">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9345</a>&gt;</span>. </dd>
1994 <dd class="break"></dd>
1995 <dt id="CVE-2020-15795">[CVE-2020-15795]</dt>
1996 <dd>
1997 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-15795: A denial-of-service and remote code execution vulnerability DNS domain name label parsing functionality of Nucleus NET"</span>, <time datetime="2021" class="refDate">2021</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15795">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15795</a>&gt;</span>. </dd>
1998 <dd class="break"></dd>
1999 <dt id="CVE-2020-17440">[CVE-2020-17440]</dt>
2000 <dd>
2001 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-17440 A denial-of-service vulnerability in the DNS name parsing implementation of uIP"</span>, <time datetime="2020" class="refDate">2020</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-17440">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-17440</a>&gt;</span>. </dd>
2002 <dd class="break"></dd>
2003 <dt id="CVE-2020-24334">[CVE-2020-24334]</dt>
2004 <dd>
2005 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-24334: An out-of-bounds read and denial-of-service vulnerability in the DNS response parsing functionality of uIP"</span>, <time datetime="2020" class="refDate">2020</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24334">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24334</a>&gt;</span>. </dd>
2006 <dd class="break"></dd>
2007 <dt id="CVE-2020-24335">[CVE-2020-24335]</dt>
2008 <dd>
2009 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-24335: A memory corruption vulnerability in domain name parsing routines of uIP"</span>, <time datetime="2020" class="refDate">2020</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24335">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24335</a>&gt;</span>. </dd>
2010 <dd class="break"></dd>
2011 <dt id="CVE-2020-24336">[CVE-2020-24336]</dt>
2012 <dd>
2013 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-24336: A buffer overflow vulnerability in the DNS implementation of Contiki and Contiki-NG"</span>, <time datetime="2020" class="refDate">2020</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24336">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24336</a>&gt;</span>. </dd>
2014 <dd class="break"></dd>
2015 <dt id="CVE-2020-24338">[CVE-2020-24338]</dt>
2016 <dd>
2017 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-24338: A denial-of-service and remote code execution vulnerability in the DNS domain name record decompression functionality of picoTCP"</span>, <time datetime="2020" class="refDate">2020</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24338">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24338</a>&gt;</span>. </dd>
2018 <dd class="break"></dd>
2019 <dt id="CVE-2020-24339">[CVE-2020-24339]</dt>
2020 <dd>
2021 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-24339: An out-of-bounds read and denial-of-service vulnerability in the DNS domain name record decompression functionality of picoTCP"</span>, <time datetime="2020" class="refDate">2020</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24339">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24339</a>&gt;</span>. </dd>
2022 <dd class="break"></dd>
2023 <dt id="CVE-2020-24340">[CVE-2020-24340]</dt>
2024 <dd>
2025 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-24340: An out-of-bounds read and denial-of-service vulnerability in the DNS response parsing functionality of picoTCP"</span>, <time datetime="2020" class="refDate">2020</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24340">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24340</a>&gt;</span>. </dd>
2026 <dd class="break"></dd>
2027 <dt id="CVE-2020-24383">[CVE-2020-24383]</dt>
2028 <dd>
2029 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-24383: An information leak and denial-of-service vulnerability while parsing mDNS resource records in FNET"</span>, <time datetime="2020" class="refDate">2020</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24383">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24383</a>&gt;</span>. </dd>
2030 <dd class="break"></dd>
2031 <dt id="CVE-2020-25107">[CVE-2020-25107]</dt>
2032 <dd>
2033 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-25107: A denial-of-service and remote code execution vulnerability in the DNS implementation of Ethernut Nut/OS"</span>, <time datetime="2020" class="refDate">2020</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25107">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25107</a>&gt;</span>. </dd>
2034 <dd class="break"></dd>
2035 <dt id="CVE-2020-25108">[CVE-2020-25108]</dt>
2036 <dd>
2037 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-25108: A denial-of-service and remote code execution vulnerability in the DNS implementation of Ethernut Nut/OS"</span>, <time datetime="2020" class="refDate">2020</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25108">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25108</a>&gt;</span>. </dd>
2038 <dd class="break"></dd>
2039 <dt id="CVE-2020-25109">[CVE-2020-25109]</dt>
2040 <dd>
2041 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-25109: A denial-of-service and remote code execution vulnerability in the DNS implementation of Ethernut Nut/OS"</span>, <time datetime="2020" class="refDate">2020</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25109">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25109</a>&gt;</span>. </dd>
2042 <dd class="break"></dd>
2043 <dt id="CVE-2020-25110">[CVE-2020-25110]</dt>
2044 <dd>
2045 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-25110: A denial-of-service and remote code execution vulnerability in the DNS implementation of Ethernut Nut/OS"</span>, <time datetime="2020" class="refDate">2020</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25110">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25110</a>&gt;</span>. </dd>
2046 <dd class="break"></dd>
2047 <dt id="CVE-2020-25767">[CVE-2020-25767]</dt>
2048 <dd>
2049 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-25767: An out-of-bounds read and denial-of-service vulnerability in the DNS name parsing routine of HCC Embedded NicheStack"</span>, <time datetime="2021" class="refDate">2021</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25767">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25767</a>&gt;</span>. </dd>
2050 <dd class="break"></dd>
2051 <dt id="CVE-2020-27009">[CVE-2020-27009]</dt>
2052 <dd>
2053 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-27009: A denial-of-service and remote code execution vulnerability DNS domain name record decompression functionality of Nucleus NET"</span>, <time datetime="2021" class="refDate">2021</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-27009">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-27009</a>&gt;</span>. </dd>
2054 <dd class="break"></dd>
2055 <dt id="CVE-2020-27736">[CVE-2020-27736]</dt>
2056 <dd>
2057 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-27736: An information leak and denial-of-service vulnerability in the DNS name parsing functionality of Nucleus NET"</span>, <time datetime="2021" class="refDate">2021</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-27736">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-27736</a>&gt;</span>. </dd>
2058 <dd class="break"></dd>
2059 <dt id="CVE-2020-27737">[CVE-2020-27737]</dt>
2060 <dd>
2061 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-27737: An information leak and denial-of-service vulnerability in the DNS response parsing functionality of Nucleus NET"</span>, <time datetime="2021" class="refDate">2021</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-27737">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-27737</a>&gt;</span>. </dd>
2062 <dd class="break"></dd>
2063 <dt id="CVE-2020-27738">[CVE-2020-27738]</dt>
2064 <dd>
2065 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-27738: A denial-of-service and remote code execution vulnerability DNS domain name record decompression functionality of Nucleus NET"</span>, <time datetime="2021" class="refDate">2021</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-27738">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-27738</a>&gt;</span>. </dd>
2066 <dd class="break"></dd>
2067 <dt id="I-D.ietf-dnsind-local-compression">[DNS-COMPRESSION]</dt>
2068 <dd>
2069 <span class="refAuthor">Koch, P.</span>, <span class="refTitle">"A New Scheme for the Compression of Domain Names"</span>, <span class="refContent">Work in Progress</span>, <span class="seriesInfo">Internet-Draft, draft-ietf-dnsind-local-compression-05</span>, <time datetime="1999-06-30" class="refDate">30 June 1999</time>, <span>&lt;<a href="https://datatracker.ietf.org/doc/html/draft-ietf-dnsind-local-compression-05">https://datatracker.ietf.org/doc/html/draft-ietf-dnsind-local-compression-05</a>&gt;</span>. </dd>
2070 <dd class="break"></dd>
2071 <dt id="DNSPOOQ">[DNSPOOQ]</dt>
2072 <dd>
2073 <span class="refAuthor">Kol, M.</span> and <span class="refAuthor">S. Oberman</span>, <span class="refTitle">"DNSpooq: Cache Poisoning and RCE in Popular DNS Forwarder dnsmasq"</span>, <span class="refContent">JSOF Technical Report</span>, <time datetime="2021-01" class="refDate">January 2021</time>, <span>&lt;<a href="https://www.jsof-tech.com/wp-content/uploads/2021/01/DNSpooq-Technical-WP.pdf">https://www.jsof-tech.com/wp-content/uploads/2021/01/DNSpooq-Technical-WP.pdf</a>&gt;</span>. </dd>
2074 <dd class="break"></dd>
2075 <dt id="RFC6895">[RFC6895]</dt>
2076 <dd>
2077 <span class="refAuthor">Eastlake 3rd, D.</span>, <span class="refTitle">"Domain Name System (DNS) IANA Considerations"</span>, <span class="seriesInfo">BCP 42</span>, <span class="seriesInfo">RFC 6895</span>, <span class="seriesInfo">DOI 10.17487/RFC6895</span>, <time datetime="2013-04" class="refDate">April 2013</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc6895">https://www.rfc-editor.org/info/rfc6895</a>&gt;</span>. </dd>
2078 <dd class="break"></dd>
2079 <dt id="RFC7858">[RFC7858]</dt>
2080 <dd>
2081 <span class="refAuthor">Hu, Z.</span>, <span class="refAuthor">Zhu, L.</span>, <span class="refAuthor">Heidemann, J.</span>, <span class="refAuthor">Mankin, A.</span>, <span class="refAuthor">Wessels, D.</span>, and <span class="refAuthor">P. Hoffman</span>, <span class="refTitle">"Specification for DNS over Transport Layer Security (TLS)"</span>, <span class="seriesInfo">RFC 7858</span>, <span class="seriesInfo">DOI 10.17487/RFC7858</span>, <time datetime="2016-05" class="refDate">May 2016</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc7858">https://www.rfc-editor.org/info/rfc7858</a>&gt;</span>. </dd>
2082 <dd class="break"></dd>
2083 <dt id="RFC8484">[RFC8484]</dt>
2084 <dd>
2085 <span class="refAuthor">Hoffman, P.</span> and <span class="refAuthor">P. McManus</span>, <span class="refTitle">"DNS Queries over HTTPS (DoH)"</span>, <span class="seriesInfo">RFC 8484</span>, <span class="seriesInfo">DOI 10.17487/RFC8484</span>, <time datetime="2018-10" class="refDate">October 2018</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc8484">https://www.rfc-editor.org/info/rfc8484</a>&gt;</span>. </dd>
2086 <dd class="break"></dd>
2087 <dt id="SADDNS">[SADDNS]</dt>
2088 <dd>
2089 <span class="refAuthor">Man, K.</span>, <span class="refAuthor">Qian, Z.</span>, <span class="refAuthor">Wang, Z.</span>, <span class="refAuthor">Zheng, X.</span>, <span class="refAuthor">Huang, Y.</span>, and <span class="refAuthor">H. Duan</span>, <span class="refTitle">"DNS Cache Poisoning Attack Reloaded: Revolutions with Side Channels"</span>, <span class="refContent">Proc. 2020 ACM SIGSAC Conference on Computer and Communications Security, CCS '20</span>, <span class="seriesInfo">DOI 10.1145/3372297.3417280</span>, <time datetime="2020-11" class="refDate">November 2020</time>, <span>&lt;<a href="https://dl.acm.org/doi/pdf/10.1145/3372297.3417280">https://dl.acm.org/doi/pdf/10.1145/3372297.3417280</a>&gt;</span>. </dd>
2090 <dd class="break"></dd>
2091 <dt id="SIGRED">[SIGRED]</dt>
2092 <dd>
2093 <span class="refAuthor">Common Vulnerabilities and Exposures</span>, <span class="refTitle">"CVE-2020-1350: A remote code execution vulnerability in Windows Domain Name System servers"</span>, <time datetime="2020" class="refDate">2020</time>, <span>&lt;<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-1350">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-1350</a>&gt;</span>. </dd>
2094 <dd class="break"></dd>
2095 </dl>
2096 </section>
2097 </section>
2098 <div id="acknowledgements">
2099 <section id="appendix-A">
2100 <h2 id="name-acknowledgements">
2101 <a href="#name-acknowledgements" class="section-name selfRef">Acknowledgements</a>
2102 </h2>
2103 <p id="appendix-A-1">
2104 We would like to thank <span class="contact-name">Shlomi Oberman</span>, who has greatly contributed to
2105 the research that led to the creation of this document.<a href="#appendix-A-1" class="pilcrow">¶</a></p>
2106 </section>
2107 </div>
2108 <div id="authors-addresses">
2109 <section id="appendix-B">
2110 <h2 id="name-authors-addresses">
2111 <a href="#name-authors-addresses" class="section-name selfRef">Authors' Addresses</a>
2112 </h2>
2113 <address class="vcard">
2114 <div dir="auto" class="left"><span class="fn nameRole">Stanislav Dashevskyi</span></div>
2115 <div dir="auto" class="left"><span class="org">Forescout Technologies</span></div>
2116 <div dir="auto" class="left"><span class="street-address">John F. Kennedylaan, 2</span></div>
2117 <div dir="auto" class="left">
2118 <span class="postal-code">5612AB</span> <span class="locality">Eindhoven</span>
2119 </div>
2120 <div dir="auto" class="left"><span class="country-name">Netherlands</span></div>
2121 <div class="email">
2122 <span>Email:</span>
2123 <a href="mailto:[email protected]" class="email">[email protected]</a>
2124 </div>
2125 </address>
2126 <address class="vcard">
2127 <div dir="auto" class="left"><span class="fn nameRole">Daniel dos Santos</span></div>
2128 <div dir="auto" class="left"><span class="org">Forescout Technologies</span></div>
2129 <div dir="auto" class="left"><span class="street-address">John F. Kennedylaan, 2</span></div>
2130 <div dir="auto" class="left">
2131 <span class="postal-code">5612AB</span> <span class="locality">Eindhoven</span>
2132 </div>
2133 <div dir="auto" class="left"><span class="country-name">Netherlands</span></div>
2134 <div class="email">
2135 <span>Email:</span>
2136 <a href="mailto:[email protected]" class="email">[email protected]</a>
2137 </div>
2138 </address>
2139 <address class="vcard">
2140 <div dir="auto" class="left"><span class="fn nameRole">Jos Wetzels</span></div>
2141 <div dir="auto" class="left"><span class="org">Forescout Technologies</span></div>
2142 <div dir="auto" class="left"><span class="street-address">John F. Kennedylaan, 2</span></div>
2143 <div dir="auto" class="left">
2144 <span class="postal-code">5612AB</span> <span class="locality">Eindhoven</span>
2145 </div>
2146 <div dir="auto" class="left"><span class="country-name">Netherlands</span></div>
2147 <div class="email">
2148 <span>Email:</span>
2149 <a href="mailto:[email protected]" class="email">[email protected]</a>
2150 </div>
2151 </address>
2152 <address class="vcard">
2153 <div dir="auto" class="left"><span class="fn nameRole">Amine Amri</span></div>
2154 <div dir="auto" class="left"><span class="org">Forescout Technologies</span></div>
2155 <div dir="auto" class="left"><span class="street-address">John F. Kennedylaan, 2</span></div>
2156 <div dir="auto" class="left">
2157 <span class="postal-code">5612AB</span> <span class="locality">Eindhoven</span>
2158 </div>
2159 <div dir="auto" class="left"><span class="country-name">Netherlands</span></div>
2160 <div class="email">
2161 <span>Email:</span>
2162 <a href="mailto:[email protected]" class="email">[email protected]</a>
2163 </div>
2164 </address>
2165 </section>
2166 </div>
2167 <script>const toc = document.getElementById("toc");
2168 toc.querySelector("h2").addEventListener("click", e => {
2169 toc.classList.toggle("active");
2170 });
2171 toc.querySelector("nav").addEventListener("click", e => {
2172 toc.classList.remove("active");
2173 });
2174 </script>
2175 </body>
2176 </html>