Bug 1506858

Summary: /usr/lib64/security/pam_mysql.so: undefined symbol: my_make_scrambled_password
Product: [Fedora] Fedora Reporter: Steven Haigh <netwiz>
Component: pam_mysqlAssignee: Paul P Komkoff Jr <i>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 27CC: adam.jimenez, baldur, i, manuel.wolfshant, netwiz, rbarlow
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-10 23:19:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steven Haigh 2017-10-27 02:20:38 UTC
Any use of pam_mysql in Fedora 27 fails with the error:
PAM unable to dlopen(/usr/lib64/security/pam_mysql.so): /usr/lib64/security/pam_mysql.so: undefined symbol: my_make_scrambled_password
PAM adding faulty module: /usr/lib64/security/pam_mysql.so

$ rpm -qa | grep pam | sort
pam-1.3.0-6.fc27.x86_64
pam_mysql-0.7-0.24.rc1.fc27.x86_64
systemd-pam-234-8.fc27.x86_64

Comment 1 Dietmar Kling 2017-12-03 12:40:12 UTC
seems like my_make_scrambled_password was removed from mysql lib (only a "private" function

This worked for me (TM), when i modified the pam_mysql package and recompiled it.
(Basically it re-implements the function in the pam module)


--- a/pam_mysql.c.orig  2017-12-03 12:30:46.939980891 +0000
+++ b/pam_mysql.c       2017-12-03 12:30:54.196117987 +0000
@@ -2559,6 +2559,23 @@
      const char *password,
      size_t pass_len);

+void my_make_scrambled_password(char *to, const char *password,
+                                size_t pass_len);
+
+void my_make_scrambled_password(char *to, const char *password,
+                                size_t pass_len)
+{
+        int i = 0;
+        unsigned char temp[SHA_DIGEST_LENGTH];
+        memset(temp, 0x0, SHA_DIGEST_LENGTH);
+        memset(to,   0x0, SHA_DIGEST_LENGTH*2);
+
+        SHA1(password, pass_len, temp);
+        for (i=0; i < SHA_DIGEST_LENGTH; i++) {
+                sprintf((char*)(to+(i*2)), "%02x", temp[i]);
+        }
+}
+
 /* {{{ pam_mysql_check_passwd
  */
 static pam_mysql_err_t pam_mysql_check_passwd(pam_mysql_ctx_t *ctx,

Comment 2 Fedora Update System 2017-12-11 09:06:00 UTC
pam_mysql-0.7-0.25.rc1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-ffca4f8263

Comment 3 Fedora Update System 2017-12-11 19:57:37 UTC
pam_mysql-0.7-0.25.rc1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-ffca4f8263

Comment 4 adam.jimenez 2017-12-27 11:17:09 UTC
I installed the update, restarted vsftpd and mariadb and still get the same error.

Comment 5 adam.jimenez 2017-12-27 11:34:59 UTC
# rpm -qa | grep pam | sort
pam-1.3.0-6.fc27.x86_64
pam_mysql-0.7-0.25.rc1.fc27.x86_64
systemd-pam-234-9.fc27.x86_64

Comment 6 Ben Cotton 2018-11-27 17:40:32 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 adam.jimenez 2018-11-27 21:45:42 UTC
apparently this is still a thing in 28:
https://bugzilla.redhat.com/show_bug.cgi?id=1615900

Comment 8 Ben Cotton 2018-11-30 17:33:35 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 9 Paul P Komkoff Jr 2018-12-01 10:58:40 UTC
Sorry for the massive delay.
I've just pulled the code from here: https://github.com/NigelCunningham/pam-MySQL.
Let's see if it works.

Comment 10 Fedora Update System 2018-12-01 13:18:21 UTC
pam_mysql-0.8.1-0.2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-bb07632c10

Comment 11 Fedora Update System 2018-12-01 13:18:37 UTC
pam_mysql-0.8.1-0.2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e600272170

Comment 12 Fedora Update System 2018-12-02 07:54:26 UTC
pam_mysql-0.8.1-0.2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-bb07632c10

Comment 13 Fedora Update System 2018-12-02 10:10:16 UTC
pam_mysql-0.8.1-0.2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e600272170

Comment 14 adam.jimenez 2018-12-04 15:24:10 UTC
Tested in fc29 and it works!
Thank you very much, this is a big relief!
I've left feedback on the update link also.

Comment 15 Randy Barlow 2018-12-10 23:19:57 UTC
An update associated with this bug has been pushed to stable.

Comment 16 Randy Barlow 2018-12-11 17:04:09 UTC
A Fedora update associated with this bug has been pushed to the stable repository.

Comment 17 Randy Barlow 2018-12-14 20:41:19 UTC
A Fedora update associated with this bug has been pushed to the stable repository.