b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
1f133e0d538305edfce55198abadaa9a32ab23ab |
|
07-Feb-2016 |
Torstein Husebø <torstein@huseboe.net> |
treewide: fix typos and spacing |
4709152273da904745d66516afe4e0c9e64733b5 |
|
31-Jan-2016 |
Michael Olbrich <m.olbrich@pengutronix.de> |
resolved: allow building without libgcrypt |
421cc89d3088a39ea67610e6085440f84b963e99 |
|
31-Jan-2016 |
Michael Olbrich <m.olbrich@pengutronix.de> |
resolved: make dnssec_nsec_test_enclosed() static
It's not used anywhere else. |
dbf0b8a2811bacc8761094afc7620c0bb103066e |
|
31-Jan-2016 |
Michael Olbrich <m.olbrich@pengutronix.de> |
resolved: reorder functions
Preparation to make gcrypt optional. |
720652b30bf38f55aa52cb99e5bbaef0d6057c10 |
|
26-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
update TODO
This gets rid of the private DNSSEC TODO and moves it in the main TODO dump site, as the DNSSEC implementation is
pretty complete now, and the remaining bits are low-priority. |
cbd100ac7cb74d7d44c7e6dda09d26b2616776f7 |
|
25-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: don't insist in RRSIG metadata for NSEC3 RRs that have not been authenticated
In some cases we get NSEC3 RRs that have not been authenticated (because the chain of trust to the root is somewhere
broken). We can use these for checking negative replies, as long as we don't claim they were ultimately authenticated.
This means we need to be able to deal with NSEC3 RRs that lack RRSIG metadata. |
b8b143c5ff6f8dd91297f961553a3c24f0694ae9 |
|
25-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
update DNSSEC TODO |
59c5b5974d106c5ebad080739b41d0e92ab74d29 |
|
25-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: log each time we increase the DNSSEC verdict counters
Also, don't consider RRs that aren't primary to the lookups we do as relevant to the lookups. |
352af30838f130bf7aaa36dd6174945c11f39d29 |
|
25-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolve: use different bitmap checking rules when we find an exact NSEC3 match, or just a covering enclosure
If we are looking for a DS RR we need to check the NSEC3 bitmap of the parent zone's NSEC3 RR, not the one from the
child. For any other RR we need to look at the child's however, hence enforce this with the bitmaps.
Note that not coverign checks only the lower zone's NSEC3 bitmaps matter, hence the existing check is fine. |
f009fda92c67ee78672f519a62ce675170cdae4c |
|
18-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
update DNSSEC TODO |
23b298bce75a0d1f4f15f34458af9678b4a30c3a |
|
18-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: rework IDNA logic
Move IDNA logic out of the normal domain name processing, and into the bus frontend calls. Previously whenever
comparing two domain names we'd implicitly do IDNA conversion so that "pöttering.de" and "xn--pttering-n4a.de" would be
considered equal. This is problematic not only for DNSSEC, but actually also against he IDNA specs.
Moreover it creates problems when encoding DNS-SD services in classic DNS. There, the specification suggests using
UTF8 encoding for the actual service name, but apply IDNA encoding to the domain suffix.
With this change IDNA conversion is done only:
- When the user passes a non-ASCII hostname when resolving a host name using ResolveHostname()
- When the user passes a non-ASCII domain suffix when resolving a service using ResolveService()
No IDNA encoding is done anymore:
- When the user does raw ResolveRecord() RR resolving
- On the service part of a DNS-SD service name
Previously, IDNA encoding was done when serializing names into packets, at a point where information whether something
is a label that needs IDNA encoding or not was not available, but at a point whether it was known whether to generate a
classic DNS packet (where IDNA applies), or an mDNS/LLMNR packet (where IDNA does not apply, and UTF8 is used instead
for all host names). With this change each DnsQuery object will now maintain two copies of the DnsQuestion to ask: one
encoded in IDNA for use with classic DNS, and one encoded in UTF8 for use with LLMNR and MulticastDNS. |
c15493f4822b7176f0a6449e8f335844f512eed4 |
|
17-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: update DNSSEC TODO |
afc58cc2fb5841154fe036ee7a6e1c8a06bc5d29 |
|
17-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: update RFCs list and TODO list |
ab481675f98d3d3f12e7e48ba6d2159123b9c7bf |
|
17-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: complete NSEC non-existance proofs
This fills in the last few gaps:
- When checking if a domain is non-existing, also check that no wildcard for it exists
- Ensure we don't base "covering" tests on NSEC RRs from a parent zone
- Refuse to accept expanded wildcard NSEC RRs for absence proofs. |
d86c982a3476bcff39a196868c835309c7a6c7fc |
|
17-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: make sure the NSEC proof-of-non-existance check also looks for wildcard domains |
b9282bc12840aff500a334836226f6b8df24926d |
|
17-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: on negative NODATA replies, properly deal with empty non-terminals
empty non-terminals generally lack NSEC RRs, which means we can deduce their existance only from the fact that there
are other RRs that contain them in their suffix. Specifically, the NSEC proof for NODATA on ENTs works by sending the
NSEC whose next name is a suffix of the queried name to the client. Use this information properly. |
96bb76734d8e1c8520a2456901079610813eac6d |
|
17-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: rename dnssec_verify_dnskey() → dnssec_verify_dnskey_by_ds()
This should clarify that this is not regular signature-based validation, but validation through DS RR fingerprints. |
93a3b9294f7fa98ee10c66163f86cd0232728453 |
|
17-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: be stricter when using NSEC3
We can user signer and synthesizing source information to check that the NSEC3 RRs we want to use are
actually reasonable and properly signed. |
97c67192eadaffe67b803ec5b991a92bb1137d0b |
|
17-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: when validating an RRset, store information about the synthesizing source and zone in each RR
Having this information available is useful when we need to check whether various RRs are suitable for proofs. This
information is stored in the RRs as number of labels to skip from the beginning of the owner name to reach the
synthesizing source/signer. Simple accessor calls are then added to retrieve the signer/source from the RR using this
information.
This also moves validation of a a number of RRSIG parameters into a new call dnssec_rrsig_prepare() that as side-effect
initializes the two numeric values. |
1827a1582cbd9dcd1ce337b2404ec4425cb0dfd0 |
|
17-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: do not use NSEC RRs from the wrong zone for proofs
When proving NODATA DS lookups we need to insist on looking at the parent zone's NSEC RR, not the child zone's.
When proving any other NODATA lookups we need to insist on looking at the child zone's NSEC RR, not the parent's. |
54b778e7d63ce0af0d5e9401b563c6dd28eff9d3 |
|
17-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: ignore DS RRs without generating an error if they use an unsupported digest algorithm |
588c53d0441ee33b617582429434b47492f51744 |
|
17-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: some RR types may appear only or not at all in a zone apex
Add extra checks when validating with RRSIGs. This follows recommendations from:
http://www.george-barwood.pwp.blueyonder.co.uk/DnsServer/NotesOnDNSSSEC.htm |
e926785a1feff01901e6298261a9f635791d3b17 |
|
13-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: implement the full NSEC and NSEC3 postive wildcard proofs |
e8233bce196a14fa3ebde2969594fcdfa4404e19 |
|
13-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: refuse validating wildcard RRs for SOA, NSEC3, DNAME |
7160eb1b867a4bc64522287352fbe2a6aa687d2a |
|
13-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: properly handles RRs in domains beginning in an asterisk label
Properly handle RRs that begin with an asterisk label. These are the unexpanded forms of wildcard domains and appear in
NSEC RRs for example. We need to make sure we handle the signatures of these RRs properly, since they mostly are
considered normal RRs, except that the RRSIG labels counter is one off for them, as the asterisk label is always
excluded of the signature. |
7715f91dca0ce4622daf8beab582d57ec49d005e |
|
13-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: optimize dnssec_verify_rrset() a bit
Let's determine the source of synthesis once instead of for each RR in the RRset. |
d41084a5860999e7fd45a95130a2444dda035d7d |
|
13-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: allocate bounded strings on stack instead of heap, if we can |
5ae5cd4052d85368ec0ca17562d404fa476badc5 |
|
13-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: consider inverted RRSIG validity intervals expired |
0c7bff0acc8fd04bac9bfd16d696139951149ceb |
|
11-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: properly look for NSEC/NSEC3 RRs when getting a positive wildcard response
This implements RFC 5155, Section 8.8 and RFC 4035, Section 5.3.4:
When we receive a response with an RRset generated from a wildcard we
need to look for one NSEC/NSEC3 RR that proves that there's no explicit RR
around before we accept the wildcard RRset as response.
This patch does a couple of things: the validation calls will now
identify wildcard signatures for us, and let us know the RRSIG used (so
that the RRSIG's signer field let's us know what the wildcard was that
generate the entry). Moreover, when iterating trough the RRsets of a
response we now employ three phases instead of just two.
a) in the first phase we only look for DNSKEYs RRs
b) in the second phase we only look for NSEC RRs
c) in the third phase we look for all kinds of RRs
Phase a) is necessary, since DNSKEYs "unlock" more signatures for us,
hence we shouldn't assume a key is missing until all DNSKEY RRs have
been processed.
Phase b) is necessary since NSECs need to be validated before we can
validate wildcard RRs due to the logic explained above.
Phase c) validates everything else. This phase also handles RRsets that
cannot be fully validated and removes them or lets the transaction fail. |
cdbffec026d5212a6db3fbf0391a0da926aaa09a |
|
11-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: split up nsec3_hashed_domain() into two calls
There's now nsec3_hashed_domain_format() and nsec3_hashed_domain_make().
The former takes a hash value and formats it as domain, the latter takes
a domain name, hashes it and then invokes nsec3_hashed_domain_format().
This way we can reuse more code, as the formatting logic can be unified
between this call and another place. |
3f5ecaad3cf914d3c6fa1ab67947e1262f93bea5 |
|
11-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: drop flags unused parameter from nsec3_is_good |
b577e3d589ec00f6d96e90b0d4bf344dbd40cd76 |
|
11-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
basic: introduce generic ascii_strlower_n() call and make use of it everywhere |
0f23174c5c21f90929b3ee39fee48b774949510d |
|
11-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: use dns_answer_size() where appropriate to handle NULL DnsAnswer |
7e35195fe3240b5c325dcf4d74621ec87a5d2b55 |
|
11-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: rename suffix_rr → zone_rr
The domain name for this NSEC3 RR was originally stored in a variable
called "suffix", which was then renamed to "zone" in
d1511b3338f431de3c95a50a9c1aca297e0c0734. Hence also rename the
RR variable accordingly. |
3a33c81bfea2105c8086aadfe4e52415fa7b884e |
|
11-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: fix NSEC3 iterations limit to what RFC5155 suggests |
28bf03b5265be30079630b5bc2c3dafc13fce27b |
|
06-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
update DNSSEC TODO |
d1d1d4b807bc0fdffb64077fe724588ca3af8376 |
|
05-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
update DNSSEC TODO |
ad6c04756115809d615dede330213d73edf732a8 |
|
05-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved,networkd: add a per-interface DNSSEC setting
This adds a DNSSEC= setting to .network files, and makes resolved honour
them. |
1ed8c0fbb4cc51413f3a6025233f41c19f154bc1 |
|
05-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: rename "downgrade-ok" mode to "allow-downgrade"
After discussing this with Tom, we figured out "allow-downgrade" sounds
nicer. |
d3760be01b120df8980c056ecc85a4229d660264 |
|
05-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: when caching negative responses, honour NSEC/NSEC3 TTLs
When storing negative responses, clamp the SOA minimum TTL (as suggested
by RFC2308) to the TTL of the NSEC/NSEC3 RRs we used to prove
non-existance, if it there is any.
This is necessary since otherwise an attacker might put together a faked
negative response for one of our question including a high-ttl SOA RR
for any parent zone, and we'd use trust the TTL. |
6f8a2c6817e35ca3e76130b31624f7f30e596433 |
|
04-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
update DNSSEC TODO |
0c8570287400ba57d3705a2f62dd26039121ea6f |
|
04-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: partially implement RFC5011 Trust Anchor support
With this patch resolved will properly handle revoked keys, but not
augment the locally configured trust anchor database with newly learned
keys.
Specifically, resolved now refuses validating RRsets with
revoked keys, and it will remove revoked keys from the configured trust
anchors (only until reboot).
This patch does not add logic for adding new keys to the set of trust
anchors. This is a deliberate decision as this only can work with
persistent disk storage, and would result in a different update logic
for stateful and stateless systems. Since we have to support stateless
systems anyway, and don't want to encourage two independent upgrade
paths we focus on upgrading the trust anchor database via the usual OS
upgrade logic.
Whenever a trust anchor entry is found revoked and removed from the
trust anchor a recognizable log message is written, encouraging the user
to update the trust anchor or update his operating system. |
85aeaccc10b111e8d16d3879b7c30a219ee6e10a |
|
04-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: fix DNSSEC canonical ordering logic
When applying canonical DNSSEC ordering for an RRset only order by the
wire format of the RRs' RDATA, not by the full wire formatting. The RFC
isn't particularly clear about this, but this is apparently how it is
done. This fixes validation of pentagon.gov's DS RRset. |
28b8191e2f391f043d380d47eb79ed9ff66f14bd |
|
03-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: never authenticate RRsets with revoked keys |
1d3db294fca96fff0a7f8cff4eeeb42460ac21ac |
|
03-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: print a log message when we ignore an NSEC3 RR with an excessive amount of iterations |
8e54f5d90a6b9dd1ff672fb97ea98de66c49e332 |
|
03-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: add negative trust anchro support, and add trust anchor configuration files
This adds negative trust anchor support and allows reading trust anchor
data from disk, from files
/etc/systemd/dnssec-trust-anchors.d/*.positive and
/etc/systemd/dnssec-trust-anchros.d/*.negative, as well as the matching
counterparts in /usr/lib and /run.
The positive trust anchor files are more or less compatible to normal
DNS zone files containing DNSKEY and DS RRs. The negative trust anchor
files contain only new-line separated hostnames for which to require no
signing.
By default no trust anchor files are installed, in which case the
compiled-in root domain DS RR is used, as before. As soon as at least
one positive root anchor for the root is defined via trust anchor files
this buil-in DS RR is not added though. |
35ad41d361a2d9e766f2d7689b92cfbc4304ddbd |
|
03-Jan-2016 |
Tom Gundersen <teg@jklm.no> |
resolved: dnssec - properly take wildcards into account in NESC3 proof
For NXDOMAIN, it is not sufficient to prove that the next-closest
enclosure does not exist, we must also prove that there is no
wildcard domain directly below the closest enclosure which would
synthesise the name that has been requested.
For positive responses, in addition to exact matches, we should
accept wildcard ones. In that case we must first prove that
there is no precise match (i.e., that the closest encounter
is not the record itself) and secondly that the source of
synthesis exists. |
6f76ec5a7b174bea43ab16af2dc4f91314940bd5 |
|
03-Jan-2016 |
Tom Gundersen <teg@jklm.no> |
resolved: dnssec - factor out hashed domain generation |
146035b3bb2e9a60d82c8816de67c83691d6cbc4 |
|
03-Jan-2016 |
Tom Gundersen <teg@jklm.no> |
resolved: don't conclude NODATA if CNAME exists
Instead introduce the new return-code DNSSEC_NSEC_CNAME to indicate
this condition. See RFC 6840, Section 4.3. |
a8f158b9296c7bc1d0f627715e626cc50a331efc |
|
02-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: don't accept NSEC3 iteration fields unbounded |
964067666fbf7f4a5edc06d3eb4845c35457c858 |
|
01-Jan-2016 |
Tom Gundersen <teg@jklm.no> |
resolved: dnssec - add reference to the algorithm we implement |
b2c2a1b95dcdd5aaa3e4b7c36c94a8ba8912a983 |
|
01-Jan-2016 |
Tom Gundersen <teg@jklm.no> |
resolved: dnssec - prepend hashed labels to zone name
All hashed names consist of the hashed label prepended to the zone name, not to the
closest enclosure. |
d1511b3338f431de3c95a50a9c1aca297e0c0734 |
|
01-Jan-2016 |
Tom Gundersen <teg@jklm.no> |
resolved: dnssec - rename some variables
Makes the NSEC3 proof somewhat simpler to follow. |
935a999f7d6881af2e888316be7165801420dc5f |
|
01-Jan-2016 |
Tom Gundersen <teg@jklm.no> |
resoled: dnssec - don't refuse to verify answer due to too many unrelated RRs
Let VERIFY_RRS_MAX be about the max number of RRs in an RRSet that we
actually try to verify, not about the total number of RRs in the RRSet. |
ac04adbeb9d0b19e77a715715be24779f7dcf1b2 |
|
01-Jan-2016 |
Tom Gundersen <teg@jklm.no> |
resolved: dnssec - fix off-by-one in RSA key parsing
If the first byte of the key is zero, the key-length is stored in
the second and third byte (not first and second). |
d15ad74251454d55b715958d8e6f50f45195904a |
|
29-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: NSEC3 hash algorithms are distinct from DS digest algorithms
Previously, we'd use the same set of identifiers for both, but that's
actually incorrect. It didn't matter much since the only NSEC3 hash
algorithm defined (SHA-1) is mapped to code 1 which is also what it is
encoded as in DS digests, but we really should make sure to use two
distinct enumerations. |
0a9a2ac3d3369b5add3b54823d088ba89baa27ab |
|
29-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
update DNSSEC TODO |
6af47493de0ef2b66d4c3fbcdd4a2e12fec4bfba |
|
29-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: add comments referencing various RFCs to various places |
160fbda9079d8edb5f9c4f6c650f23d27578f469 |
|
28-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: update DNSSEC TODO |
ee3d6aff9bd73c1b23e29d1fa1fa6f7a1ef0533b |
|
28-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: use RRSIG expiry and original TTL for cache management
When we verified a signature, fix up the RR's TTL to the original TTL
mentioned in the signature, and store the signature expiry information
in the RR, too. Then, use that when adding RRs to the cache. |
ca994e853c5408fcdeee66580e8b5056ad9e2c15 |
|
28-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: only keep a single list of supported signature algorithms
This removes dnssec_algorithm_supported() and simply uses the
algorithm_to_gcrypt() result as indication whether a DNSSEC algorithm is
supported.
The patch also renames "algorithm" to "md_algorithm", in a few cases, in
order to avoid confusion between DNSSEC signature algorithms and gcrypt
message digest algorithms. |
e0240c64b76ba8f0c9219feb23a5783f23100216 |
|
28-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: add ECDSA signature support |
ea3a892fe39037d71afa43aca12bf1e408a686b4 |
|
28-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: split out RSA-specific code from dnssec_verify_rrset()
In preparation for ECDSA support. |
fbf1a66d78626b028fd7a5f89c5b605cd74d1e9c |
|
28-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: simplify MD algorithm initialization a bit |
af22c65b272f0e7a1c0518c222749f3c09d05438 |
|
28-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: add SHA384 digest support |
c03cba007ade41464bb10777a5389f699d568612 |
|
28-Dec-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
resolve: remove unused variables |
b652d4a2099d1c167584dcc1d179d47c58dc38a2 |
|
26-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: add an automatic downgrade to non-DNSSEC mode
This adds a mode that makes resolved automatically downgrade from DNSSEC
support to classic non-DNSSEC resolving if the configured DNS server is
not capable of DNSSEC. Enabling this mode increases compatibility with
crappy network equipment, but of course opens up the system to
downgrading attacks.
The new mode can be enabled by setting DNSSEC=downgrade-ok in
resolved.conf. DNSSEC=yes otoh remains a "strict" mode, where DNS
resolving rather fails then allow downgrading.
Downgrading is done:
- when the server does not support EDNS0+DO
- or when the server supports it but does not augment returned RRs with
RRSIGs. The latter is detected when requesting DS or SOA RRs for the
root domain (which is necessary to do proofs for unsigned data) |
ed29bfdce6ef8b1c6e14bb4e77e19e7048f35dd4 |
|
26-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: if we accepted unauthenticated NSEC/NSEC3 RRs, use them for proofs
But keep track that the proof is not authenticated. |
d1c4ee32480cb997b673ca8396ca95c70be610f7 |
|
26-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: be stricter when searching for a DS RR for a DNSKEY RR |
3ecc3df8ffa2d40c814fd6c1c4d554994d60b7af |
|
26-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
update DNSSEC TODO |
db5b0e92b3c23e6f360bd0f44a655b35921a6c98 |
|
26-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: tighten search for NSEC3 RRs a bit
Be stricter when searching suitable NSEC3 RRs for proof: generalize the
check we use to find suitable NSEC3 RRs, in nsec3_is_good(), and add
additional checks, such as checking whether all NSEC3 RRs use the same
parameters, have the same suffix and so on. |
13b78323bad1e41e0474b833da2a0b72aab56f09 |
|
26-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: when doing NSEC3 proof, first find right NSEC3 suffix
When doing an NSEC3 proof, before detrmining whether a name is the
closest encloser we first need to figure out the longest common suffix
we have with any NSEC3 RR in the reply. |
e7ff0e0b391341bdc4d9c08dff1c477e1df6a682 |
|
26-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: properly implement RRSIG validation of wildcarded RRsets
Note that this is still not complete, one additional step is still
missing: when we verified that a wildcard RRset is properly signed, we
still need to do an NSEC/NSEC3 proof that no more specific RRset exists. |
3e92a71901960ad9af15ced891d529b2d8ef3c90 |
|
18-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: update TODO |
105e151299dc1208855380be2b22d0db2d66ebc6 |
|
18-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: add support NSEC3 proofs, as well as proofs for domains that are OK to be unsigned
This large patch adds a couple of mechanisms to ensure we get NSEC3 and
proof-of-unsigned support into place. Specifically:
- Each item in an DnsAnswer gets two bit flags now:
DNS_ANSWER_AUTHENTICATED and DNS_ANSWER_CACHEABLE. The former is
necessary since DNS responses might contain signed as well as unsigned
RRsets in one, and we need to remember which ones are signed and which
ones aren't. The latter is necessary, since not we need to keep track
which RRsets may be cached and which ones may not be, even while
manipulating DnsAnswer objects.
- The .n_answer_cachable of DnsTransaction is dropped now (it used to
store how many of the first DnsAnswer entries are cachable), and
replaced by the DNS_ANSWER_CACHABLE flag instead.
- NSEC3 proofs are implemented now (lacking support for the wildcard
part, to be added in a later commit).
- Support for the "AD" bit has been dropped. It's unsafe, and now that
we have end-to-end authentication we don't need it anymore.
- An auxiliary DnsTransaction of a DnsTransactions is now kept around as
least as long as the latter stays around. We no longer remove the
auxiliary DnsTransaction as soon as it completed. THis is necessary,
as we now are interested not only in the RRsets it acquired but also
in its authentication status. |
73b8d8e92894c09669c6634a1a936ba604ebc26a |
|
14-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: update DNSSEC TODO |
72667f0890372a952a7c5b8cc498ec3cf9440973 |
|
14-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: add basic proof of non-existance support for NSEC+NSEC3
Note that this is not complete yet, as we don't handle wildcard domains
correctly, nor handle domains correctly that use empty non-terminals. |
0638401af347c002ab4f8272e100ba209c3ab947 |
|
14-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: initialize libgcrypt before using it |
a1972a9185fcce580a984df0d240d02c5a7cde3c |
|
14-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: rework how we get the gcrypt digest algorithm ID from DNSSEC digest ids
Let's move this into a function digest_to_gcrypt() that we can reuse
later on when implementing NSEC3 validation. |
203f1b35d962bab3c67ecf57ce6bd9ec87bf7078 |
|
11-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: rework dnssec validation results
This adds a new validation result DNSSEC_UNSUPPORTED_ALGORITHM which is
returned when we encounter an unsupported crypto algorithm when trying
to validate RRSIG/DNSKEY combinations. Previously we'd return ENOTSUPP
in this case, but it's better to consider this a non-error DNSSEC
validation result, since our reaction to this case needs to be more like
in cases such as expired or missing keys: we need to keep continue
validation looking for another RRSIG/DNSKEY combination that works
better for us.
This also reworks how dnssec_validate_rrsig_search() propagates errors
from dnssec_validate_rrsig(). Previously, errors such as unsupported
algorithms or expired signatures would not be propagated, but simply be
returned as "missing-key". |
547973dea7abd6c124ff6c79fe2bbe322a7314ae |
|
10-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: chase DNSKEY/DS RRs when doing look-ups with DNSSEC enabled
This adds initial support for validating RRSIG/DNSKEY/DS chains when
doing lookups. Proof-of-non-existance, or proof-of-unsigned-zones is not
implemented yet.
With this change DnsTransaction objects will generate additional
DnsTransaction objects when looking for DNSKEY or DS RRs to validate an
RRSIG on a response. DnsTransaction objects are thus created for three
reasons now:
1) Because a user asked for something to be resolved, i.e. requested by
a DnsQuery/DnsQueryCandidate object.
2) As result of LLMNR RR probing, requested by a DnsZoneItem.
3) Because another DnsTransaction requires the requested RRs for
validation of its own response.
DnsTransactions are shared between all these users, and are GC
automatically as soon as all of these users don't need a specific
transaction anymore.
To unify the handling of these three reasons for existance for a
DnsTransaction, a new common naming is introduced: each DnsTransaction
now tracks its "owners" via a Set* object named "notify_xyz", containing
all owners to notify on completion.
A new DnsTransaction state is introduced called "VALIDATING" that is
entered after a response has been receieved which needs to be validated,
as long as we are still waiting for the DNSKEY/DS RRs from other
DnsTransactions.
This patch will request the DNSKEY/DS RRs bottom-up, and then validate
them top-down.
Caching of RRs is now only done after verification, so that the cache is
not poisoned with known invalid data.
The "DnsAnswer" object gained a substantial number of new calls, since
we need to add/remove RRs to it dynamically now. |
aa89931749f081be8b1f90643c81ae2860257e53 |
|
10-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: when matching up DNSKEY and DS RRs, it's fine if we don't support the DNSKEY's algorithm
As long as we support the digest we are good. |
15accc2765de9cc379eb1042e14b7b519efdb7a0 |
|
10-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: when matching up RRSIG and DNSKEY RRs, use the RRSIG's signer name, not the owner name
When the DNSKEY is in higher zone, then that's OK, and we need to check
the RRSIG's signer name against the DNSKEY hence. |
6c5e8fbf4e4362c7d6db43e316880a16b1ebd620 |
|
10-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: fix sorting of RRsets
We actually maintain an array of pointers to RRs, not of RRs themselves,
fix the qsort() invocation accordingly. |
d12bf2bdff8d616b7e59fc480c7e610003b494df |
|
10-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: fix libgcrypt error checking
libgcrypt encodes the error source in the error code, we need to mask
that away before comparing error codes. |
22ebb9e4a9d8802b194eccc050552d0e188af489 |
|
06-Dec-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
resolve: remove unused variable |
bb1fa24261fd60ec1df6c6c42940c5f764d9246d |
|
03-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: update DNSSEC TODO list a bit |
2cd8727718632ed80fa3871fddf71506c548d770 |
|
03-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: maintain a short TODO list for DNSSEC support in the dnssec C files for now |
24710c48ed16be5fa461fbb303a744a907541daf |
|
03-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: introduce a dnssec_mode setting per scope
The setting controls which kind of DNSSEC validation is done: none at
all, trusting the AD bit, or client-side validation.
For now, no validation is implemented, hence the setting doesn't do much
yet, except of toggling the CD bit in the generated messages if full
client-side validation is requested. |
896c567247371cc14e49774c3b844a7038c37a60 |
|
03-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: add a limit on the max DNSSEC RRSIG expiry skew we allow |
2a44bec4f62833222a85ad8c90054468dfa75013 |
|
03-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: make expiration error recognizable |
964ef14c2525f3a0311acb24c6814c5bfbe43cfc |
|
03-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: support the RSASHA1_NSEC3_SHA1 pseudo-algorithm
RSASHA1_NSEC3_SHA1 is an alias for RSASHA1, used to do NSEC3 feature
negotiation. While verifying RRsets there's no difference, hence support
it here. |
2a326321594f752b73a5aec0eb73e5bf59f76b3c |
|
03-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: don't accept expired RRSIGs |
2b442ac87838be7c326c984d8751c96dee7258ab |
|
02-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: add basic DNSSEC support
This adds most basic operation for doing DNSSEC validation on the
client side. However, it does not actually add the verification logic to
the resolver. Specifically, this patch only includes:
- Verifying DNSKEY RRs against a DS RRs
- Verifying RRSets against a combination of RRSIG and DNSKEY RRs
- Matching up RRSIG RRs and DNSKEY RRs
- Matching up RR keys and RRSIG RRs
- Calculating the DNSSEC key tag from a DNSKEY RR
All currently used DNSSEC combinations of SHA and RSA are implemented. Support
for MD5 hashing and DSA or EC cyphers are not. MD5 and DSA are probably
obsolete, and shouldn't be added. EC should probably be added
eventually, if it actually is deployed on the Internet. |