π‘οΈ Sentinel: Fix Remote DoS via malformed packets#30
π‘οΈ Sentinel: Fix Remote DoS via malformed packets#30ChristopheHD wants to merge 2 commits intomasterfrom
Conversation
π¨ Severity: CRITICAL/HIGH π‘ Vulnerability: A Remote Denial of Service (DoS) vulnerability existed in the packet parsing logic. Malformed packets with valid CRC but insufficient internal data triggered IndexError in communicator threads, causing them to terminate. π― Impact: An attacker could remotely crash EnOcean communicator services (Serial or TCP) by sending specifically crafted malformed packets. π§ Fix: - Added explicit bounds checking in Packet subclasses (RadioPacket, UTETeachInPacket, etc.). - Wrapped packet instantiation in Packet.parse_msg with a try...except block to gracefully handle unexpected parsing failures. - Optimized sync byte searching in Packet.parse_msg for better performance and resource exhaustion prevention. β Verification: - Added `test_malformed_packet_robustness` to `enocean/protocol/tests/test_packet.py`. - Verified with reproduction script that malformed packets no longer crash the TCPCommunicator. - All existing tests pass. Co-authored-by: ChristopheHD <16214389+ChristopheHD@users.noreply.github.com>
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Pull Request Test Coverage Report for Build 21714552800Details
π - Coveralls |
This PR addresses a Remote DoS vulnerability where malformed packets passing CRC checks could crash communicator threads due to missing bounds checks during specialized packet parsing. It also includes performance optimizations to the main parsing loop.
PR created automatically by Jules for task 1009602674474980442 started by @ChristopheHD