-
Notifications
You must be signed in to change notification settings - Fork 130
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
shim 15.7 (NX Patched) for SUSE Euler Linux 2.1 #322
Comments
@frozencemetery : Any feedback would be appreciated. Chenxi |
While I'm not an official reviewer, I can see a few curiosities: The shim does not seem to reproduce with the specified commands. This is the listing I made from the inside of running containers:
I can't see any entries like these that are mentioned in the README:
Despite the fact the
Please, tell us more on how does your environment implement the following Microsoft signing requirements:
There seems to be a stylistic error as there are dashes rather than asterisks in the first line. Also, according to yout
grub2.spec:
grub2.changes:
Which patch inside your GRUB2 sources archive forces the final binary to have the |
@aronowski : Reproducibility [Chenxi]: According to docker rebuild, the pesign hash data are the same.
NX compatible: [Chenxi]: Please try below command: Apply below patch to shim source code to build post-process-pe
Then verify the NX flag via below command:
So we can make sure NX patched successfully on shim. GRUB2 patch for NX compatible: [Chenxi]: Currently, Grub2 doesn't support NX feature, we will try to implement this feature in the future. |
When it comes to the reproducibility, I always treated the reviews as them having the shim binary with the certificate embedded in it the one and only desired outcome. In other words: I should be able to run the podman command you provided and it should output the I don't understand, why strip the public CA certificate if it's public after all. Also, when it comes to NX support in your shims, it's still not present. The patch you mentioned toggles the NX compatility flag from disabled to enabled once the
So to qualify for signing, the shim binaries you provide need to already have the flag set to enabled. You can apply the patch you mentioned yourself, rebuild the binaries and update them in your review. For implementing NX support in GRUB2 binary, maybe you can use this Fedora/RHEL patch for inspiration. I can see there has been an update regarding GRUB2 modules but it still doesn't seem right. The change claims the following entries have been removed:
but except the
Why? Is there a patch somewhere that removes them despite them being listed or there's some other unknown action taking place during the building process? There has been no update regarding the keys management and protection which Microsoft requires. |
@aronowski : As I mentioned previously, to test NX flag, you need to apply one more patch based on 15.7 source code. Grub2: Shim-binary: Chenxi |
Alright, so as far as I understand, I should be able to attach your public certificate (called Signature in this comment) after the shim binaries have been built via podman. Is that right? If so, what's the Standard Opearting Procedure for that? Then, why can't the reproducible building procedure apply this one automatically? OK, waiting for the GRUB2 update. Also, it would be the best if you could implement NX support for the GRUB2 binary as well for this update.
Sorry, this is not true. Let me explain. The rhboot's shim 15.7 release does not have the NX flag enabled by default. The support has been introduced in this pull request. This implementation's core functionality is the line that changes the During the build process, the
Somehow your build runs the program with the I got confused in my earlier comment - the patch you mention only attempts to perform some checks for Microsoft requirements rather than toggle the flag (mistaken it for PR #530). The invocation you mentioned here is still going to manually toggle the flag if you have the one from PR #530 applied since it's supposed to do so by default (and it does) rather than disabling the flag as your build logs say. Since now we're talking about invoking a program that does modify the shim binary, I'd recommend different tools for static analysis. You can use, for instance, NTCore's CFF Explorer or zed-0xff's pedump to see for yourself that the shim binary you attached has the NX compatibility flag set to disabled. There are lots of other tools for analyzing PE binaries so the final decision on the tool to use is up to you. There has been no update regarding the keys management and protection which Microsoft requires. |
Sorry, that's not acceptable. The source code you're publishing needs |
@steve-mcintyre : Chenxi |
@aronowski: |
In this context I'm talking only about the shim binaries, not GRUB2. I already showed the listing of the build logs you attached, which prove that your shim is being built with NX compatibility being set to disabled. Verifying the shim binary also means inspecting the artifact you attached in your review. As I mentioned earlier, there are tools that prove it does not have NX support currently. When it comes to GRUB2:
The required support has been described in issue #307 |
@parheliamm can you either update this submission to 15.8 or create a new submission for that? |
Confirm the following are included in your repo, checking each box:
What is the link to your tag in a repo cloned from rhboot/shim-review?
https://github.com/parheliamm/shim-review/tree/sel-2.1-shim-20230330
What is the SHA256 hash of your final SHIM binary?
aarch64:
pesign --hash --padding --in ./shim-sel_aarch64.efi
hash: 7f7409b5892ef2cceaf6b3c49841b9868409ae800396d434cfcb4c6911fda78c
sha256sum ./shim-sel_aarch64.efi
29a4ab0db9bbb2428ce166772fcb7567ebc0fde6ec7926e9af59ee28a5e64df3 ./shim-sel_aarch64.efi
x86_64:
pesign --hash --padding --in=./shim-sel_x86_64.efi
hash: a5f7876e09efe0ede04de0ccfb43b2492c98112e4e99d4545afbdcb183e43b6e
sha256sum ./shim-sel_x86_64.efi
8f9bbbd6470c57de1a5ead3b88d7b3aa5b979106937e631968fa8ebc0a403d96 ./shim-sel_x86_64.efi
What is the link to your previous shim review request (if any, otherwise N/A)?
#260
The text was updated successfully, but these errors were encountered: