-
Notifications
You must be signed in to change notification settings - Fork 336
Fix various things around signatures and their use in rust #3527
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
Conversation
When the gvariant is G_VARIANT_TYPE_BYTESTRING we need to duplicate the data we get from g_variant_get_fixed_array(), otherwise we will double-free it when we later free sign->secret_key.
This adds api docs to ostree_blob_reader_read_blob() so that we can mark the return value as nullable. This is needed, because this function can return NULL without setting error, and this needs to be handled in bindings (such as the rust ones).
This adds GLib.VariantDict, which is needed for ostree_repo_commit_add_composefs_metadata(), and OSTree.BlobReader which are needed for ostree_sign_read_sk(). With these we can sign ostree commits with composefs digests in them.
This adds the new bindings for signing and composefs use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a memory safety fix for signature handling and updates the Rust bindings. The changes in ostree_sign_ed25519.c and ostree_sign-spki.c address a potential use-after-free vulnerability by copying secret key data. The Rust bindings are regenerated to expose Ostree.BlobReader and GLib.VariantDict, and to correctly handle the nullable return from ostree_blob_reader_read_blob. My review of the changes did not identify any issues.
47f36ff to
3d4a8a5
Compare
This adds a new --sign-commit CLI option to `rpm-ostree experimental compose build-chunked-oci` which signs the embedded ostree commit. With this, it is possible (with some care) to layer a signed bootc image that uses old-school signed ostree/composefs support. Note, this relies on the double free fix for ostree_sign_set_sk() in ostreedev/ostree#3527 to work.
This adds a new --sign-commit CLI option to `rpm-ostree experimental compose build-chunked-oci` which signs the embedded ostree commit. With this, it is possible (with some care) to layer a signed bootc image that uses old-school signed ostree/composefs support. Note, this relies on the double free fix for ostree_sign_set_sk() in ostreedev/ostree#3527 to work.
|
@cgwalters How do we get 0.20.5 rust bindings released? |
This adds a new --sign-commit CLI option to `rpm-ostree experimental compose build-chunked-oci` which signs the embedded ostree commit. With this, it is possible (with some care) to layer a signed bootc image that uses old-school signed ostree/composefs support. Note, this relies on the double free fix for ostree_sign_set_sk() in ostreedev/ostree#3527 to work.
This adds a new --sign-commit CLI option to `rpm-ostree experimental compose build-chunked-oci` which signs the embedded ostree commit. With this, it is possible (with some care) to layer a signed bootc image that uses old-school signed ostree/composefs support. Note, this relies on the double free fix for ostree_sign_set_sk() in ostreedev/ostree#3527 to work.
This adds a new --sign-commit CLI option to `rpm-ostree experimental compose build-chunked-oci` which signs the embedded ostree commit. With this, it is possible (with some care) to layer a signed bootc image that uses old-school signed ostree/composefs support. Note, this relies on the double free fix for ostree_sign_set_sk() in ostreedev/ostree#3527 to work.
This adds a new --sign-commit CLI option to `rpm-ostree experimental compose build-chunked-oci` which signs the embedded ostree commit. With this, it is possible (with some care) to layer a signed bootc image that uses old-school signed ostree/composefs support. Note, this relies on the double free fix for ostree_sign_set_sk() in ostreedev/ostree#3527 to work.
This adds a new --sign-commit CLI option to `rpm-ostree experimental compose build-chunked-oci` which signs the embedded ostree commit. With this, it is possible (with some care) to layer a signed bootc image that uses old-school signed ostree/composefs support. Note, this relies on the double free fix for ostree_sign_set_sk() in ostreedev/ostree#3527 to work.
I'm working on some changes in rpm-ostree (will link later) that uses the signature support and the composefs digest. This is a set of changes that: