Skip to content

pppd: Free PAM responses when conversation fails - #668

Open
grey3228 wants to merge 1 commit into
ppp-project:masterfrom
grey3228:fix/pam-conversation-leak
Open

grey3228 wants to merge 1 commit into
ppp-project:masterfrom
grey3228:fix/pam-conversation-leak

Conversation

@grey3228

Copy link
Copy Markdown
Contributor

conversation() allocates response strings for login name and password prompts. If a later message uses an unsupported msg_style, only the response array is freed. Earlier response strings leak, including the password copy.

Release the response strings allocated before the failure, then free the response array. Successful conversation and normal PAM message handling are unchanged.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

conversation() allocates response strings for login name and password
prompts. If a later message uses an unsupported msg_style, only the
response array is freed. Earlier response strings leak, including the
password copy.

Release the response strings allocated before the failure, then free the
response array. Successful conversation and normal PAM message handling
are unchanged.

Found by Linux Verification Center (linuxtesting.org) with SVACE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant