X Tutup
The Wayback Machine - https://web.archive.org/web/20201101164552/https://github.com/foxcpp/maddy/issues/272
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

Open
foxcpp opened this issue Sep 19, 2020 · 0 comments
Open

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

foxcpp opened this issue Sep 19, 2020 · 0 comments
Labels
Milestone

Comments

@foxcpp
Copy link
Owner

@foxcpp 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 auth labels Sep 19, 2020
@foxcpp foxcpp added this to the 0.5 milestone Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.
X Tutup