fix: Address input validation vulnerabilities in OCPP message handling#441
Open
itsvishalchauhan wants to merge 1 commit intomatth-x:mainfrom
Open
Conversation
Security fixes for multiple input validation issues: - MOC-001: Fix OOB read in timestamp fractional second parsing (Time.cpp) - MOC-002: Add zero-length serial number check in certificate parsing (CertificateMbedTLS.cpp) - MOC-003: Add bounds validation in OCPP message parsing (Request.cpp, RequestQueue.cpp) - MOC-004: Fix NULL pointer dereference in TransactionEvent (TransactionEvent.cpp) - MOC-005: Fix typo causing NULL pointer (parenIdTag → parentIdTag) (MicroOcpp.cpp) - MOC-006: Validate FTP PASV response values are valid octets (FtpMbedTLS.cpp) - MOC-007: Add overflow-safe integer parsing for configuration (Configuration.cpp/.h, ChangeConfiguration.cpp, VariableService.cpp) These issues were identified during security review and could cause crashes or undefined behavior when processing malformed OCPP messages or server responses.
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
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.
Summary
This PR fixes multiple input validation vulnerabilities that could cause crashes or undefined behavior when processing malformed OCPP messages or server responses.
Vulnerabilities Fixed
High Severity
Request.cpp,RequestQueue.cppMedium Severity
Time.cpp)TransactionEvent.cpp)"parenIdTag"→"parentIdTag"(MicroOcpp.cpp)Low/Informational
FtpMbedTLS.cpp)Configuration.cpp,ChangeConfiguration.cpp,VariableService.cpp)CertificateMbedTLS.cpp)Testing
Breaking Changes
None - all fixes are backwards compatible
Vulnerabilities identified and remediation proposed by Nebari.ai — AI-native proactive security intelligence solution