-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crouton's debootstrap call does not verify the packages it installs #2362
Comments
Thanks for the tips. I'll merge #2103 into here. |
I thought I would work around this by specifying an https mirror with -m, e.g. mirrors.kernel.org/debian. However, that doesn't have any effect on where the debootstrap is downloaded from. |
does debootstrap support installing from an HTTPS mirror?
Its not really very hard to do the proper GPG verification. The hardest
part is really building gpgv. I've asked the GnuPG maintainers to
provide a static build of gpgv, so that chroot managers like crouton
could just download that one and use it.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=806940
Some more traffic on that bug report would help give it visibility.
|
gpgv-static is now built as part of Debian: https://packages.debian.org/gpgv-static making this quite easy to achieve now:
|
Thanks for the walkthrough, and for doing the evangelizing on the Debian side of things. |
Please, correct me if I'm wrong, but shouldn't this be marked as kind of a priority? |
Looks like debootstrap now automatically falls back on HTTPS |
Since no keyring is provided and no
gpgv
binary present, crouton's invokation ofdebootstrap
does not verify any of the packages that it downloads via plain text HTTP. That means that anyone with access to the network traffic can easily root the new crouton install. For example, if an attacker exploits a home router, which is easy to do these days, then that attacker can feed any file they want to when crouton'sdebootstrap
's HTTP requests, anddebootstrap
will just install it. Additionally,debootstrap
runs as root, so that attacker can also gain root by feeding bad packages to that HTTP connection.Luckily, the fix is well documented and not too hard: download a
gpgv
binary and keyring from Debian over HTTPS, and pointdebootstrap
to them. But as I said before #2067, I'm not going to sign this CLA, so I'm making a HOWTO for someone else to write the code, instead of a pull request.get the keyring
debootstrap
is fetched, i.e.: https://anonscm.debian.org/cgit/keyring/keyring.git/plain/debian-role-keys-gpg/0x2702CAEB90F8EEC5building gpgv options
Then
gpgv
needs to be in the path, anddebootstrap
can be run like this, similar to how I did it in Lil' Debi:The text was updated successfully, but these errors were encountered: