Repository navigation
Description
systemd version the issue has been seen with
systemd 251 (251.2-5)
+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY -P11KIT -QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified
Used distribution
Debian Testing (12)
Linux kernel version used (uname -srvmo)
Linux 5.17.0-1-amd64 #1 SMP PREEMPT Debian 5.17.3-1 (2022-04-18) x86_64 GNU/Linux
CPU architecture issue was seen on
x86_64
Expected behaviour you didn't see
gpg --send-keysshould be able to send keys when using systemd-resolved and/etc/resolv.confpoints to the resolved stub
Unexpected behaviour you saw
$ ls -lh /etc/resolv.conf lrwxrwxrwx 1 root root 37 14 giu 11.54 /etc/resolv.conf -> /run/systemd/resolve/stub-resolv.conf $ gpg --keyserver pgp.surf.nl --send-key 66DEF15282990C2199EFA801A8A128A8AB1CEE49 gpg: sending key A8A128A8AB1CEE49 to hkp://pgp.surf.nl gpg: keyserver send failed: Server indicated a failure gpg: keyserver send failed: Server indicated a failure $ ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf $ gpg --verbose --verbose --keyserver pgp.surf.nl --send-key 66DEF15282990C2199EFA801A8A128A8AB1CEE49 gpg: sending key A8A128A8AB1CEE49 to hkp://pgp.surf.nl $ echo $? 0
Steps to reproduce the problem
- Fully enable systemd-resolved, also with
/etc/resolv.confpointing to/run/systemd/resolve/stub-resolv.conf- Run
gpg --keyserver "$keyserver" --send-key "$my_key"
Additional program output to the terminal or log subsystem illustrating the issue
$ resolvectl status
Global
Protocols: +LLMNR +mDNS +DNSOverTLS DNSSEC=yes/supported
resolv.conf mode: stub
Current DNS Server: 9.9.9.9#dns.quad9.net
DNS Servers: 9.9.9.9#dns.quad9.net
Link 2 (enp7s0)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6 mDNS/IPv4 mDNS/IPv6
Protocols: +DefaultRoute +LLMNR +mDNS +DNSOverTLS DNSSEC=yes/supported
Current DNS Server: 192.168.178.1
DNS Servers: 192.168.178.1
$ journalctl --no-hostname --boot --follow
giu 14 11:32:51 dirmngr[3727]: command 'KS_PUT' failed: Server indicated a failure <Unspecified source>
Details
$ gpg --verbose --verbose --debug-all --keyserver pgp.surf.nl --send-key 66DEF15282990C2199EFA801A8A128A8AB1CEE49
gpg: reading options from '/home/tachi/.gnupg/gpg.conf'
gpg: reading options from '[cmdline]'
gpg: enabled debug flags: packet mpi crypto filter iobuf memory cache memstat trust hashing ipc clock lookup extprog
gpg: DBG: [not enabled in the source] start
gpg: DBG: chan_3 <- # Home: /home/tachi/.gnupg
gpg: DBG: chan_3 <- # Config: /home/tachi/.gnupg/dirmngr.conf
gpg: DBG: chan_3 <- OK Dirmngr 2.2.35 at your service
gpg: DBG: connection to the dirmngr established
gpg: DBG: chan_3 -> GETINFO version
gpg: DBG: chan_3 <- D 2.2.35
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> KEYSERVER --clear hkp://pgp.surf.nl
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> KEYSERVER
gpg: DBG: chan_3 <- S KEYSERVER hkp://pgp.surf.nl
gpg: DBG: chan_3 <- OK
gpg: DBG: [not enabled in the source] keydb_new
gpg: DBG: [not enabled in the source] keydb_search enter
gpg: DBG: keydb_search: 1 search descriptions:
gpg: DBG: keydb_search 0: FPR20: '66DE F152 8299 0C21 99EF A801 A8A1 28A8 AB1C EE49'
gpg: DBG: keydb_search: searching keybox (resource 0 of 1)
gpg: DBG: keydb_search: searched keybox (resource 0 of 1) => Success
gpg: DBG: [not enabled in the source] keydb_search leave (found)
gpg: DBG: [not enabled in the source] keydb_get_keybock enter
gpg: DBG: parse_packet(iob=2): type=6 length=51 (parse.../../g10/keydb.c.1257)
gpg: DBG: parse_packet(iob=2): type=12 length=12 (parse.../../g10/keydb.c.1257)
gpg: DBG: parse_packet(iob=2): type=13 length=57 (parse.../../g10/keydb.c.1257)
gpg: DBG: parse_packet(iob=2): type=12 length=12 (parse.../../g10/keydb.c.1257)
gpg: DBG: parse_packet(iob=2): type=2 length=144 (parse.../../g10/keydb.c.1257)
gpg: DBG: parse_packet(iob=2): type=12 length=6 (parse.../../g10/keydb.c.1257)
gpg: DBG: parse_packet(iob=2): type=2 length=563 (parse.../../g10/keydb.c.1257)
gpg: DBG: parse_packet(iob=2): type=12 length=6 (parse.../../g10/keydb.c.1257)
gpg: DBG: parse_packet(iob=2): type=14 length=56 (parse.../../g10/keydb.c.1257)
gpg: DBG: parse_packet(iob=2): type=2 length=120 (parse.../../g10/keydb.c.1257)
gpg: DBG: parse_packet(iob=2): type=12 length=6 (parse.../../g10/keydb.c.1257)
gpg: DBG: iobuf-2.0: underflow: buffer size: 1056; still buffered: 0 => space for 1056 bytes
gpg: DBG: iobuf-2.0: close '?'
gpg: DBG: [not enabled in the source] keydb_get_keyblock leave
gpg: DBG: build_packet() type=6
gpg: DBG: iobuf-3.0: close '?'
gpg: DBG: build_packet() type=13
gpg: DBG: build_packet() type=2
gpg: DBG: iobuf-4.0: close '?'
gpg: DBG: build_packet() type=2
gpg: DBG: iobuf-5.0: close '?'
gpg: DBG: build_packet() type=14
gpg: DBG: iobuf-6.0: close '?'
gpg: DBG: build_packet() type=2
gpg: DBG: iobuf-7.0: close '?'
gpg: DBG: iobuf-1.0: close '?'
gpg: sending key A8A128A8AB1CEE49 to hkp://pgp.surf.nl
gpg: DBG: chan_3 -> KS_PUT
gpg: DBG: chan_3 <- INQUIRE KEYBLOCK
gpg: DBG: chan_3 -> [ 44 20 98 33 04 5f ef 42 de 16 09 2b 06 01 04 01 ...(982 byte(s) skipped) ]
gpg: DBG: chan_3 -> [ 44 20 c8 0f 7a e9 7c ac 90 88 cc f5 6a 30 75 5d ...(16 byte(s) skipped) ]
gpg: DBG: chan_3 -> END
gpg: DBG: chan_3 <- INQUIRE KEYBLOCK_INFO
gpg: DBG: chan_3 -> D pub::255:22:A8A128A8AB1CEE49:1609515742::::::::::::::%0Afpr:::::::::66DEF15282990C2199EFA801A8A128A8AB1CEE49:<snip>
gpg: DBG: chan_3 -> END
gpg: DBG: chan_3 <- ERR 219 Server indicated a failure <Unspecified source>
gpg: DBG: free_packet() type=6
gpg: DBG: free_packet() type=13
gpg: DBG: free_packet() type=2
gpg: DBG: free_packet() type=2
gpg: DBG: free_packet() type=14
gpg: DBG: free_packet() type=2
gpg: keyserver send failed: Server indicated a failure
gpg: keyserver send failed: Server indicated a failure
gpg: DBG: chan_3 -> BYE
gpg: DBG: [not enabled in the source] stop
gpg: keydb: handles=1 locks=0 parse=1 get=1
gpg: build=0 update=0 insert=0 delete=0
gpg: reset=0 found=1 not=0 cache=0 not=0
gpg: kid_not_found_cache: count=0 peak=0 flushes=0
gpg: sig_cache: total=2 cached=2 good=2 bad=0
gpg: random usage: poolsize=600 mixed=0 polls=0/0 added=0/0
outmix=0 getlvl1=0/0 getlvl2=0/0
gpg: rndjent stat: collector=0x0000000000000000 calls=0 bytes=0
gpg: secmem usage: 0/65536 bytes in 0 blocks
Activity
yuwata commentedon Jun 27, 2022
resolvectl queryordigworks for the host?? Could you show the output of these commands?Tachi107 commentedon Jun 27, 2022
Yes, they work.
delvdoesn't, but that's probably related to #23289 (comment)yuwata commentedon Jul 3, 2022
Do you have any trust anchors file in {/etc,/usr/lib,/run}/dnssec-trust-anchors.d ??
I cannot reproduce the issue...
Tachi107 commentedon Jul 4, 2022
Yes, I don't have those dirs at all.
I've been also able to reproduce this on systemd 247.3 (Debian stable).
Edit: how did you try to reproduce this? Note that I have both DoT and DNSSEC enabled. I did not try changing DNS server though (only used quad9)
mrc0mmand commentedon Jul 4, 2022
I just tried it with the latest main and can't reproduce it either:
yuwata commentedon Jul 4, 2022
@Tachi107 I tried with 9.9.9.9 and both DNSOverTLS and DNSSEC are enabled.
Also, I cannot reproduce the issue reported at #23289 (comment).
Tachi107 commentedon Jul 4, 2022
Uhm, strange... I'll try to reproduce it on non-Debian systems.
Tachi107 commentedon Jul 13, 2022
I've been able to reproduce this on Fedora 36 Live (bare metal, not VM). I've encountered all the issues I described above. The commands were run on a clean Live image, and the only things I changed from the default system config were some resolved settings to enable DNSSEC and DoT.
4 remaining items
pemensik commentedon Nov 4, 2022
Better demonstrated with drill from ldns-utils package.
LLMNR=noLLMNR=resolveNama commentedon Jan 7, 2024
I encountered the same issue just now, but with importing keys.
I have DoT configured in systemd-resolved and
/etc/resolv.confis a link and not empty.Installing
unboundand replacing the link with a nameserver entry works.resolved: enable DNS proxy mode if client wants DNSSEC
resolved: enable DNS proxy mode if client wants DNSSEC