-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
FatPkg: Validate Reserved FAT Entries on Volume Open #10609
base: master
Are you sure you want to change the base?
Conversation
@mdkinney @leiflindholm @ajfish as I am the only maintainer of FatPkg, can a steward please help review this PR? |
There are two reserved FAT entries in the FAT filesystem that are expected to have valid contents in them. Today the FAT drivers do not validate these entries when reading from a device for the first time. This can cause infinite loops in the FAT driver when trying to read corrupted disks as reported in tianocore#9679. This PR follows the recommended update requested in that bug to check the two reserved FAT entries and validate their contents against the spec defined values in both FatPei and EnhancedFatDxe when opening a device for the first time. Signed-off-by: Oliver Smith-Denny <[email protected]>
@mdkinney @leiflindholm @ajfish , I have missed the CI failure, can you help review? |
I see all checks have passed |
@mdkinney , oops, typo! I meant to say I have fixed the CI failure. I am the only FatPkg maintainer, so would like a steward review to merge this. |
This pull request has been removed from the queue for the following reason: The merge conditions cannot be satisfied due to failing checks:You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
@Mergifyio requeue |
✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically |
This hit an issue with EmulatorPkg that commonly comes up, not being able to allocate the PeiServiceTablePointer. Requeued as it should pass next time. |
We seem to be hitting this condition more frequently now. Either need to find a better address value or change the EmulatorPkg design to not depend on a specific address. |
Description
There are two reserved FAT entries in the FAT filesystem that are expected to have valid contents in them. Today the FAT drivers do not validate these entries when reading from a device for the first time. This can cause infinite loops in the FAT driver when trying to read corrupted disks as reported in
#9679.
This PR follows the recommended update requested in that bug to check the two reserved FAT entries and validate their contents against the spec defined values in both FatPei and EnhancedFatDxe when opening a device for the first time.
How This Was Tested
Tested on OVMF, EmulatorPkg, and ArmVirtPkg and confirmed that correctly formatted devices are able to boot.
Integration Instructions
N/A.