-
Notifications
You must be signed in to change notification settings - Fork 297
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
What happens if LoadOption is L"\0" ? #95
Comments
To me it's strange that count_ucs2_strings() returns 1 for the input L"\0". |
L"\0" is one string of length 0. That looks right to me. |
vathpela
added a commit
that referenced
this issue
Mar 6, 2018
I don't know when or why we ever see this, but it's easy enough to avoid. Resolves github issue #95 Signed-off-by: Peter Jones <pjones@redhat.com>
frozencemetery
added a commit
to frozencemetery/shim
that referenced
this issue
Aug 23, 2022
In 6c8d08c ("shim: Ignore UEFI LoadOptions that are just NUL characters."), a check was added to discard load options that are entirely NUL. We now see some firmwares that start LoadOptions with a NUL, and then follow it with garbage (path to directory containing loaders). Widen the check to just discard anything that starts with a NUL. Resolves: rhboot#490 Related: rhboot#95 See-also: https://bugzilla.redhat.com/show_bug.cgi?id=2113005 Signed-off-by: Robbie Harwood <rharwood@redhat.com>
frozencemetery
added a commit
to frozencemetery/shim
that referenced
this issue
Aug 25, 2022
In 6c8d08c ("shim: Ignore UEFI LoadOptions that are just NUL characters."), a check was added to discard load options that are entirely NUL. We now see some firmwares that start LoadOptions with a NUL, and then follow it with garbage (path to directory containing loaders). Widen the check to just discard anything that starts with a NUL. Resolves: rhboot#490 Related: rhboot#95 See-also: https://bugzilla.redhat.com/show_bug.cgi?id=2113005 Signed-off-by: Robbie Harwood <rharwood@redhat.com>
vathpela
pushed a commit
that referenced
this issue
Sep 1, 2022
In 6c8d08c ("shim: Ignore UEFI LoadOptions that are just NUL characters."), a check was added to discard load options that are entirely NUL. We now see some firmwares that start LoadOptions with a NUL, and then follow it with garbage (path to directory containing loaders). Widen the check to just discard anything that starts with a NUL. Resolves: #490 Related: #95 See-also: https://bugzilla.redhat.com/show_bug.cgi?id=2113005 Signed-off-by: Robbie Harwood <rharwood@redhat.com>
brianredbeard
pushed a commit
to brianredbeard/redhat-efi-boot-shim
that referenced
this issue
Feb 22, 2024
In 6c8d08c ("shim: Ignore UEFI LoadOptions that are just NUL characters."), a check was added to discard load options that are entirely NUL. We now see some firmwares that start LoadOptions with a NUL, and then follow it with garbage (path to directory containing loaders). Widen the check to just discard anything that starts with a NUL. Resolves: rhboot#490 Related: rhboot#95 See-also: https://bugzilla.redhat.com/show_bug.cgi?id=2113005 Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
shim/shim.c
Line 2531 in e06765a
Hi @vathpela , may I ask about the function "set_second_stage" in shim.c ?
If the LoadOption data happens to be L"\0" , what's the expected results?
I found that the function "count_ucs2_strings" returns 1, when the input is L"\0".
In such a case, do we want to fall back to DEFAULT_LOADER? Or halt?
The text was updated successfully, but these errors were encountered: