Commit graph

24092 commits

Author SHA1 Message Date
Lennart Poettering 8e54f5d90a 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.
2016-01-03 12:59:26 +01:00
Lennart Poettering e48b9a6490 resolved: fix serialization of the root domain 2016-01-02 22:16:16 +01:00
Lennart Poettering f2af5ea3cb resolved: only suffix RR key names with a dot if they don't have one yet 2016-01-02 22:16:16 +01:00
Lennart Poettering a8f158b929 resolved: don't accept NSEC3 iteration fields unbounded 2016-01-02 22:16:16 +01:00
Lennart Poettering 31d5192d0c basic: modernize conf-files.c a bit 2016-01-02 22:16:16 +01:00
Lennart Poettering 8ad182a124 resolved: explain why we don't check IP addresses/ports of incoming DNS UDP traffic 2016-01-02 22:16:16 +01:00
Lennart Poettering 7f10b629f8 resolved: extend RFCs list a bit 2016-01-02 22:16:16 +01:00
Tom Gundersen 5809f340fd Merge pull request #2241 from poettering/dnssec9
Ninth DNSSEC patch set
2016-01-01 11:19:19 +01:00
Martin Pitt b485d2003e Merge pull request #2229 from cjmayo/m500
hwdb: move Logitech M-U0007 [M500] to 1000dpi
2015-12-30 11:27:52 +01:00
Lennart Poettering e9bb4ec69d resolved: add a list of DNS-related RFCs and their implementation status in resolved 2015-12-29 21:42:10 +01:00
Lennart Poettering 665408ac05 resolved: append RFC6975 algorithm data to EDNS OPT RR 2015-12-29 21:42:10 +01:00
Lennart Poettering d15ad74251 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.
2015-12-29 21:42:10 +01:00
Lennart Poettering 0a9a2ac3d3 update DNSSEC TODO 2015-12-29 21:42:10 +01:00
Lennart Poettering 6af47493de resolved: add comments referencing various RFCs to various places 2015-12-29 21:42:10 +01:00
Lennart Poettering 6f717d0817 resolved: include GOST in list of DNSSEC algorithms
We don't implement it, and we have no intention to, but at least mention
that it exists.

(This also adds a couple of other algorithms to the algorithm string
list, where these strings were missing previously.)
2015-12-29 21:42:10 +01:00
Lennart Poettering efd46a696d resolved: use CLAMP() intsead of MIN(MAX()) 2015-12-29 21:42:10 +01:00
Lennart Poettering 7feea00bb0 resolved: don't allow RRs with TTL=0 and TTL!=0 in the same RRset 2015-12-29 21:42:09 +01:00
Lennart Poettering f3abbe2540 resolved: parse EDNS0 rcode extension bits 2015-12-29 21:42:09 +01:00
Lennart Poettering 0d0b52d79c resolved: reset RR TTL to 0, if MSB is set
RFC 2181, Section 8 suggests to treat an RR TTL with the MSB set as 0.
Implement this.
2015-12-29 21:42:09 +01:00
Lennart Poettering 9a1f0c283b resolved: properly handle SRV RRs with the DNS root as hostname 2015-12-29 21:42:09 +01:00
Lennart Poettering eebffed767 resolved: add errno mapping for BUS_ERROR_CONNECTION_FAILURE
This was missing when the error type was added in
ac720200b7.
2015-12-29 21:42:09 +01:00
Lennart Poettering fb85e6fd73 resolved: change mapping of BUS_ERROR_NO_NAME_SERVERS to ESRCH
EIO is really too generic, and indicates transmission problems.
2015-12-29 21:42:09 +01:00
Lennart Poettering 7f0c9af918 Merge pull request #2237 from evverx/fix-valgrind-tests
build-sys: fix valgrind-tests
2015-12-29 21:35:24 +01:00
Lennart Poettering d6c9d575e1 Merge pull request #2239 from evverx/fix-memory-leak-in-test-bus-marshal
tests: fix memory leak in test-bus-marshal
2015-12-29 21:31:29 +01:00
Evgeny Vereshchagin 49df985cef tests: fix memory leak in test-bus-marshal
Fixes:
```
$ ./configure ... --enable-dbus
$ make
$ make valgrind-tests TESTS=test-bus-marshal
...
==25301== 51 bytes in 1 blocks are definitely lost in loss record 7 of 18
==25301==    at 0x4C2DD9F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25301==    by 0x5496B8C: ??? (in /lib/x86_64-linux-gnu/libdbus-1.so.3.14.3)
==25301==    by 0x54973E3: _dbus_string_append_printf_valist (in /lib/x86_64-linux-gnu/libdbus-1.so.3.14.3)
==25301==    by 0x547E5C2: _dbus_set_error_valist (in /lib/x86_64-linux-gnu/libdbus-1.so.3.14.3)
==25301==    by 0x547E73E: dbus_set_error (in /lib/x86_64-linux-gnu/libdbus-1.so.3.14.3)
==25301==    by 0x548969A: dbus_message_demarshal (in /lib/x86_64-linux-gnu/libdbus-1.so.3.14.3)
==25301==    by 0x115C1A: main (test-bus-marshal.c:244)
==25301==
```
2015-12-29 12:56:59 +00:00
Lennart Poettering 8ebdb652af Merge pull request #2233 from kinvolk/alban/cgroup2-userns
nspawn: userns and unified cgroup: chown cgroup.events
2015-12-29 12:39:25 +01:00
Evgeny Vereshchagin 4854dc589f build-sys: fix valgrind-tests
Fixes:
```
$ make valgrind-tests TESTS=test-acl-util
  GEN      valgrind-tests
  Running test-acl-util
  /bin/bash: line 4: libtool: command not found
```
2015-12-29 07:44:56 +00:00
Tom Gundersen b038f6d1d8 Merge pull request #2231 from phomes/resolve-misc2
Resolve misc2
2015-12-28 17:27:42 +01:00
Zbigniew Jędrzejewski-Szmek 8e3efbaeaa Merge pull request #2226 from jwilk/spelling
man: fix typos
2015-12-28 11:07:54 -05:00
Tom Gundersen 7fdfc8634e Merge pull request #2232 from poettering/dnssec8
Eigth DNSSEC patch set
2015-12-28 15:05:50 +01:00
Lennart Poettering 160fbda907 resolved: update DNSSEC TODO 2015-12-28 14:46:39 +01:00
Lennart Poettering b211dc7e83 resolved: also use RRSIG expiry for negative caching
This makes sure that we also honour the RRSIG expiry for negative
caching.
2015-12-28 14:46:39 +01:00
Lennart Poettering ee3d6aff9b 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.
2015-12-28 14:46:39 +01:00
Lennart Poettering f535705a45 resolved: clean up dns_transaction_stop()
This renames dns_transaction_stop() to dns_transaction_stop_timeout()
and makes it only about stopping the transaction timeout. This is safe,
as in most occasions we call dns_transaction_stop() at the same time as
dns_transaction_close_connection() anyway, which does the rest of what
dns_transaction_stop() used to do. And in the one where we don't call
it, it's implicitly called by the UDP emission or TCP connection code.

This also closes the connections as we enter the validation phase of a
transaction, so that no further messages may be received then.
2015-12-28 14:46:39 +01:00
Lennart Poettering ca994e853c 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.
2015-12-28 14:46:39 +01:00
Lennart Poettering 502a798599 resolve-host: log RR parsing errors 2015-12-28 14:46:39 +01:00
Lennart Poettering e0240c64b7 resolved: add ECDSA signature support 2015-12-28 14:46:39 +01:00
Lennart Poettering c7feab7647 shared: relax restrictions on valid domain name characters a bit
Previously, we'd not allow control characters to be embedded in domain
names, even when escaped. Since cloudflare uses \000 however to
implement its synthethic minimally covering NSEC RRs, we should allow
them, as long as they are properly escaped.
2015-12-28 14:46:39 +01:00
Alban Crequy aa3be0dd36 nspawn: userns and unified cgroup: chown cgroup.events
When starting a container in a new user namespace, systemd-nspawn chowns
the cgroup knob files so they are usable by the container. But the
cgroup knob file "cgroup.events" was missing. This file exists when the
unified hierarchy is used.
2015-12-28 14:30:56 +01:00
Lennart Poettering ea3a892fe3 resolved: split out RSA-specific code from dnssec_verify_rrset()
In preparation for ECDSA support.
2015-12-28 01:18:55 +01:00
Lennart Poettering fbf1a66d78 resolved: simplify MD algorithm initialization a bit 2015-12-28 01:18:55 +01:00
Lennart Poettering af22c65b27 resolved: add SHA384 digest support 2015-12-28 01:18:55 +01:00
Thomas Hindoe Paaboel Andersen f770083430 resolve-host: add error checking 2015-12-28 00:05:17 +01:00
Thomas Hindoe Paaboel Andersen c03cba007a resolve: remove unused variables 2015-12-28 00:05:17 +01:00
Marcel Holtmann ad798a641a hwdb: Update database of Bluetooth company identifiers 2015-12-27 23:07:05 +01:00
Tom Gundersen f791b677a8 Merge pull request #2225 from poettering/dnssec7
Seventh DNSSEC patchset
2015-12-27 21:19:28 +01:00
Chris Mayo 62f6eed416 hwdb: move Logitech M-U0007 [M500] to 1000dpi
http://www.logitech.com/en-gb/product/corded-mouse-m500
2015-12-27 11:48:53 +00:00
Lennart Poettering f4461e5641 resolved: rename "features" variables to "feature_level"
The name "features" suggests an orthogonal bitmap or suchlike, but the
variables really encode only a linear set of feature levels. The type
used is already called DnsServerFeatureLevel, hence fix up the variables
accordingly, too.
2015-12-27 01:41:40 +01:00
Lennart Poettering 519ef04651 resolved: rework OPT RR generation logic
This moves management of the OPT RR out of the scope management and into
the server and packet management. There are now explicit calls for
appending and truncating the OPT RR from a packet
(dns_packet_append_opt() and dns_packet_truncate_opt()) as well as a
call to do the right thing depending on a DnsServer's feature level
(dns_server_adjust_opt()).

This also unifies the code to pick a server between the TCP and UDP code
paths, and makes sure the feature level used for the transaction is
selected at the time the server is picked, and not changed until the
next time we pick a server. The server selction code is now unified in
dns_transaction_pick_server().

This all fixes problems when changing between UDP and TCP communication
for the same server, and makes sure the UDP and TCP codepaths are more
alike. It also makes sure we never keep the UDP port open when switchung
to TCP, so that we don't have to handle incoming datagrams on the latter
we don't expect.

As the new code picks the DNS server at the time we make a connection,
we don't need to invalidate the DNS server anymore when changing to the
next one, thus dns_transaction_next_dns_server() has been removed.
2015-12-27 01:41:40 +01:00
Lennart Poettering 97cc656cf4 resolved: reuse dns_transaction_stop() when destructing transaction objects 2015-12-27 01:41:40 +01:00