Login Main site Create account

12.05.2009 19:03

AMD 64bit SEGFAULT Fix for Cisco VPN Clients on Linux systems


Today someone contacted me about this issue some of you might well be aware of. Even the latest Cisco VPNClient (4.8.02 as to my knowledge) doesn't work on AMD Phenom (64bit) processors, it always segfaults when you start the service or attempt to connect to your VPN gateway.

This guy has really done some great work and has modified the binaries to work on AMD 64bit systems again. Right now, we don't have much feedback of affected people, so if you are affected, go ahead and try the patched versions (links in the download section below) and please give us feedback either in the forums or via the comments system here.

Downloads

Links
Comments added earlier to http://tuxx-home.at/archives/2009/05/12/T19_03_01/index.html:
Guest on 2009-05-25 16:41:00 wrote:
Hi,

I tried using vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz on Kubuntu with below mentioned spec's:

Linux whoami 2.6.30-5-generic #6-Ubuntu SMP Mon May 11 19:56:30 UTC 2009 i686 GNU/Linux

Distributor ID: Ubuntu
Description: Ubuntu karmic (development branch)
Release: 9.10
Codename: karmic

Hardware:
IBM T61
Centrino Duo Core

Installation went fine and i was able to connect using vpnclient, but the problem begins after the connection is established. For some reason system freezes the moment i try to pass any traffic. Secondly i've installed Cisco VPN Client version 4.8.02 and it shows version 4.8.01 as installed. i've tried uninstalling & installing but issue remains. I've used the patched images from your site. would really appreciate any help on this.

Cheers...!!!
Guest on 2009-05-26 23:20:11 wrote:
Hi,

Both the files seem to patched for AMD, just wanted to check if we have something for Intel:

vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz (all CPUs 32bit/Intel 64bit)
vpnclient-linux-x86_64-4.8.02.0030-k9-AMD64_ONLY_by_t3x.tar.gz (ONLY 64bit AMD)
Alexander Griesser on 2009-05-27 10:17:34 wrote:
Yah, freezes on my system too using 2.6.29+, must be an issue with newer kernels and yes, both files have been patched and as stated in the link, the above file is for intel and the below one is for AMD64 only.
Guest on 2009-07-08 19:29:57 wrote:
vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz (all CPUs 32bit/Intel 64bit)

NOT COMPILING ON Ubuntu 8.10 - Linux ubuntu 2.6.27-11-generic x86_64 GNU/Linux !!!

I've fixed this by changing:

./vpnclient/interceptor.c:785
- hard_header_len = skb->network_header - skb->data;
+ hard_header_len = skb->network_header - (int)skb->data;

./vpnclient/Makefile:15
-CFLAGS += -mcmodel=kernel -mno-red-zone
+EXTRA_CFLAGS += -mcmodel=kernel -mno-red-zone
Guest on 2010-05-27 12:47:46 wrote:
Freezes on Lucid (Ubuntu 10.04). I tried the extra_flags fix and got past that error but now the error is in interceptor.c:

/home/amitf/vpnclient/interceptor.c: In function ‘interceptor_init’:
/home/amitf/vpnclient/interceptor.c:132: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
/home/amitf/vpnclient/interceptor.c:133: error: ‘struct net_device’ has no member named ‘get_stats’
/home/amitf/vpnclient/interceptor.c:134: error: ‘struct net_device’ has no member named ‘do_ioctl’
/home/amitf/vpnclient/interceptor.c: In function ‘add_netdev’:
/home/amitf/vpnclient/interceptor.c:271: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
/home/amitf/vpnclient/interceptor.c:272: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
/home/amitf/vpnclient/interceptor.c: In function ‘remove_netdev’:
/home/amitf/vpnclient/interceptor.c:294: error: ‘struct net_device’ has no member named ‘hard_start_xmit’

Any ideas?
Guest on 2010-07-28 08:36:05 wrote:
same here with 2.6.32-24 (ubuntu lucid)
Won't compile, even with the patches "Guest on 2009-07-08 19:29:57" wrote.
Guest on 2010-10-14 16:09:48 wrote:
Hi,
i get this on my gentoo box

