Regarding the
|
# Fix a simple programming error ...fixed in 4.11.1? |
there is another hidden potential mismatch between shadow and musl.
Currently, the SHA_ROUNDS_MAX in shadow and musl differ. The one in musl 1.2.3 is defined as
https://git.musl-libc.org/cgit/musl/tree/src/crypt/crypt_sha512.c?h=v1.2.3#n196
/* key limit is not part of the original design, added for DoS protection.
* rounds limit has been lowered (versus the reference/spec), also for DoS
* protection. runtime is O(klen^2 + klen*rounds) */
#define KEY_MAX 256
#define SALT_MAX 16
#define ROUNDS_DEFAULT 5000
#define ROUNDS_MIN 1000
#define ROUNDS_MAX 9999999
(7 digits), whereas the one expected by shadow 4.11.1 is
https://github.com/shadow-maint/shadow/blob/1bf5868e3378aef0f36ba3490852709d79729419/libmisc/salt.c#L63
#define SHA_ROUNDS_MAX 999999999
(9 digits), which means that shadow can potentially request the larger number of rounds than supported by musl.
Regarding the
Musl-LFS/doc/3-Chroot/022-Shadow
Line 13 in eb64786
Currently, the
SHA_ROUNDS_MAXin shadow and musl differ. The one in musl 1.2.3 is defined ashttps://git.musl-libc.org/cgit/musl/tree/src/crypt/crypt_sha512.c?h=v1.2.3#n196
(7 digits), whereas the one expected by shadow 4.11.1 is
https://github.com/shadow-maint/shadow/blob/1bf5868e3378aef0f36ba3490852709d79729419/libmisc/salt.c#L63
(9 digits), which means that shadow can potentially request the larger number of rounds than supported by musl.