-
Notifications
You must be signed in to change notification settings - Fork 34
Fix fuzzing-discovered issues in filesystem drivers #76
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
Open
stokescat
wants to merge
4
commits into
acidanthera:master
Choose a base branch
from
stokescat:fix/fs-06-07-2025
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
An UB was found during fuzz testing. When constructing a cluster number from 16-bit components, a left shift by 16 bits caused an implicit conversion to an 'int' type, leading to UB due to overflow. The fix ensures proper handling of integer promotions by: 1. Using explicit cast to unsigned type before shift operation 2. Ensuring sufficient bit-width for the operation Reference: ISO/IEC 9899:2018 (C17 standard), Section 6.3.1.1 Draft available: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2310.pdf Signed-off-by: Pavel Naberezhnev <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During fuzz testing, we encountered an ASSERT() condition being triggered. Changes: - Replaced ASSERT() with explicit condition check - Returns EFI_DEVICE_ERROR on failure case Signed-off-by: Pavel Naberezhnev <[email protected]>
A memory leak was discovered during fuzz testing: - The async task object (Task) created in FatIFileAccess was not being freed when FatGrowEof() returned an error Changes: - Moved the "Done" label to precede the "Task" check in if-then branch Signed-off-by: Pavel Naberezhnev <[email protected]>
026be0d
to
ce72698
Compare
b9bdfec
to
40d47c2
Compare
The ext4 driver implements EFI_FILE_PROTOCOL_REVISION but was missing the required Flush() function. According to UEFI Specification v2.10, Section 13.5 (File Protocol), all protocol functions must be implemented. Changes: - Adds minimal Flush() function implementation Signed-off-by: Pavel Naberezhnev <[email protected]>
40d47c2
to
7a86204
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This patch series addresses critical issues discovered during fuzzing testing of filesystem drivers:
ASSERT()
with explicit error checkingImplemented missing
Flush()
function in the ext4 driverAdded minimal dummy implementation to satisfy protocol requirements
Breaking change?
Impacts security?
Includes tests?
How This Was Tested
Integration Instructions