You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Login with user without ~/.pppauth directory
SVN version.
Please provide any additional information below.
When readKeyFile() fails after pppInit() is done there's no call
to pppCleanup() which cause soft to leak 32 bytes at:
==7209== 32 bytes in 1 blocks are definitely lost in loss record 5 of 5
==7209== at 0x4022C3B: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==7209== by 0x804A008: mp_init_size (mpi.c:284)
==7209== by 0x8049F2E: mp_init (mpi.c:238)
==7209== by 0x8049933: readKeyFile (keyfiles.c:352)
==7209== by 0x8048EFF: pam_sm_authenticate (memtest.c:56)
==7209== by 0x8048FED: main (memtest.c:110)
UPDATE: it's also readKeyFile() which calls mp_init, but won't call
mp_clear on error. Also it might sometimes not zero buf, which holds the key.
I did a .c file which simulates logins without help of PAM so I can run it
on valgrind; that's the only case of leak I've found so far. I'm not
entirely sure how PAM works, but I think that this leak wouldn't lead to
some big memory usage on long-running systems (in sshd?) therefore this
leak might not be so important, yet it would be nice to patch it up.
Setting user to NULL at exit of pam_sm_authenticate doesn't do anything
important as I think, so possible fix, using common goto-method is in
attached patch. (Also fixed whitespace 4 spaces vs. tab and removed drop of
const keyword on const char *user; will work fine if setUser prototype is
changed to accept const (as in my previous patch) ).
Original issue reported on code.google.com by TomaszFo...@gmail.com on 7 Nov 2009 at 9:45
Original issue reported on code.google.com by
TomaszFo...@gmail.com
on 7 Nov 2009 at 9:45Attachments:
The text was updated successfully, but these errors were encountered: