+20 November 2018: Wouter
+ - Scrub NS records from NXDOMAIN responses to stop fragmentation
+ poisoning of the cache.
+
19 November 2018: Wouter
- Support SO_REUSEPORT_LB in FreeBSD 12 with the so-reuseport: yes
option in unbound.conf.
"RRset:", pkt, msg, prev, &rrset);
continue;
}
+ /* we don't want NS sets for NXDOMAIN answers,
+ * because they could contain poisonous contents,
+ * from. eg. fragmentation attacks, inserted after
+ * long RRSIGs in the packet get to the packet
+ * border and such */
+ if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NXDOMAIN) {
+ remove_rrset("normalize: removing irrelevant "
+ "RRset:", pkt, msg, prev, &rrset);
+ continue;
+ }
if(nsset == NULL) {
nsset = rrset;
} else {
SECTION AUTHORITY
; at TTL 5 because TTL is capped at min-ttl of 5 in rdata of SOA
example.com. 5 IN SOA a. b. 1 2 3 4 5
-example.com. 1800 IN NS ns.example.com.
+;example.com. 1800 IN NS ns.example.com.
SECTION ADDITIONAL
-ns.example.com. 1800 IN A 1.2.3.4
+;ns.example.com. 1800 IN A 1.2.3.4
ENTRY_END
; after another 1900 seconds the domain must have timed out.
SECTION AUTHORITY
; at TTL 5 because TTL capped at ttl of minttl in rdata of SOA.
example.com. 5 IN SOA a. b. 1 2 3 4 5
-example.com. 3600 IN NS nsb.example.com.
+;example.com. 3600 IN NS nsb.example.com.
SECTION ADDITIONAL
-nsb.example.com. 3600 IN A 1.2.3.4
+;nsb.example.com. 3600 IN A 1.2.3.4
ENTRY_END
STEP 62 QUERY
SECTION AUTHORITY
; at TTL 5 because TTL capped at ttl of minttl in rdata of SOA.
example.com. 5 IN SOA a. b. 1 2 3 4 5
-example.com. 1800 IN NS nsb.example.com.
+;example.com. 1800 IN NS nsb.example.com.
SECTION ADDITIONAL
-nsb.example.com. 3600 IN A 1.2.3.4
+;nsb.example.com. 3600 IN A 1.2.3.4
ENTRY_END
; after another 1900 seconds the domain must have timed out.