[SECURITY] Timing Attack Vulnerability in Authentication #20
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
geomind_code/my_fs#20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In
src/server/auth.rs(Lines 64-68), the password comparison uses a standard string equality check:Risk: Standard string comparison (
!=) returns as soon as a mismatch is found. This allows an attacker to perform a timing attack to guess the password character by character based on how long the server takes to respond.Fix: Use a constant-time comparison (e.g., from the
subtlecrate) for all sensitive credential checks.