-
Notifications
You must be signed in to change notification settings - Fork 286
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 .sbatlevel section format is not compatible with binutils older than v2.36 #533
Comments
Yikes! Thanks for the heads up, I'll check it out in the morning. |
vathpela
added a commit
to vathpela/mallory
that referenced
this issue
Dec 5, 2022
In rhboot#533 , iokomin noticed that gas in binutils before 2.36 appears to be incorrectly concatenating string literals in '.asciz' directives, including an extra NUL character in between the strings, and this will cause us to incorrectly parse the .sbatlevel section in shim binaries. This patch adds test cases that will cause the build to fail if this has happened, as well as changing sbat_var.S to to use '.ascii' and '.byte' to construct the data, rather than using '.asciz'. Signed-off-by: Peter Jones <pjones@redhat.com>
vathpela
added a commit
to vathpela/mallory
that referenced
this issue
Dec 6, 2022
In rhboot#533 , iokomin noticed that gas in binutils before 2.36 appears to be incorrectly concatenating string literals in '.asciz' directives, including an extra NUL character in between the strings, and this will cause us to incorrectly parse the .sbatlevel section in shim binaries. This patch adds test cases that will cause the build to fail if this has happened, as well as changing sbat_var.S to to use '.ascii' and '.byte' to construct the data, rather than using '.asciz'. Signed-off-by: Peter Jones <pjones@redhat.com>
vathpela
added a commit
that referenced
this issue
Dec 7, 2022
In #533 , iokomin noticed that gas in binutils before 2.36 appears to be incorrectly concatenating string literals in '.asciz' directives, including an extra NUL character in between the strings, and this will cause us to incorrectly parse the .sbatlevel section in shim binaries. This patch adds test cases that will cause the build to fail if this has happened, as well as changing sbat_var.S to to use '.ascii' and '.byte' to construct the data, rather than using '.asciz'. Signed-off-by: Peter Jones <pjones@redhat.com>
This should be remedied by #535 . |
vathpela
added a commit
to vathpela/mallory
that referenced
this issue
Dec 7, 2022
In rhboot#533 , iokomin noticed that gas in binutils before 2.36 appears to be incorrectly concatenating string literals in '.asciz' directives, including an extra NUL character in between the strings, and this will cause us to incorrectly parse the .sbatlevel section in shim binaries. This patch adds test cases that will cause the build to fail if this has happened, as well as changing sbat_var.S to to use '.ascii' and '.byte' to construct the data, rather than using '.asciz'. Signed-off-by: Peter Jones <pjones@redhat.com>
@vathpela the fix is a straightforward and indeed addresses older binutils issue, thanks for it! |
This was referenced Dec 7, 2022
This was referenced Dec 20, 2022
christoph-at-unicon
pushed a commit
to UniconSoftware/shim
that referenced
this issue
Jan 2, 2023
In rhboot/shim#533 , iokomin noticed that gas in binutils before 2.36 appears to be incorrectly concatenating string literals in '.asciz' directives, including an extra NUL character in between the strings, and this will cause us to incorrectly parse the .sbatlevel section in shim binaries. This patch adds test cases that will cause the build to fail if this has happened, as well as changing sbat_var.S to to use '.ascii' and '.byte' to construct the data, rather than using '.asciz'. Signed-off-by: Peter Jones <pjones@redhat.com>
dbnicholson
pushed a commit
to endlessm/shim
that referenced
this issue
Apr 11, 2023
In rhboot#533 , iokomin noticed that gas in binutils before 2.36 appears to be incorrectly concatenating string literals in '.asciz' directives, including an extra NUL character in between the strings, and this will cause us to incorrectly parse the .sbatlevel section in shim binaries. This patch adds test cases that will cause the build to fail if this has happened, as well as changing sbat_var.S to to use '.ascii' and '.byte' to construct the data, rather than using '.asciz'. Signed-off-by: Peter Jones <pjones@redhat.com> (cherry picked from commit 657b248)
8 tasks
jclab-joseph
added a commit
to jc-lab/shim-review-bot
that referenced
this issue
Sep 19, 2023
8 tasks
joseph-zeronsoftn
pushed a commit
to zeronsoftn/zerox-shim
that referenced
this issue
Sep 25, 2023
In rhboot#533 , iokomin noticed that gas in binutils before 2.36 appears to be incorrectly concatenating string literals in '.asciz' directives, including an extra NUL character in between the strings, and this will cause us to incorrectly parse the .sbatlevel section in shim binaries. This patch adds test cases that will cause the build to fail if this has happened, as well as changing sbat_var.S to to use '.ascii' and '.byte' to construct the data, rather than using '.asciz'. Signed-off-by: Peter Jones <pjones@redhat.com>
This was referenced Oct 18, 2023
8 tasks
brianredbeard
pushed a commit
to brianredbeard/redhat-efi-boot-shim
that referenced
this issue
Feb 22, 2024
In rhboot#533 , iokomin noticed that gas in binutils before 2.36 appears to be incorrectly concatenating string literals in '.asciz' directives, including an extra NUL character in between the strings, and this will cause us to incorrectly parse the .sbatlevel section in shim binaries. This patch adds test cases that will cause the build to fail if this has happened, as well as changing sbat_var.S to to use '.ascii' and '.byte' to construct the data, rather than using '.asciz'. Signed-off-by: Peter Jones <pjones@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Commit 0eb07e1 introduced compatibility issue with binutils versions prior to 2.36. Shim built with older versions might not handle sbat policy properly.
Evaluation:
.sbatlevel section data composed from strings using .asciz asm directive:
shim/sbat_var.S
Lines 16 to 20 in 1149161
Strings provided as macro and as a result treated as a list of string literals. binutils versions <= 2.35 adds zero byte after each string literal from the macro.
For binutils-2.30-117.0.3.el8.x86_64 on Oracle Linux 8, observed section output for cmd
$ objdump -s -j .sbatlevel shimx64.efi
:Expected output:
Intended behavior for these .asciz directives - for multiple string arguments not separated by commas to be concatenated together and only one final zero byte to be stored. This feature/fix apparently introduced in binutils v2.36, see commit https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=3d955acb36f483c05724181da5ffba46b1303c43
@vathpela it may affect rhel7 submission rhboot/shim-review#293 please check.
The text was updated successfully, but these errors were encountered: