Coder Social home page Coder Social logo

Comments (8)

lamby avatar lamby commented on June 23, 2024

My guess is either it has an outdated keyring

buildinfo.debian.net does not check keyrings at all.

… , or does not support ed25519 signatures

Interesting. New key? Do old gnupgs not support ed25519?

from buildinfo.debian.net.

vagrantc avatar vagrantc commented on June 23, 2024

|| My guess is either it has an outdated keyring
| buildinfo.debian.net does not check keyrings at all.

So how does it verify that the GPG uid exists, since that data is in the public key material? Does it call out to a keyserver every time?

|| … , or does not support ed25519 signatures
| Interesting. New key?

New signing subkey.

| Do old gnupgs not support ed25519?

Version 2.1.18 of gnupg in Debian stretch supports ed25519 (a.k.a. EDDSA). Is
buildinfo.debian.net running an older release, or using gnupg1 ?

live well,
vagrant

from buildinfo.debian.net.

lamby avatar lamby commented on June 23, 2024

So how does it verify that the GPG uid exists

I'm curious why you think it does (or needs to). It just checks there is a valid UID. There are indeed calls to a keyserver but that is solely to turn an ugly hex UID into a name of sorts and (in addition) this is done entirely outside of the .buildinfo validation in an asynchronous queue job no less.

from buildinfo.debian.net.

dkg avatar dkg commented on June 23, 2024

gnupg in debian stretch should be able to handle ed25519 verification without a problem.
however, if an openpgp certificate is malformed, the version of GnuPG in stretch currently rejects the whole cert, rather than salvaging the good bits (see https://bugs.debian.org/906545). Maybe that's the problem? I've proposed an update to GnuPG in stretch in https://bugs.debian.org/910398 that should resolve that issue, but the SRMs haven't decided about it yet.

from buildinfo.debian.net.

vagrantc avatar vagrantc commented on June 23, 2024

The GnuPG updates landed in debian stretch's latest point release; I recently tried re-submitting the u-boot .buildinfo file again and still have the same issue. Not sure if it still needs to be updated, or if the issue isn't actually fixed in the newer GnuPG.

from buildinfo.debian.net.

dkg avatar dkg commented on June 23, 2024

I used vagrant.key.gz (but gunzipped) locally on stretch, and tried it manually:

[GNUPG:] NEWSIG [email protected]
gpgv: Signature made Tue 11 Sep 2018 03:03:12 AM EDT
gpgv:                using EDDSA key 658073613BFCC5C7E2E45D45DC518FC87F9716AA
gpgv:                issuer "[email protected]"
[GNUPG:] KEY_CONSIDERED F0ADA5240891831165DF98EA7CFCD8CD257721E9 0
[GNUPG:] SIG_ID O4hLruA7fJQcw6prUf8BhwlDamA 2018-09-11 1536649392
[GNUPG:] KEY_CONSIDERED F0ADA5240891831165DF98EA7CFCD8CD257721E9 0
[GNUPG:] GOODSIG DC518FC87F9716AA Vagrant Cascadian <[email protected]>
gpgv: Good signature from "Vagrant Cascadian <[email protected]>"
gpgv:                 aka "Vagrant Cascadian <[email protected]>"
gpgv:                 aka "Vagrant Cascadian <[email protected]>"
gpgv:                 aka "Vagrant Cascadian <[email protected]>"
[GNUPG:] VALIDSIG 658073613BFCC5C7E2E45D45DC518FC87F9716AA 2018-09-11 1536649392 0 4 0 22 10 01 F0ADA5240891831165DF98EA7CFCD8CD257721E9
0 dkg@stretch:~$ 

and that all looks fine.

Then i tried manually looking at the file with a little python script test.py, inspired by bidb/api/utils.py:

#!/usr/bin/python
from debian import deb822
with open('u-boot_2018.09+dfsg-1_amd64.buildinfo.0') as f:
    a = f.read()
d = deb822.Deb822(a)
d.raw_text = a
g = d.get_gpg_info()
for x in ('VALIDSIG', 'NO_PUBKEY'):
   try:
     uid = g[x][0]
     break
   except (KeyError, IndexError):
     pass
print(uid)

and that prints a simple:

0 dkg@stretch:~$ python test.py
DC518FC87F9716AA
0 dkg@stretch:~$ 

(all on debian stretch, using python2)

so i'm perplexed as to what is going wrong on buildinfo.debian.net, and i can't replicate it.

from buildinfo.debian.net.

vagrantc avatar vagrantc commented on June 23, 2024

I'm wondering if in bidb/api/utils.py:

  • gpg_info = data.get_gpg_info()
  • gpg_info = data.get_gpg_info(keyrings='/dev/null')

While the default value for keyrings is None in get_gpg_info, there appears to be a default set in deb822.GpgInfo.from_sequence:
:param keyrings: list of keyrings to use (default:
['/usr/share/keyrings/debian-keyring.gpg'])
...
keyrings = keyrings or GPGV_DEFAULT_KEYRINGS

If that function is using the old keyring, and it's present, maybe the output is somehow unexpected?

Using dkg's example code (and tweaking to pass gpg_get_info(keyring=...), and just print), I also can't reproduce the issue, though, no matter what I feed it for the keyring.

Since december 1st, there have been at least 59 developer .buildinfo files impacted by this issue, which isn't a lot, compared to the thousands processed. A quick sampling of those suggests they are using non-rsa keys.

The contents of the .buildinfo file aren't the problem; I've re-signed several uploads with a gpg key using RSA and buildinfo.debian.net accepts them.

So I'm still as perplexed as ever...

from buildinfo.debian.net.

dkg avatar dkg commented on June 23, 2024

do we have a local reproducer, one that doesn't depend on PUTting data to the https://buildinfo.debian.net/api/submit REST endpoint?

from buildinfo.debian.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.