rhboot / rhboot/shim

Arguments from EFI Shell incorrectly parsed

Open
#181 2 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.