Vitaly Kuznetsov has offered https://github.com/rhboot/shim/pull/611
to fix the NVRAM entry generated by `add_boot_option(...)` in Shim's
`fallback.c`.

It is quite pervasive in that file to treat the size of the loaded
image arguments as `StrLen(arguments) * 2` (just search for
`StrLen(arguments)`, since `StrLen(arguments) * sizeof (CHAR16)` is
also used) - so the issue identified in the PR affects
`find_boot_option(...)` as well as add_boot_option(...)`.

Additionally, while the PR does not currently address this,
`image->LoadOptionsSize` should include the size of the `CHAR_NULL`
terminator of `image->LoadOptions` (when `arguments` is non-empty), so
I believe the `first_new_option_size` handling in the file needs
updating in a similar manner too.

Sincerely,

Mike Beaton
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to