π‘οΈ Sentinel: [MEDIUM] Fix DoS via bytes bypass in timeout validation#71
Conversation
- Updated timeout validation in `testping1.py` to check for `isinstance(timeout, (str, bytes))` instead of just `str` to prevent massive bytes objects from bypassing length checks and causing CPU exhaustion during `int()` conversion. - Updated `test_testping1.py` assertion strings and added explicit test case for byte payload DoS. Co-authored-by: ManupaKDU <95234271+ManupaKDU@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. |
π¨ Severity: MEDIUM
π‘ Vulnerability: DoS (CPU exhaustion) via
int()parsing of un-capped massivebytespayloads. Whilestrlimits were checked, abytespayload could bypass this and cause O(N^2) parsing lag.π― Impact: Potential thread exhaustion or Denial of Service by an attacker feeding arbitrarily large bytes payloads into the timeout conversion step.
π§ Fix: Added
bytesto the length-checkisinstanceconstraint, changing it to(str, bytes). Updated logging and added testing forbytespayload validation.β Verification: Ran test suite to verify tests pass and regressions avoided.
PR created automatically by Jules for task 1726633105317089464 started by @ManupaKDU