Making module
make -C /lib/modules/2.6.35.7_weber2.7/build SUBDIRS=/home/weber/DOWNLOAD/vpnclient modules
make[1]: Entering directory `/usr/src/linux-2.6.35.7'
CC [M] /home/weber/DOWNLOAD/vpnclient/linuxcniapi.o
/home/weber/DOWNLOAD/vpnclient/linuxcniapi.c:14:28: Fehler: linux/autoconf.h: Datei oder Verzeichnis nicht gefunden
/home/weber/DOWNLOAD/vpnclient/linuxcniapi.c: In Funktion »CniInjectReceive«:
/home/weber/DOWNLOAD/vpnclient/linuxcniapi.c:341: Warnung: Typkonvertierung von Zeiger auf Ganzzahl anderer Breite
/home/weber/DOWNLOAD/vpnclient/linuxcniapi.c:342: Warnung: Typkonvertierung von Zeiger auf Ganzzahl anderer Breite
/home/weber/DOWNLOAD/vpnclient/linuxcniapi.c: In Funktion »CniInjectSend«:
/home/weber/DOWNLOAD/vpnclient/linuxcniapi.c:481: Warnung: Typkonvertierung von Zeiger auf Ganzzahl anderer Breite
/home/weber/DOWNLOAD/vpnclient/linuxcniapi.c:482: Warnung: Typkonvertierung von Zeiger auf Ganzzahl anderer Breite
/home/weber/DOWNLOAD/vpnclient/linuxcniapi.c:491: Warnung: Typkonvertierung in Zeiger von Ganzzahl anderer Breite
/home/weber/DOWNLOAD/vpnclient/linuxcniapi.c:491: Warnung: Typkonvertierung von Zeiger auf Ganzzahl anderer Breite
make[2]: *** [/home/weber/DOWNLOAD/vpnclient/linuxcniapi.o] Fehler 1
make[1]: *** [_module_/home/weber/DOWNLOAD/vpnclient] Fehler 2
make[1]: Leaving directory `/usr/src/linux-2.6.35.7'
make: *** [default] Fehler 2
Failed to make module "cisco_ipsec.ko".
Guest on 2010-11-21 02:05:30 wrote:
same problem as above (cannot located installed kernel headers) with kernel 2.6.36:

make[1]: Entering directory `/usr/src/linux-headers-2.6.36-amd64'
CC [M] /home/trm/vpn/vpnclient/linuxcniapi.o
/home/trm/vpn/vpnclient/linuxcniapi.c:14:28: error: linux/autoconf.h: No such file or directory
Guest on 2010-11-22 21:42:48 wrote:
I see the same issue - no such file or directory for linux/autoconf.h
Guest on 2011-03-22 23:03:47 wrote:
I am running debian 2.6.38-1-amd64 and was able to fix the missing autoconf.h by creating symlinks

cd /lib/modules/2.6.38-1-amd64/build/include/linux/
ln -s ../generated/autoconf.h
ln -s ../generated/utsrelease.h (not sure if needed)

However, I am still having trouble with interceptor.c
What patch should I use (there is too many to keep track of). Error I get is:


CC [M] /home/tmp/vpnclient/interceptor.o
/home/tmp/vpnclient/interceptor.c: In function ‘interceptor_init’:
/home/tmp/vpnclient/interceptor.c:132: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
/home/tmp/vpnclient/interceptor.c:133: error: ‘struct net_device’ has no member named ‘get_stats’
/home/tmp/vpnclient/interceptor.c:134: error: ‘struct net_device’ has no member named ‘do_ioctl’
/home/tmp/vpnclient/interceptor.c: In function ‘add_netdev’:
/home/tmp/vpnclient/interceptor.c:271: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
/home/tmp/vpnclient/interceptor.c:272: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
/home/tmp/vpnclient/interceptor.c: In function ‘remove_netdev’:
/home/tmp/vpnclient/interceptor.c:294: error: ‘struct net_device’ has no member named ‘hard_start_xmit’

Your comment (HTML tags will be stripped !!):

To verify You are not a bot, type down text from this image.

Your try: