Bug 1981833 - CVE-2021-3652 redhat-ds:11/389-ds-base: CRYPT password hash with asterisk allows any bind attempt to succeed [directory_server_11]
Summary: CVE-2021-3652 redhat-ds:11/389-ds-base: CRYPT password hash with asterisk all...
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2022-12-26
Product: Red Hat Directory Server
Classification: Red Hat
Component: 389-ds-base
Version: 11.3
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: DS11.3
: dirsrv-11.4
Assignee: mreynolds
QA Contact: RHDS QE
Marc Muehlfeld
URL:
Whiteboard:
: 1982788 (view as bug list)
Depends On:
Blocks: CVE-2021-3652
TreeView+ depends on / blocked
 
Reported: 2021-07-13 13:56 UTC by mreynolds
Modified: 2021-10-25 06:36 UTC (History)
4 users (show)

Fixed In Version: redhat-ds-11-8050020210803164248.d3df4063
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-25 06:36:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:3955 0 None None None 2021-10-25 06:36:33 UTC

Description mreynolds 2021-07-13 13:56:33 UTC
Issue Description:

If an entry contains an asterisk as the crypted password hash, binding is possible with any password for this entry userPassword: {CRYPT}*


Package Version and Platform:

389-ds-base-1.4.3.23


Steps to reproduce the behavior:

Create an entry (e.g. a posixAccount) with the userPassword set to "{CRYPT}*", e.g. by importing it from an ldif file.  Try to bind with that entry using an arbitrary password (e.g. "llhh").  Check if the binding was successful


Expected results:

I would expect the bind to fail with any password because the asterisk is not a valid character in a crypted password.


Additional context:

Problem occurred after importing entries from a NIS database. In NIS (and in /etc/shadow), the asterisk is often used for special users like "nobody".


Upstream Ticket:

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

Comment 1 Cedric Buissart 2021-07-28 12:27:30 UTC
*** Bug 1982788 has been marked as a duplicate of this bug. ***

Comment 5 bsmejkal 2021-09-02 11:01:52 UTC
============================================================================================================ test session starts =============================================================================================================
platform linux -- Python 3.6.8, pytest-6.2.5, py-1.10.0, pluggy-1.0.0 -- /usr/bin/python3.6
cachedir: .pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-4.18.0-339.el8.x86_64-x86_64-with-redhat-8.5-Ootpa', 'Packages': {'pytest': '6.2.5', 'py': '1.10.0', 'pluggy': '1.0.0'}, 'Plugins': {'metadata': '1.11.0', 'html': '3.1.1', 'libfaketime': '0.1.2', 'flaky': '3.7.0'}}
389-ds-base: 1.4.3.26-1.module+el8dsrv+12420+cb9f0071
nss: 3.53.1-17.el8_3
nspr: 4.32.0-1.el8_4
openldap: 2.4.46-18.el8
cyrus-sasl: 2.1.27-5.el8
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests, configfile: pytest.ini
plugins: metadata-1.11.0, html-3.1.1, libfaketime-0.1.2, flaky-3.7.0
collected 1 item                                                                                                                                                                                                                             

dirsrvtests/tests/suites/password/pwd_crypt_asterisk_test.py::test_password_crypt_asterisk_is_rejected PASSED                                                                                                                          [100%]

============================================================================================================= 1 passed in 8.26s ==============================================================================================================

Marking as VERIFIED.

Comment 8 errata-xmlrpc 2021-10-25 06:36:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Low: redhat-ds:11 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:3955


Note You need to log in before you can comment on or make changes to this bug.