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

Successfully authenticating with PAM may lead to a double free() crash #272

Closed
foxcpp opened this issue Sep 19, 2020 · 0 comments
Closed
Labels
auth Related to authentication providers bug Something isn't working. release-blocker Critical problem that should not go as a "known issue" into any release
Milestone

Comments

@foxcpp
Copy link
Owner

foxcpp commented Sep 19, 2020

Note: Technically, auth.pam and auth.shadow are not usable since 0.1 since authentication was changed to be keyed on email addresses. 0.5 will unbreak these modules by adding auth_map directive for imapsql.

Description

When auth.pam module is used without a helper executable (maddy is compiled with "libpam" build tag) - a double free() crash can occur after successful authentication in some scenarios (see below).

Steps to reproduce

I managed to find this issue while testing what is realistically an invalid configuration: Authentication with pam_unix.so with the credentials of user server is running under. Running maddy as root seems to fix that issue (which is also how it is intended to be used in this case).

However, it is unknown whether the same bug can manifest itself in other PAM configurations e.g. pam_ldap or something.

Environment information

maddy commit baccd561aed7e301539cf92099c3c39e761a6219. linux/amd64 go1.15.2

@foxcpp foxcpp added bug Something isn't working. auth Related to authentication providers labels Sep 19, 2020
@foxcpp foxcpp added this to the 0.5 milestone Sep 19, 2020
@foxcpp foxcpp added the release-blocker Critical problem that should not go as a "known issue" into any release label Apr 11, 2021
@foxcpp foxcpp modified the milestones: 0.5, 0.6 Aug 9, 2021
@foxcpp foxcpp closed this as completed in cf94882 Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Related to authentication providers bug Something isn't working. release-blocker Critical problem that should not go as a "known issue" into any release
Projects
None yet
Development

No branches or pull requests

1 participant