Skip to content

🛡️ Sentinel: [MEDIUM] Fix Unbounded Queue DoS in AsyncLogger#107

Closed
TECHNICANGEL wants to merge 1 commit intomasterfrom
sentinel-async-logger-dos-fix-3670113622189682560
Closed

🛡️ Sentinel: [MEDIUM] Fix Unbounded Queue DoS in AsyncLogger#107
TECHNICANGEL wants to merge 1 commit intomasterfrom
sentinel-async-logger-dos-fix-3670113622189682560

Conversation

@TECHNICANGEL
Copy link
Owner

This PR addresses a potential Denial of Service (DoS) vulnerability in the AsyncLogger class where the message queue could grow indefinitely if the consumer thread (file/console I/O) is slower than the producer thread.

Changes:

  • Added MAX_QUEUE_SIZE constant (10000) to AsyncLogger.h.
  • Modified log() to drop messages if the queue is full.
  • Added a queueFullWarning flag to print a single warning to std::cerr when the queue fills up, and reset it when the queue is fully drained by the worker thread.
  • Fixed a compilation error in src/main.cpp caused by duplicate member variable declarations (currentFPS, frameTimeMs).
  • Documented the vulnerability in .Jules/sentinel.md.

Verification:

  • Compiled successfully on Linux (cmake --build .).
  • Verified thread safety logic (locks are held during queue access and flag modification).

PR created automatically by Jules for task 3670113622189682560 started by @TECHNICANGEL

- Add `MAX_QUEUE_SIZE` (10000) to `AsyncLogger` to prevent memory exhaustion (DoS).
- Implement message dropping mechanism when queue is full.
- Add thread-safe warning mechanism (`queueFullWarning`) to log overflow events to `stderr` without spamming.
- Update `.Jules/sentinel.md` with DoS/Unbounded Queue learning.
- Fix duplicate member declaration in `src/main.cpp` to fix compilation.

Co-authored-by: TECHNICANGEL <197574689+TECHNICANGEL@users.noreply.github.com>
@google-labs-jules
Copy link

👋 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.

@TECHNICANGEL TECHNICANGEL deleted the sentinel-async-logger-dos-fix-3670113622189682560 branch February 23, 2026 15:37
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.

1 participant