Skip to content

Security: Denial of service via RwLock poisoning #98

@mantono

Description

@mantono

Description

All RwLock acquisitions in src/main.rs (lines 122, 131, 144, 159, 167) use .unwrap(). If a thread panics while holding the lock (e.g., due to an unexpected error in the Redis backend), the RwLock becomes permanently poisoned and every subsequent .unwrap() will panic, crashing the server on every request.

Severity

Medium

Impact

A single panic while the lock is held causes a permanent denial of service - the server stays running but returns no responses, only panics.

Suggested Fix

Replace .unwrap() with proper error handling that returns StatusCode::INTERNAL_SERVER_ERROR and logs the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions