[PATCH] Issue 4817 - BUG - locked crypt accounts on import may allow all passwords...
authorFirstyear <william@blackhats.net.au>
Fri, 9 Jul 2021 01:53:35 +0000 (11:53 +1000)
committerAnton Gladky <gladk@debian.org>
Mon, 24 Apr 2023 04:08:15 +0000 (05:08 +0100)
commite7bdf503a1e0883e6c1814071c0c4aaf4b1e5ec4
treeca4d650c9b45ca1c2b0598ab8b45f2847c627ad4
parent82fc541423a2745e64df9c88444cca030dae5715
[PATCH] Issue 4817 - BUG - locked crypt accounts on import may allow all passwords (#4819)

Bug Description: Due to mishanding of short dbpwd hashes, the
crypt_r algorithm was misused and was only comparing salts
in some cases, rather than checking the actual content
of the password.

Fix Description: Stricter checks on dbpwd lengths to ensure
that content passed to crypt_r has at least 2 salt bytes and
1 hash byte, as well as stricter checks on ct_memcmp to ensure
that compared values are the same length, rather than potentially
allowing overruns/short comparisons.

fixes: https://github.com/389ds/389-ds-base/issues/4817

Author: William Brown <william@blackhats.net.au>

Review by: @mreynolds389

Gbp-Pq: Name CVE-2021-3652.patch
dirsrvtests/tests/suites/password/pwd_crypt_asterisk_test.py [new file with mode: 0644]
ldap/servers/plugins/pwdstorage/crypt_pwd.c