-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I'm testing pam_gate.so on Ubuntu 14.04.5, and am getting segfaults:
$ sudo ls
[sudo] password for testuser:
Segmentation fault (core dumped)
This shows up in the syslog:
Aug 4 17:53:00 vpn-test2 kernel: [255650.618605] sudo[3775]: segfault at 0 ip 00007fc20776b467 sp 00007ffca3de53b0 error 4 in libc-2.19.so[7fc20772e000+1be000]
and then 2 minutes later this:
Aug 4 17:55:01 vpn-test2 kernel: [255771.640580] cron[3777]: segfault at 0 ip 00007f259d9123e8 sp 00007ffd676137b0 error 4 in pam_gate.so[7f259d911000+3000]
Interestingly, this doesn't segfault when the password is incorrect:
$ sudo ls
[sudo] password for testuser:
Sorry, try again.
[sudo] password for testuser:
Sorry, try again.
[sudo] password for testuser:
Sorry, try again.
sudo: 3 incorrect password attempts
My testing setup process (adapted from the setup.sh script) is:
$ apt-get update >/dev/null
$ apt-get install -y libpam0g-dev libcurl4-gnutls-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libcurl4-gnutls-dev is already the newest version.
libpam0g-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.
$ make
cc -Werror -Wall -o check_gate src/check_gate.c -lpam -lpam_misc
cc -Werror -Wall -fPIC -shared -Xlinker -x -o pam_gate.so src/pam_gate.c -lcurl
$ cp pam_gate.so /lib/*-linux-gnu/security/
$ cp pam_gate.so /lib/*-linux-gnu/
$ echo "auth sufficient pam_gate.so url=http://localhost:3000/profile/authenticate_pam" >> /etc/pam.d/common-auth
$ echo "account sufficient pam_gate.so" >> /etc/pam.d/common-auth
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels