Gentoo Archives: gentoo-user

From: Stefano Crocco <posta@×××××××××××××.it>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: emerge --sync: problem refreshing keys
Date: Sun, 21 Jul 2019 11:23:15
Message-Id: 2632035.7mBu9DPMte@linux
In Reply to: Re: [gentoo-user] Re: emerge --sync: problem refreshing keys by Mick
1 On domenica 21 luglio 2019 12:44:14 CEST Mick wrote:
2 > On Sunday, 21 July 2019 11:17:30 BST Stefano Crocco wrote:
3 > > On venerdì 19 luglio 2019 21:02:40 CEST Stefano Crocco wrote:
4 > > > On venerdì 19 luglio 2019 18:21:46 CEST Ian Zimmerman wrote:
5 > > > > On 2019-07-18 19:42, Stefano Crocco wrote:
6 > > > > > Hello to everyone,
7 > > > > > since yesterday emerge --sync fails because it can't refresh keys.
8 > > > > > The
9 > > > > > messages I get are:
10 > > > > >
11 > > > > > Syncing repository 'gentoo' into '/usr/portage'...
12 > > > > >
13 > > > > > * Using keys from /usr/share/openpgp-keys/gentoo-release.asc
14 > > > > > * Refreshing keys via WKD ... [ !! ]
15 > > > > > * Refreshing keys from keyserver hkps://keys.gentoo.org ...OpenPGP
16 > > > > > keyring
17 > > > > >
18 > > > > > refresh failed:
19 > > > > > gpg: refreshing 4 keys from hkps://keys.gentoo.org
20 > > > > > gpg: keyserver refresh failed: No keyserver available
21 > > > > >
22 > > > > > OpenPGP keyring refresh failed:
23 > > > > > gpg: refreshing 4 keys from hkps://keys.gentoo.org
24 > > > > > gpg: keyserver refresh failed: No keyserver available
25 > > > >
26 > > > > Perhaps something to do with this?
27 > > > >
28 > > > > https://www.bleepingcomputer.com/news/security/public-certificate-pois
29 > > > > on
30 > > > > in
31 > > > > g->
32 > > >
33 > > > can-break-some-openpgp-implementations/
34 > > >
35 > > > > Aside:
36 > > > > I have already switched my personal gpg configuration to use the new
37 > > > > isolated keyserver.
38 > > >
39 > > > Thanks for the answer. I'd heard of this attack and read this [1]
40 > > > article
41 > > > on gentoo.org. From what I understand, it said that in theory there
42 > > > shouldn't be problems when syncing because "The gemato tool used to
43 > > > verify the Gentoo ebuild repository uses WKD by default. During normal
44 > > > operation it should not be affected by this vulnerability". Reading the
45 > > > article again, I now see it also says that "In the worst case; Gentoo
46 > > > repository syncs will be slow or hang" which, as you suggest, could very
47 > > > well be what's happened on my system. Unfortunately, the article doesn't
48 > > > say what to do if this happens.
49 > > >
50 > > > Tomorrow I'll try investigating more.
51 > > >
52 > > > Stefano
53 > > >
54 > > > [1] https://www.gentoo.org/news/2019/07/03/sks-key-poisoning.html
55 > >
56 > > It seems I found out how to fix the issue. I tried comparing my
57 > > /usr/share/portage/config/repos.conf with the one which comes with a
58 > > current stage3 and found out mine had the line
59 > >
60 > > sync-openpgp-keyserver = hkps://keys.gentoo.org
61 > >
62 > > which was missing in the file from stage3. Removing it (both here and in
63 > > /etc/portage/repos.conf/gentoo.conf) allowed me to sync correctly. I hope
64 > > this is the correct fix. I don't remember ever writing this line, so I
65 > > suppose it came with the original stage3 I built my system from or was
66 > > changed by another update (an update of what, however? According to
67 > > `equery
68 > > b`, this file doesn't belong to any package).
69 > >
70 > > I hope thing will keep working.
71 > >
72 > > Stefano
73 >
74 > I grepped two older installations I had immediate access to and there is no
75 > directive containing "openpgp" anywhere within /etc/portage/.
76 >
77 > In a new-ish installation there were a number of entries in /etc/portage/
78 > repos.conf/gentoo.conf, but no keyserver URI:
79 >
80 > $ grep openpgp -r /etc/portage/repos.conf/gentoo.conf
81 > sync-openpgp-key-path = /usr/share/openpgp-keys/gentoo-release.asc
82 > sync-openpgp-key-refresh-retry-count = 40
83 > sync-openpgp-key-refresh-retry-overall-timeout = 1200
84 > sync-openpgp-key-refresh-retry-delay-exp-base = 2
85 > sync-openpgp-key-refresh-retry-delay-max = 60
86 > sync-openpgp-key-refresh-retry-delay-mult = 4
87 >
88 > Perhaps you had added a keyserver as a fall back when you were configuring
89 > your system to use WKD? I haven't implemented WKD because there was no news
90 > item advising us to do so.
91
92 Maybe. I really know nothing about these issues, so I'm sure I wouldn't have
93 added that line by myself. Maybe I read about them somewhere and I forgot
94 about it.
95
96 Stefano

Replies

Subject Author
Re: [gentoo-user] Re: emerge --sync: problem refreshing keys Stefano Crocco <posta@×××××××××××××.it>