https://bugs.openldap.org/show_bug.cgi?id=10651
Issue ID: 10651 Summary: argon2 pwmod: hashed value includes trailing NUL byte when built with libargon2 Product: OpenLDAP Version: 2.6.16 Hardware: All OS: All Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: slapd Assignee: bugs@openldap.org Reporter: hamano@osstech.co.jp Target Milestone: ---
With libargon2 (`HAVE_LIBARGON2`), `slapd_argon2_hash()` sets
```c hash->bv_len = scheme->bv_len + encoded_length; ```
but `argon2_encodedlen()` includes the terminating NUL, so the stored `{ARGON2}` value ends with `\0` (and is shown base64-encoded in LDIF). The libsodium path uses `strlen()` and is not affected.
https://bugs.openldap.org/show_bug.cgi?id=10651
--- Comment #1 from HAMANO Tsukasa hamano@osstech.co.jp --- BTW, The website seems to be unreachable over IPv4
``` $ curl -6 https://www.openldap.org/ -> OK $ curl -4 https://www.openldap.org/ curl: (7) Failed to connect to www.openldap.org port 443 after 183 ms: Could not connect to server ```
https://bugs.openldap.org/show_bug.cgi?id=10651
--- Comment #2 from HAMANO Tsukasa hamano@osstech.co.jp --- git.openldap.org is too slow, cannot make mr...
https://bugs.openldap.org/show_bug.cgi?id=10651
--- Comment #3 from HAMANO Tsukasa hamano@osstech.co.jp --- Created attachment 1238 --> https://bugs.openldap.org/attachment.cgi?id=1238&action=edit [PATCH] argon2: Do not include trailing NUL in libargon2 hash
https://bugs.openldap.org/show_bug.cgi?id=10651
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs_review | Target Milestone|--- |2.6.17 Assignee|bugs@openldap.org |hyc@openldap.org
https://bugs.openldap.org/show_bug.cgi?id=10651
--- Comment #4 from HAMANO Tsukasa hamano@osstech.co.jp --- https://git.openldap.org/openldap/openldap/-/merge_requests/951