Skip to content

πŸ›‘οΈ Sentinel: [CRITICAL] Fix DoS vulnerability via massive integer conversion exhaustion#51

Merged
manupawickramasinghe merged 1 commit intomainfrom
sentinel/fix-dos-massive-int-conversion-8003572088896931687
Apr 10, 2026
Merged

πŸ›‘οΈ Sentinel: [CRITICAL] Fix DoS vulnerability via massive integer conversion exhaustion#51
manupawickramasinghe merged 1 commit intomainfrom
sentinel/fix-dos-massive-int-conversion-8003572088896931687

Conversation

@ManupaKDU
Copy link
Copy Markdown
Contributor

🚨 Severity: CRITICAL
πŸ’‘ Vulnerability: Denial of Service (DoS) via Application Crash.
Python 3.11+ limits integer-to-string conversions (e.g., calling repr() or string formatting on massive ints) via sys.set_int_max_str_digits (default 4300 digits). If an attacker passed massive integers (e.g., 10**100000) as the ip or timeout arguments, the downstream string formatting and repr() logging would fail with an unhandled ValueError. This unhandled exception bubbles up and crashes the worker thread pool in concurrent.futures, leading to a complete Denial of Service.
🎯 Impact: An attacker or misconfigured client passing massive integer values could immediately crash the entire background scanning pool, halting all network scanning operations.
πŸ”§ Fix:

  1. Added explicit bound checks on timeout and ip when they are of type int to reject massive inputs immediately.
  2. Wrapped all repr() calls within logging except blocks in a try...except ValueError to catch any remaining integer conversion limits and provide a safe <unrepresentable> fallback string.
  3. Added robust unit tests in test_testping1.py covering massive ints for both parameters and a malicious __repr__ object.
    βœ… Verification: Ran python3 -m unittest test_testping1.py successfully. Verified temporary testing files were removed.

PR created automatically by Jules for task 8003572088896931687 started by @ManupaKDU

…version exhaustion

Co-authored-by: ManupaKDU <95234271+ManupaKDU@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

πŸ‘‹ 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@manupawickramasinghe manupawickramasinghe merged commit c36c75e into main Apr 10, 2026
1 check passed
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 this pull request may close these issues.

2 participants