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

Ignition decompresses remote resource before verifying its hash #961

Open
bgilbert opened this issue Apr 9, 2020 · 0 comments
Open

Ignition decompresses remote resource before verifying its hash #961

bgilbert opened this issue Apr 9, 2020 · 0 comments
Labels

Comments

@bgilbert
Copy link
Contributor

bgilbert commented Apr 9, 2020

When retrieving a compressed resource, we first decompress the contents and then verify the hash of the decompressed data. This is consistent with a careful reading of the spec:

compression (string): the type of compression used on the contents (null or gzip). Compression cannot be used with S3.
verification (object): options related to the verification of the file contents.

This behavior is convenient in some ways, because it allows the server to vary the compression without affecting Ignition. But it also causes Ignition to decompress untrusted data, which is not great security practice. It might be okay for gzip, which is a heavily-deployed decompressor, but could be dangerous if we added support for less widely-used algorithms.

@bgilbert bgilbert added area/security kind/friction spec change Requires changes to the spec labels Apr 9, 2020
@bgilbert bgilbert changed the title Ignition decompresses remote resource before verifiying its hash Ignition decompresses remote resource before verifying its hash Apr 9, 2020
bgilbert added a commit to jlebon/ignition that referenced this issue Apr 9, 2020
Also verify hashes, to ensure that Ignition's decompress-before-verify
semantics are maintained (coreos#961).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant