Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libpam4j authenticates invalid accounts #18

Closed
rtwruck opened this issue Jun 5, 2017 · 3 comments
Closed

libpam4j authenticates invalid accounts #18

rtwruck opened this issue Jun 5, 2017 · 3 comments

Comments

@rtwruck
Copy link

rtwruck commented Jun 5, 2017

Currently, the call to pam_acct_mgmt is commented out in PAM.authenticate. Thus any login restrictions configured via PAM account modules are ignored by PAM.authenticate.
This usually affects, among others, settings in /etc/security/access.conf (pam_access), /etc/nologin (pam_nologin) and host/service name authorization of pam_ldap.
Any return value other than PAM_SUCCESS from pam_acct_mgmt should prevent a successful authentication.

@letonez
Copy link

letonez commented Sep 8, 2017

I have run into this issue as well.
PAM is configured to use SSSD/LDAP authentication. SSSD is configured to use the Simple access provider, which allows LDAP group-based authorization. When I log in through SSH with an LDAP user that is not in one of my sssd authorized groups, the user is denied access.
HOWEVER, when I log in using libpam4j, using the same (system-auth) PAM service as sshd, the user is allowed access.

This is a pretty major bug in libpam4j, is it not? Is anyone maintaining this currently??

letonez added a commit to letonez/libpam4j that referenced this issue Sep 8, 2017
[kohsuke#18]

Change-Id: I5052cd0d9f617239a63fb036daa697cbae5bb9d7
@apoleon
Copy link

apoleon commented Nov 3, 2017

This issue has been assigned CVE-2017-12197. Apparently it was patched by Red Hat but I have no information if they intend to forward the patch.
https://bugzilla.redhat.com/show_bug.cgi?id=1503103

@kohsuke
Copy link
Owner

kohsuke commented May 29, 2018

I feel terrible for not noticing this sooner, but I just committed a fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants