i386/112694: segfault in pam_lastlog on sshd exit when no pty
ccowart at rescomp.berkeley.edu
Tue May 15 23:10:07 UTC 2007
>Synopsis: segfault in pam_lastlog on sshd exit when no pty allocated
>Arrival-Date: Tue May 15 23:10:06 GMT 2007
>Originator: Chris Cowart
RSSP-IT, UC Berkeley
FreeBSD mug.rescomp.berkeley.edu 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 21 23:35:28 PDT 2006 root at mug.rescomp.berkeley.edu:/usr/obj/usr/src/sys/NEWMUG0 i386
When I ssh into FreeBSD hosts without allocating a tty, sshd segfaults
after the process terminates. This problem occurs on both 6_1_REL and
6_2_REL installations at all sorts of patch levels.
Client: `ssh -t server ls`
| May 9 15:33:44 server sshd: Accepted publickey for ccowart from
| client port 43604 ssh2
| May 9 15:33:45 server sshd: pam_sm_close_session(): no utmp
| record for ttyp5
Client: `ssh server ls`
| May 9 15:33:50 server sshd: Accepted publickey for ccowart from
| client port 42119 ssh2
| May 9 15:33:51 server pid 1511 (sshd), uid 1225: exited on signal 11
In either example, the client thinks the command has completed
successfully, shows proper output, and propogates the return value from
the remote command. The main problem is I don't like seeing a bunch of
segfaults being logged in the daily run output.
Uncommenting one rule at a time in my pam stack, I discovered the
The session section of my system pam configuration looks like this:
| # session
| session required pam_lastlog.so no_fail
| session optional /usr/local/lib/pam_ldap.so no_warn
When I comment out the pam_lastlog, the segfaults vanish.
When I change the entire pam stack to pam_permit, with the exception of pam_lastlog, the segfaults still occur.
No known solution.
More information about the freebsd-i386