Ensure the open operation targets an HTTP device. Return EINVAL if
not, to prevent potential system crashes when used on other devices.
Details
Details
When using httpboot to load the loader and then attempting to load the OS through another device type, a panic occurs when attempting to open a file using the HTTP file system. The steps to reproduce this issue are as follows:
- Preset the rootdev in the loader, for example: setenv('rootdev', 'disk3p2', 1).
- Load the loader using httpboot. Then during the loader runs, a panic will occur.
After adding the device type check to efihttp_fs_open(), the issue is gone.
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped