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 1791965 - pam_userdb with DES encrypted passwords does not always work
Summary: pam_userdb with DES encrypted passwords does not always work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pam
Version: 8.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Iker Pedrosa
QA Contact: Anuj Borah
URL:
Whiteboard: review
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-16 19:12 UTC by Dalibor Pospíšil
Modified: 2021-11-10 08:03 UTC (History)
9 users (show)

Fixed In Version: pam-1.3.1-15.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:39:10 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4395 0 None None None 2021-11-09 19:39:12 UTC

Description Dalibor Pospíšil 2020-01-16 19:12:18 UTC
Description of problem:
There are passwords which work (password, PaSSword) and which does not (password123, password?) specifically on s390x and x86_64 only. Ppc64le and aarch64 are not affected.

Version-Release number of selected component (if applicable):
pam-1.3.1-8.el8

How reproducible:
100%

Steps to Reproduce:
1. use linked test

Comment 1 Iker Pedrosa 2020-02-19 08:38:43 UTC
There seems to be a problem with crypt_r() API in s390x and x86_64 architectures with passwords longer than 8 characters.

As an example: password "password123" would be encrypted as "ZZKRwXSu3tt8s" with DES, but debugging the code I found that crypt_r() encrypted it as "ZZKRwXSu3tt8sjZuBF/FYdyE", which contains the expected result plus other characters. Something similar happens with "password?", which also has more than 8 characters. On the other hand "password" or "PaSSword", which are 8 characters long, work correctly.

Comment 2 Tomas Mraz 2020-02-19 09:40:27 UTC
Basically this means crypt_r() behaves like it was a "bigcrypt" implementation instead of the pure DES crypt. What's even more weird is that this happens only on some architectures.

Comment 9 Stanislav Zidek 2021-04-16 17:29:24 UTC
Sure, Iker, done: https://github.com/linux-pam/linux-pam/pull/355

Please have a look, I don't have much experience with pam.

Comment 10 Iker Pedrosa 2021-04-19 07:07:20 UTC
Thank you! I've just seen that Tomas Mraz has already reviewed it, so if you don't mind I leave you in his hands. He has a deeper knowledge of the package and he's one of the maintainers of the project.

Comment 11 Simo Sorce 2021-04-19 20:03:57 UTC
Iker, 
Tomas has left Red Hat, please review the PAM part.

Comment 12 Iker Pedrosa 2021-04-22 07:33:12 UTC
Thank you Stanislav! You did a great work.

master:
    a7453aeeb398d6cbb7a709c4e2a1d75905220fff - pam_userdb: Prevent garbage characters from db

Comment 21 errata-xmlrpc 2021-11-09 19:39:10 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 (pam 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/RHBA-2021:4395


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