Bug 1396

Summary: When pam-authentication thread ends, it doesn't call the function pam_end
Product: Portable OpenSSH Reporter: eMBecka <opensshbug>
Component: PAM supportAssignee: Assigned to nobody <unassigned-bugs>
Status: NEW ---    
Severity: normal CC: obrhyant
Priority: P2 Keywords: patch
Version: 4.7p1   
Hardware: All   
OS: Windows 7   
Attachments:
Description Flags
missing call of pam_end at the end of the authenticating thread none

Description eMBecka 2007-12-07 01:45:42 AEDT
Created attachment 1386 [details]
missing call of pam_end at the end of the authenticating thread

I tried to use pam_abl module to avoid brute force dictionary attacks. It didn't work as I expected (but only for my ssh server).
After some research I found out that the main thread in openssh creates another thread to authenticate the user. At the beginning of this thread the pam_abl module sets its own pam data with function pam_set_data. This module counts on that at the end of authentication those data are freed with given callback function. If the authentication was not successful, host and user are recorded in the database.
However at the end of the thread which authenticates the user, the pam data are not explicitly freed (by example with function pam_end). I created the patch to fix it.