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

shim-15.7 (NX Patched) for ZeronsoftN #343

Closed
8 tasks done
joseph-zeronsoftn opened this issue Sep 15, 2023 · 8 comments
Closed
8 tasks done

shim-15.7 (NX Patched) for ZeronsoftN #343

joseph-zeronsoftn opened this issue Sep 15, 2023 · 8 comments
Assignees
Labels
custom second-stage Second-stage image is not GRUB extra review wanted Initial review(s) look good, another review desired question Reviewer(s) waiting on response

Comments

@joseph-zeronsoftn
Copy link

joseph-zeronsoftn commented Sep 15, 2023

Confirm the following are included in your repo, checking each box:

  • completed README.md file with the necessary information
  • shim.efi to be signed
  • public portion of your certificate(s) embedded in shim (the file passed to VENDOR_CERT_FILE)
  • binaries, for which hashes are added to vendor_db ( if you use vendor_db and have hashes allow-listed )
  • any extra patches to shim via your own git tree or as files
  • any extra patches to grub via your own git tree or as files
  • build logs
  • a Dockerfile to reproduce the build of the provided shim EFI binaries

What is the link to your tag in a repo cloned from rhboot/shim-review?


https://github.com/zeronsoftn/shim-review/tree/zeronsoftn-shim-x86_64_ia32_aarch64-20230915
https://github.com/zeronsoftn/shim-review/tree/zeronsoftn-shim-x86_64_ia32_aarch64-20231017


What is the SHA256 hash of your final SHIM binary?


4f7684174ad593b76284ddde3f947064a3ef602dd6b5f47047ff10a51774fbec  shimaa64.efi
7797d060d0869d5976eb91a21ab3341bd7a30e1f2c945f5be74a2720470bcc0e  shimia32.efi
bd455c5c85a0b6063cbd84015f097f63a8a0c8d199e5b9166406b622947be420  shimx64.efi

What is the link to your previous shim review request (if any, otherwise N/A)?


#147 (accepted)

Help to review

jc-lab/shim-review-bot#3 (comment)
jc-lab/shim-review-bot#3 (comment)

@THS-on
Copy link
Collaborator

THS-on commented Oct 16, 2023

Review zeronsoftn-shim-x86_64_ia32_aarch64-20230915

  • ZeronsoftN Inc has an accepted 15.4 shim Shim 15.4 for ZeronsoftN #147

  • Shim is required due to using Alpine (which currently has not its own shim), custom GRUB2 builds and using systemd-boot images

  • Security have not changed since last review

  • Shim is reproducible using Dockerfile

Hashes

#18 0.622 8b1acf748a7390afcc8084fb5c6b2561eae8074cc4885db0c3c7f9666c5962a2  /work/output/aarch64/boot/efi/EFI/ZeronsoftN/shimaa64.efi
#18 0.639 a340c4acba8e5b0b0a6502790ade67289624dca8dd6b165401e08b3da8c47137  /work/output/ia32/boot/efi/EFI/ZeronsoftN/shimia32.efi
#18 0.656 c8300ef317ff4bdfe2ca223690062a43ccd350cad4ee65abb3d71349a5d32f63  /work/output/x86_64/boot/efi/EFI/ZeronsoftN/shimx64.ef

SBAT

sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
shim,3,UEFI shim,shim,1,https://github.com/rhboot/shim
shim.zeronsoftn,2,ZeronsoftN,shim,15.7-0zeron2,https://github.com/zeronsoftn/shim-release
  • Why is shim.zeronsoftn set to 2?

  • Shim is upstream 15.7 with NX enabled

  • Certificate matches the organization (has changed since last submission)

    • Serial: 7230298064905535070
    • Subject: CN = ZeronsoftN Secure Boot Signing (2022), OU = Secure Boot, O = ZeronsoftN, C = KR
    • Valid till: Jun 25 04:35:17 2029 GMT (7 years, ok)
    • Certificate is not an CA certificate
      • Code Signing and Digital Signature are set
      • Certificate is issued by their CA
  • Keys are stored in an HSM

  • GRUB

    • GRUB is based on Debian's implementation
    • GRUB SBAT is set to 3
    • List of modules are ahci reboot halt minicmd help diskfilter acpi ata blocklist boot cat cmp configfile cpuid crypto cryptodisk datetime elf echo exfat ext2 fat gptsync halt hashsum iso9660 ldm linux loadenv ls lspci mdraid1x memdisk msdospart normal ntfs ntfscomp ohci part_gpt part_msdos raid5rec random scsi search search_fs_file search_fs_uuid search_label sleep squash4 tar test time true usb usb_keyboard xfs usbms file pgp verifiers gcry_rsa gcry_dsa gcry_sha256 gcry_sha512 regexp
    • The module list includes ntfs. Please update to version 2.06-13+deb12u1 to include the fixes for the CVEs in the ntfs implementation
  • Kernel

Notes and questions

  • Why is shim.zeronsoftn set to 2 in the shim?
  • How do you prevent modules from a kernel build to be loaded by another kernel?
  • Please update GRUB2 to version 2.06-13+deb12u1 to include the fixes for the CVEs in the ntfs implementation
  • Thank you for using the bot and linking the patches! This made the review simpler

@THS-on THS-on added question Reviewer(s) waiting on response custom second-stage Second-stage image is not GRUB labels Oct 16, 2023
@joseph-zeronsoftn
Copy link
Author

joseph-zeronsoftn commented Oct 17, 2023

@THS-on Thank you! :)

https://github.com/zeronsoftn/shim-review/tree/zeronsoftn-shim-x86_64_ia32_aarch64-20231017
jc-lab/shim-review-bot#3 (comment) (Ignore linux-6.1.43.patch. This is the original linux-6.1.43.xz file, not the shim patch.)

  • Modified the version of shim.zeronsoftn to 1. (It was a wrong setting)
  • kernel is signed with a ephemeral key.
  • Updated grub and applied additional patches to the kernel. Please check the revised README.

@THS-on
Copy link
Collaborator

THS-on commented Oct 17, 2023

I see that you pulled the Debian patches for enabling lockdown. To actually enable them you'll also need to set CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT=y otherwise this feature is not used.

@joseph-zeronsoftn
Copy link
Author

@THS-on Thank you! I missed it.. This is the commit applied: zeronsoftn/alpine-pkg-kernel@3df6633

@THS-on
Copy link
Collaborator

THS-on commented Oct 24, 2023

The shim for zeronsoftn-shim-x86_64_ia32_aarch64-20231017 is reproducible and the questions are all answered.

For systemd stub, we are waiting for a review of the upstream code before accepting submissions including it. Besides that this needs also one more (also unofficial) review, to check that we haven't missed anything.

@THS-on THS-on added extra review wanted Initial review(s) look good, another review desired and removed question Reviewer(s) waiting on response labels Oct 24, 2023
@joseph-zeronsoftn
Copy link
Author

Hello.
Is there anyone who can review?

@aronowski aronowski self-assigned this Jan 18, 2024
@aronowski
Copy link
Collaborator

Hello.

Apologies for the delay - reviewing as much as I can.

I won't be able to review systemd-boot by myself and can't base on the earlier accepted application. Apologies, but you'll have to wait for someone, who can.

In the meantime certain requirements have changed and some information will have to be updated. Below are the entries I spotted.


As far as I can see this is the current implementation in Debian's bookworm branch (https://salsa.debian.org/grub-team/grub/-/blob/bookworm/debian/sbat.debian.csv.in) - the upstream Free Software Foundation's GRUB2 SBAT entry has been bumped to 4](15c328e). Please, update it in the application's README.


Shim SBAT has not been updated in the zeronsoftn-shim-x86_64_ia32_aarch64-20231017 tag (although used zerox-shim-x86_64_ia32_aarch64-20231017 for reference - it's been fixed there).


Is the whole bootchain NX-compatible? Since I have no experience with systemd-boot, I can't tell anything on this one, but for the current GRUB2 and kernel versions I have some doubts.
If it's not, then please, update the shim binaries and the recipe for building them, so they are not NX-compatible, according to the latest Microsoft requirements. The builds do reproduce (just checked), so it should be easy.


The https://github.com/zeronsoftn/shim-release repository seems to be empty, despite being mentioned as part of Shim's SBAT. Is this intentional? Am I missing something?

@aronowski aronowski added the question Reviewer(s) waiting on response label Jan 22, 2024
@aronowski aronowski mentioned this issue Feb 15, 2024
8 tasks
@THS-on
Copy link
Collaborator

THS-on commented Feb 20, 2024

@joseph-zeronsoftn can you either update this submission to 15.8 or create a new one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
custom second-stage Second-stage image is not GRUB extra review wanted Initial review(s) look good, another review desired question Reviewer(s) waiting on response
Projects
None yet
Development

No branches or pull requests

3 participants