Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Integer Underflow in TOTP Validation #97

Open
Laotree opened this issue Nov 29, 2024 · 0 comments · May be fixed by #98
Open

Bug: Integer Underflow in TOTP Validation #97

Laotree opened this issue Nov 29, 2024 · 0 comments · May be fixed by #98

Comments

@Laotree
Copy link

Laotree commented Nov 29, 2024

When validating TOTP with Skew > 0 and the current time window counter is 0,
the validation logic attempts to check previous time windows by subtracting
from counter 0, resulting in negative values. This is invalid as HOTP counters
must be non-negative integers.

Example:

  • Current counter = 0
  • Skew = 1
  • Results in checking counters: [0, 1, -1] // -1 is invalid
@Laotree Laotree linked a pull request Nov 29, 2024 that will close this issue
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 a pull request may close this issue.

1 participant