Skip to content

argon2: check p_cost < Params::MIN_P_COST before m_cost < p_cost * 8 - #745

Merged
newpavlov merged 1 commit into
masterfrom
argon2/params_bug_fix
Nov 18, 2025
Merged

argon2: check p_cost < Params::MIN_P_COST before m_cost < p_cost * 8#745
newpavlov merged 1 commit into
masterfrom
argon2/params_bug_fix

Conversation

@newpavlov

Copy link
Copy Markdown
Member

p_cost * 8 overflows for p_cost values larger than u32::MAX / 8, which can trigger panic with enabled overflow checks.

The bug was reported by nb0999 via e-mail.

@newpavlov
newpavlov requested a review from tarcieri November 17, 2025 13:42
@newpavlov
newpavlov merged commit 40b0048 into master Nov 18, 2025
18 checks passed
@newpavlov
newpavlov deleted the argon2/params_bug_fix branch November 18, 2025 18:11
@tarcieri tarcieri mentioned this pull request Aug 27, 2026
tarcieri added a commit that referenced this pull request Aug 27, 2026
## Added
- Detect allocation failures in `hash_password_into` (#568)
- `parallel` feature (#547)
- `PasswordVerifier<str>` impl (#779)
- `kdf::{Kdf, Pbkdf}` impls (#823)

## Changed
- Upgrade to Rust 2024 edition; MSRV 1.85 (#563)
- Switch from `std::error::Error` to `core::error::Error` (#767)
- Rename `simple` feature to `password-hash` (#776)
- Bump `cpufeatures` to v0.3 (#847)
- Bump `password-hash` to v0.6 (#848)
- Bump `blake2` to v0.11 (#929)

## Removed
- `std` feature (#768)

## Fixed
- Check `p_cost < Params::MIN_P_COST` before `m_cost < p_cost * 8` (#745)
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