Skip to content
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

Possible Uninitialized Data Usage in CFE_FS_ReadHeader #2581

Closed
tandharia opened this issue Jul 21, 2024 · 0 comments · Fixed by #2584
Closed

Possible Uninitialized Data Usage in CFE_FS_ReadHeader #2581

tandharia opened this issue Jul 21, 2024 · 0 comments · Fixed by #2584

Comments

@tandharia
Copy link

tandharia commented Jul 21, 2024

Describe the bug
Static code analysis with TrustInSoft identified a potential issue in cfe_fs_api.c on line 139 (based on the equuleus-rc1 tag). The CFE_FS_ReadHeader function assumes that the buffer is correctly filled without checking if the read operation was successful. If the read operation fails or reads fewer bytes than expected, the buffer Hdr may contain uninitialized or partially initialized data, which could lead to undefined behavior when accessing the buffer.

To Reproduce
Run TrustInSoft Static Code Analysis on the codebase

Reporter Info
Tvisha Andharia - GSFC 582 Intern

tandharia pushed a commit to tandharia/cFE that referenced this issue Jul 22, 2024
tandharia pushed a commit to tandharia/cFE that referenced this issue Jul 29, 2024
dzbaker added a commit that referenced this issue Aug 2, 2024
@dzbaker dzbaker closed this as completed in 13c35a5 Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant