Page MenuHome GnuPG

gpgv: Read-only trustedkeys.kbx should not be compressed
Closed, ResolvedPublic

Description

Someone blogged that the following happens with gpg version 2.2.27-3ubuntu2.1:

$ gpgv </dev/null
gpgv: can't allocate lock for '/home/XXX/.gnupg/trustedkeys.gpg'
gpgv: verify signatures failed: Unknown system error

For details see https://www.osso.nl/blog/2023/gpgv-can-t-allocate-lock-for/
I haven't cited more text from the blog because it's copyrighted and not licensed under a permissive license.

Event Timeline

werner added a subscriber: werner.

That version of gpg is too old that I will look at it.

The same happens with a very recent 2.4:

$ gpgv --version
gpgv (GnuPG) 2.4.4-beta56
libgcrypt 1.11.0
Copyright (C) 2023 g10 Code GmbH
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

$ cp /home/XXX/.gnupg/pubring.kbx /home/XXX/.gnupg/trustedkeys.kbx

$ gpgv </dev/null
gpgv: can't allocate lock for '/home/XXX/.gnupg/trustedkeys.kbx'
gpgv: verify signatures failed: Unknown system error
werner triaged this task as Normal priority.Nov 13 2023, 8:43 AM
werner edited projects, added Bug Report, gnupg24, gpgv; removed Support.

Problem seems to be that there is no ~/trustedkeys.gpg file and that the fallback to the kbx file does not anymore work. I can replicate that with 2.40 and 2.4.4-beta.

werner renamed this task from gpgv prints out a warning that it cannot allocate a lock to gpgv does not correctly fallback to trustedkeys.kbx.Nov 13 2023, 8:43 AM

I found that the warning is emitted when it tries to call keybox_compress.
It should not be called when it's READONLY (which gpgv specifies).

gniibe renamed this task from gpgv does not correctly fallback to trustedkeys.kbx to gpgv: Read-only trustedkeys.kbx should not be compressed.Dec 29 2023, 3:04 AM
gniibe added a project: backport.

Bug is in 2.2, too.

This comment was removed by gniibe.
gniibe moved this task from Backlog to WiP on the gnupg22 board.
werner edited projects, added gnupg24 (gnupg-2.4.5); removed gnupg24.
werner removed a project: gnupg22.

We won't fix that for 2.2.