evgeny-gridasov / openvpn-otp

OpenVPN OTP token support plugin
GNU General Public License v3.0
279 stars 74 forks source link

Segmentation fault #10

Closed gwstj closed 8 years ago

gwstj commented 8 years ago

Hi,

I tried your code on Debian 8.3 and compiled 1864afd as follows: ./autogen.sh ./configure --prefix=/usr make sudo make install

I have used the following libraries:

When starting openvpn it terminates with a segmentation fault:

# openvpn /etc/openvpn/default/local.conf
...
Fri Feb  5 20:16:12 2016 us=916315 OpenVPN 2.3.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Dec  1 2014
Fri Feb  5 20:16:12 2016 us=916357 library versions: OpenSSL 1.0.1k 8 Jan 2015, LZO 2.08 OTP-AUTH: otp_secrets=/etc/openvpn/default/otp-secrets
Segmentation fault

Openvpn has the following configuration:

plugin /usr/lib/openvpn/openvpn-otp.so otp_secrets=/etc/openvpn/otp-secrets

The otp-secrets file has:

ls -l /etc/openvpn/otp-secrets
-rwxrwxrwx 1 root root 54 Feb  5 20:29 /etc/openvpn/otp-secrets
cat /etc/openvpn/otp-secrets 
bob otp totp:sha1:base32:K7BYLIU5D2V33X6S:1234:xxx *

Any idea what's wrong here?

Thanks Stefan

evgeny-gridasov commented 8 years ago

Thanks for reporting. I'll have a look. from the logs: OTP-AUTH: otp_secrets=/etc/openvpn/default/otp-secrets Segmentation fault Does /etc/openvpn/default/otp-secrets file exist? Or is it a symlink to /etc/openvpn/otp-secrets ?

fabn commented 8 years ago

I wanted to try this library and I got the same identical issue.

$ openvpn local.conf
Sat Feb  6 14:22:15 2016 OpenVPN 2.3.2 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [eurephia] [MH] [IPv6] built on Dec  1 2014
OTP-AUTH: otp_secrets=/etc/openvpn/otp-secrets
Segmentation fault

File /etc/openvpn/otp-secrets exists, it's a regular file with this content

# use sha1/base32 for Google Authenticator without a pin
john otp totp:sha1:base32:LJYHR64TUI7IL3RD::xxx *

Running on ubuntu 14.04 (in docker) plugin compiled from master branch right now.

evgeny-gridasov commented 8 years ago

Thanks for reporting it, I will fix it asap. Meanwhile you may rollback to 0567fdda9af5e0ea30ea56b91ba735ba86d2aa2d until I fix it.

On Sun, Feb 7, 2016 at 1:28 AM, Fabio Napoleoni notifications@github.com wrote:

I wanted to try this library and I got the same identical issue.

$ openvpn local.conf Sat Feb 6 14:22:15 2016 OpenVPN 2.3.2 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [eurephia] [MH] [IPv6] built on Dec 1 2014 OTP-AUTH: otp_secrets=/etc/openvpn/otp-secrets Segmentation fault

File /etc/openvpn/otp-secrets exists, it's a regular file with this content

use sha1/base32 for Google Authenticator without a pin

john otp totp:sha1:base32:LJYHR64TUI7IL3RD::xxx *

Running on ubuntu 14.04 (in docker) plugin compiled from master branch right now.

— Reply to this email directly or view it on GitHub https://github.com/evgeny-gridasov/openvpn-otp/issues/10#issuecomment-180774534 .

evgeny-gridasov commented 8 years ago

Looks like it's been fixed in 1781f7acc1ff9d6dcba2284e90992f4e303e5f80 Could please everyone confirm? I will test the fix tonight.

gwstj commented 8 years ago

I can confirm that it is fixed. Thanks you very much.