Arguments from EFI Shell incorrectly parsed
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.1k
- Forks
- 348
- PR merge metrics
- No merged PRs in 30d
Description
If we have shim in for example /EFI/test/shim.efi, executing cd /EFI/test; shim.efi custom_name.efi; makes shim to take "/EFI/test/shim.efi custom_name.efi" as parameter so it fails to load custom_name.efi as would be expected to do.
In the code is commented that EFI Shell passes this as strings separated with NULL character but in this situation space character is passed instead '20 00'. I think this situation should check for it and remove the own path leaving only "custom_name.efi" as parameter.
It doesn't matter if we specify the preceding / or use the full path /EFI/test/custom_name.efi, the behavior is the same.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue from an EFI Shell with cd /EFI/test; shim.efi custom_name.efi, comparing the received arguments with the documented NULL-separated form mentioned in the report. Trace the C argument-parsing entry point and verify that the executable path is excluded while custom_name.efi remains as the parameter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100