RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2137557 - In FIPS mode, openssl should set a minimum length for passwords in PBKDF2
Summary: In FIPS mode, openssl should set a minimum length for passwords in PBKDF2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: openssl
Version: 9.0
Hardware: x86_64
OS: Linux
high
urgent
Target Milestone: rc
: ---
Assignee: Clemens Lang
QA Contact: Hubert Kario
Jan Fiala
URL:
Whiteboard:
Depends On:
Blocks: 2144003 2144004
TreeView+ depends on / blocked
 
Reported: 2022-10-25 13:49 UTC by Clemens Lang
Modified: 2023-05-09 10:31 UTC (History)
4 users (show)

Fixed In Version: openssl-3.0.7-1.el9
Doc Type: Deprecated Functionality
Doc Text:
.OpenSSL in FIPS mode requires longer passwords for key-derivation with PBKDF2 With this update, key-derivation in OpenSSL from passwords shorter than 8 characters with the PBKDF2 algorithm fails in FIPS mode.
Clone Of:
: 2144003 2144004 (view as bug list)
Environment:
Last Closed: 2023-05-09 08:20:47 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
PBKDF2 reproducer for OpenSSL 3 (4.52 KB, text/x-csrc)
2022-10-25 13:49 UTC, Clemens Lang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CRYPTO-8692 0 None None None 2022-11-02 12:23:17 UTC
Red Hat Issue Tracker RHELPLAN-137525 0 None None None 2022-10-25 13:59:29 UTC
Red Hat Product Errata RHSA-2023:2523 0 None None None 2023-05-09 08:21:25 UTC

Description Clemens Lang 2022-10-25 13:49:21 UTC
Created attachment 1920262 [details]
PBKDF2 reproducer for OpenSSL 3

Description of problem:
In FIPS mode, OpenSSL accepts arbitrarily short passwords in PBKDF2. It should reject short passwords.

When invoked with short passwords, OpenSSL should either set an explicit indicator, or fail the call (i.e., have an implicit indicator).

Version-Release number of selected component (if applicable):
3.0.1-41.el9_0

How reproducible:
Run the attached reproducer with a short password.

Steps to Reproduce:
1. cc -std=c99 -Wall -Werror -pedantic -D_XOPEN_SOURCE=600 -o pbkdf2 pbkdf2.c -lcrypto
2. ./pbkdf2 sha256 16 1000 14 ""

Actual results:
OK: 0x9e3cbde11511443b1d66bd614ac0

Expected results:
ERR Failed to set EVP_KDF_CTX parameters: error:1C800070:Provider routines::invalid password length (in function kdf_pbkdf2_set_ctx_params in providers/implementations/kdfs/pbkdf2.c:196)

Additional info:
Similar checks already exist for short salt lengths and short output password lengths. See the error message in "Expected results", which was modified from a short salt length. Also see the documentation for OSSL_KDF_PARAM_PKCS5 in https://www.openssl.org/docs/man3.0/man7/EVP_KDF-PBKDF2.html, which already refers to checks that are done in FIPS mode but not outside of FIPS mode by default. We should probably just extend those tests.

As reasonable limit for the password length is probably >= 8 bytes. Do not choose a minimum password length of more than 8 bytes combined with an implicit indicator, since ACVP testing expects 8-byte passwords to work.

Comment 13 errata-xmlrpc 2023-05-09 08:20:47 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: openssl security and bug fix 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-2023:2523


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