Skip to content
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

Log hash of each package going to be installed during template build #2524

Closed
marmarek opened this issue Dec 17, 2016 · 6 comments
Closed

Log hash of each package going to be installed during template build #2524

marmarek opened this issue Dec 17, 2016 · 6 comments
Labels
C: builder Qubes Builder P: major Priority: major. Between "default" and "critical" in severity.
Milestone

Comments

@marmarek
Copy link
Member

Currently template build process rely on digital signature verification of all downloaded components. This is expected to be done by appropriate package manager. But attacker who control distribution signing key, or found a bug in signature verification code (like CVE-2016-1252) may try to perform targeted attack against specifically template build process. Currently we mitigate this kind of targeted attacks by downloading all the components through tor. This force the attacker to expose infected packages to wider community to have successful attack, but also increase the risk of being caught.
We'd like to extend this process by logging hash of each downloaded package, before it has a chance to compromise logging component itself (so, before being extracted, before executing any script from inside of it). Thanks to #2023 we may have reasonably protected append-only build log of templates.
The missing part is actual logging the hashes. This should be implemented by each builder plugin separately, as it is specific to package manager running there.

@marmarek marmarek added C: builder Qubes Builder enhancement P: major Priority: major. Between "default" and "critical" in severity. labels Dec 17, 2016
@marmarek marmarek added this to the Release 4.0 milestone Dec 17, 2016
@marmarek
Copy link
Member Author

@andrewdavidwong
Copy link
Member

andrewdavidwong commented Dec 18, 2016

This is an excellent idea.

  • Could it be extended to apply to packages that users install in templates?

  • Could it be paired with a system that uploads the hashes somewhere (if the user opts in), so that everyone's hashes can be compared automatically?

@tasket
Copy link

tasket commented Jan 6, 2017

I realize its not the only reason to have a logging function while building templates, but isn't CVE-2016-1252 about a bug in NTP? The fact that OpenSSL was involved seems tangential. It does not refer to verification code contained within a crypto tool and has nothing to do with GPG.

I mention this because Andrew referred to this issue in qubes-devel as inspiration for a hash-based scheme for dom0 updates about which I have reservations.

@marmarek
Copy link
Member Author

marmarek commented Jan 7, 2017

but isn't CVE-2016-1252 about a bug in NTP?

No, it's apt bug: https://security-tracker.debian.org/tracker/CVE-2016-1252

@andrewdavidwong
Copy link
Member

andrewdavidwong commented Jan 7, 2017

I realize its not the only reason to have a logging function while building templates, but isn't CVE-2016-1252 about a bug in NTP? The fact that OpenSSL was involved seems tangential. It does not refer to verification code contained within a crypto tool and has nothing to do with GPG.

As Marek said, it's the recent APT bug for which we published QSB 28.

@marmarek
Copy link
Member Author

Done for Fedora too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: builder Qubes Builder P: major Priority: major. Between "default" and "critical" in severity.
Projects
None yet
Development

No branches or pull requests

3 participants