Bug#645998: freeradius crashes due to segmentation fault

2012-06-21 Thread Rik Theys

Hi,

I've created a new 2.1.12 package based on the Debian 2.1.10 package so 
you can check if the new upstream release fixes this bug.


The packaging simply keeps the default 2.1.10 config files, so if it 
works the packaging will need additional cleanup!


You can find the packages for x86_64 here:

http://homes.esat.kuleuven.be/~rtheys/freeradius/2.1.12-squeeze

They were built on a squeeze box.

If you need it for i386, you can download the following files to a 
directory:



freeradius_2.1.12+dfsg.orig.tar.gz
freeradius_2.1.12+dfsg-1.dsc
freeradius_2.1.12+dfsg-1.diff.gz

and run the following commands:

apt-get install build-essential
apt-get build-dep freeradius
dpkg-source -x freeradius_2.1.12+dfsg-1.dsc
cd freeradius-2.1.12+dfsg
dpkg-buildpackage

Even if it fixes the bug, I doubt it will end up in the next stable 
release as it's almost frozen. But it would be nice to document if it 
fixes your bug.


Regards,

Rik


On 15/06/2012 10:04, José Antonio Antelo wrote:

We followed your instructions to build the package for i386 platform and it 
worked well. After that, it was installed on a production enviroment to
test it. The conclusion was that after few hours working it crashed again (*). If you 
need more information reply to atic.sistemas.r...@usc.es.

Regards,

(*)
Jun 14 11:03:55 vm075144 kernel: [2557096.780937] freeradius[26639]: segfault 
at c ip b73a0328 sp bffe3820 error 4 in rlm_eap-2.1.10.so[b739c000+6000]
Jun 14 15:12:24 vm075144 kernel: [2572005.811051] freeradius[31179]: segfault 
at c ip b735e328 sp bfdf4d10 error 4 in rlm_eap-2.1.10.so[b735a000+6000]
Jun 14 15:21:49 vm075144 kernel: [2572570.522135] freeradius[8368]: segfault at 
c ip b7311328 sp bfe97bd0 error 4 in rlm_eap-2.1.10.so[b730d000+6000]


El 05/06/12 10:20, Rik Theys escribió:

Hi,

I manually created a patch for this commit (see attach). I also applied
the patch to the latest Debian package. You can find a build for amd64
at http://homes.esat.kuleuven.be/~rtheys/freeradius.

I have not tested the resulting package, but the patch applied cleanly
and there were no build errors.

To reproduce the packaging:

apt-get install build-essential
apt-get build-dep freeradius
apt-get source freeradius
cd freeradius-2.1.10+dfsg
copy the attached patch to the debian/patches directory
echo fix-freeing-eap_handler.diff  debian/patches/series
add an entry to debian/changelog
dpkg-buildpackage

I believe the same instructions should work for the squeeze version of
freeradius.

If you have time, please test the updated package/patch to see if it
resolves the issue you are seeing, and update the bug report with your
info.

Regards,

Rik








--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#645998: freeradius crashes due to segmentation fault

2012-06-15 Thread José Antonio Antelo
I forgotten the Debian and kernel version:

root@vm075144:/home/hostmaster# cat /etc/debian_version
6.0.5
root@vm075144:/home/hostmaster# uname -a
Linux vm075144 2.6.32-5-686-bigmem #1 SMP Sun May 6 04:39:05 UTC 2012 i686 
GNU/Linux


El 15/06/12 10:04, José Antonio Antelo escribió:
 We followed your instructions to build the package for i386 platform and it 
 worked well. After that, it was installed on a production enviroment to
 test it. The conclusion was that after few hours working it crashed again 
 (*). If you need more information reply to atic.sistemas.r...@usc.es.
 
 Regards,
 
 (*)
 Jun 14 11:03:55 vm075144 kernel: [2557096.780937] freeradius[26639]: segfault 
 at c ip b73a0328 sp bffe3820 error 4 in rlm_eap-2.1.10.so[b739c000+6000]
 Jun 14 15:12:24 vm075144 kernel: [2572005.811051] freeradius[31179]: segfault 
 at c ip b735e328 sp bfdf4d10 error 4 in rlm_eap-2.1.10.so[b735a000+6000]
 Jun 14 15:21:49 vm075144 kernel: [2572570.522135] freeradius[8368]: segfault 
 at c ip b7311328 sp bfe97bd0 error 4 in rlm_eap-2.1.10.so[b730d000+6000]
 
 
 El 05/06/12 10:20, Rik Theys escribió:
 Hi,

 I manually created a patch for this commit (see attach). I also applied
 the patch to the latest Debian package. You can find a build for amd64
 at http://homes.esat.kuleuven.be/~rtheys/freeradius.

 I have not tested the resulting package, but the patch applied cleanly
 and there were no build errors.

 To reproduce the packaging:

 apt-get install build-essential
 apt-get build-dep freeradius
 apt-get source freeradius
 cd freeradius-2.1.10+dfsg
 copy the attached patch to the debian/patches directory
 echo fix-freeing-eap_handler.diff  debian/patches/series
 add an entry to debian/changelog
 dpkg-buildpackage

 I believe the same instructions should work for the squeeze version of
 freeradius.

 If you have time, please test the updated package/patch to see if it
 resolves the issue you are seeing, and update the bug report with your
 info.

 Regards,

 Rik
 

-- 
_
José Antonio Antelo Castelo
Área TIC - USC
15782 Santiago de Compostela http://www.usc.es/atic



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#645998: freeradius crashes due to segmentation fault

2012-06-15 Thread José Antonio Antelo
We followed your instructions to build the package for i386 platform and it 
worked well. After that, it was installed on a production enviroment to
test it. The conclusion was that after few hours working it crashed again (*). 
If you need more information reply to atic.sistemas.r...@usc.es.

Regards,

(*)
Jun 14 11:03:55 vm075144 kernel: [2557096.780937] freeradius[26639]: segfault 
at c ip b73a0328 sp bffe3820 error 4 in rlm_eap-2.1.10.so[b739c000+6000]
Jun 14 15:12:24 vm075144 kernel: [2572005.811051] freeradius[31179]: segfault 
at c ip b735e328 sp bfdf4d10 error 4 in rlm_eap-2.1.10.so[b735a000+6000]
Jun 14 15:21:49 vm075144 kernel: [2572570.522135] freeradius[8368]: segfault at 
c ip b7311328 sp bfe97bd0 error 4 in rlm_eap-2.1.10.so[b730d000+6000]


El 05/06/12 10:20, Rik Theys escribió:
 Hi,
 
 I manually created a patch for this commit (see attach). I also applied
 the patch to the latest Debian package. You can find a build for amd64
 at http://homes.esat.kuleuven.be/~rtheys/freeradius.
 
 I have not tested the resulting package, but the patch applied cleanly
 and there were no build errors.
 
 To reproduce the packaging:
 
 apt-get install build-essential
 apt-get build-dep freeradius
 apt-get source freeradius
 cd freeradius-2.1.10+dfsg
 copy the attached patch to the debian/patches directory
 echo fix-freeing-eap_handler.diff  debian/patches/series
 add an entry to debian/changelog
 dpkg-buildpackage
 
 I believe the same instructions should work for the squeeze version of
 freeradius.
 
 If you have time, please test the updated package/patch to see if it
 resolves the issue you are seeing, and update the bug report with your
 info.
 
 Regards,
 
 Rik

-- 
_
José Antonio Antelo Castelo
Área TIC - USC
15782 Santiago de Compostela http://www.usc.es/atic



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#645998: freeradius crashes due to segmentation fault

2012-06-05 Thread Rik Theys

Hi,

I manually created a patch for this commit (see attach). I also applied 
the patch to the latest Debian package. You can find a build for amd64 
at http://homes.esat.kuleuven.be/~rtheys/freeradius.


I have not tested the resulting package, but the patch applied cleanly 
and there were no build errors.


To reproduce the packaging:

apt-get install build-essential
apt-get build-dep freeradius
apt-get source freeradius
cd freeradius-2.1.10+dfsg
copy the attached patch to the debian/patches directory
echo fix-freeing-eap_handler.diff  debian/patches/series
add an entry to debian/changelog
dpkg-buildpackage

I believe the same instructions should work for the squeeze version of 
freeradius.


If you have time, please test the updated package/patch to see if it 
resolves the issue you are seeing, and update the bug report with your info.


Regards,

Rik
diff -ur freeradius-2.1.10+dfsg.orig/src/modules/rlm_eap/eap.h freeradius-2.1.10+dfsg/src/modules/rlm_eap/eap.h
--- freeradius-2.1.10+dfsg.orig/src/modules/rlm_eap/eap.h	2010-09-28 13:03:56.0 +0200
+++ freeradius-2.1.10+dfsg/src/modules/rlm_eap/eap.h	2012-06-05 09:39:58.978878670 +0200
@@ -107,6 +107,7 @@
 
 	void 		*opaque;
 	void 		(*free_opaque)(void *opaque);
+	void		*inst_holder;
 
 	int		status;
 
diff -ur freeradius-2.1.10+dfsg.orig/src/modules/rlm_eap/mem.c freeradius-2.1.10+dfsg/src/modules/rlm_eap/mem.c
--- freeradius-2.1.10+dfsg.orig/src/modules/rlm_eap/mem.c	2010-09-28 13:03:56.0 +0200
+++ freeradius-2.1.10+dfsg/src/modules/rlm_eap/mem.c	2012-06-05 09:41:28.288350283 +0200
@@ -128,6 +128,14 @@
 	return handler;
 }
 
+void eap_opaque_free(EAP_HANDLER *handler)
+{
+	if (!handler)
+	return;
+
+	eap_handler_free(handler-inst_holder, handler);
+}
+
 void eap_handler_free(rlm_eap_t *inst, EAP_HANDLER *handler)
 {
 	if (!handler)
diff -ur freeradius-2.1.10+dfsg.orig/src/modules/rlm_eap/rlm_eap.c freeradius-2.1.10+dfsg/src/modules/rlm_eap/rlm_eap.c
--- freeradius-2.1.10+dfsg.orig/src/modules/rlm_eap/rlm_eap.c	2010-09-28 13:03:56.0 +0200
+++ freeradius-2.1.10+dfsg/src/modules/rlm_eap/rlm_eap.c	2012-06-05 09:42:21.056350259 +0200
@@ -342,7 +342,7 @@
 		rcode = request_data_add(request,
 	 inst, REQUEST_DATA_EAP_HANDLER,
 	 handler,
-	 (void *) eap_handler_free);
+	 (void *) eap_opaque_free);
 		rad_assert(rcode == 0);
 
 		return RLM_MODULE_HANDLED;
@@ -367,7 +367,7 @@
 		rcode = request_data_add(request,
 	 inst, REQUEST_DATA_EAP_HANDLER,
 	 handler,
-	 (void *) eap_handler_free);
+	 (void *) eap_opaque_free);
 		rad_assert(rcode == 0);
 
 		/*
diff -ur freeradius-2.1.10+dfsg.orig/src/modules/rlm_eap/rlm_eap.h freeradius-2.1.10+dfsg/src/modules/rlm_eap/rlm_eap.h
--- freeradius-2.1.10+dfsg.orig/src/modules/rlm_eap/rlm_eap.h	2010-09-28 13:03:56.0 +0200
+++ freeradius-2.1.10+dfsg/src/modules/rlm_eap/rlm_eap.h	2012-06-05 09:43:14.768350275 +0200
@@ -105,6 +105,7 @@
 EAP_HANDLER 	*eap_handler_alloc(rlm_eap_t *inst);
 void		eap_packet_free(EAP_PACKET **eap_packet);
 void		eap_ds_free(EAP_DS **eap_ds);
+void		eap_opaque_free(EAP_HANDLER *handler);
 void		eap_handler_free(rlm_eap_t *inst, EAP_HANDLER *handler);
 
 int 		eaplist_add(rlm_eap_t *inst, EAP_HANDLER *handler);
diff -ur freeradius-2.1.10+dfsg.orig/src/modules/rlm_eap/types/rlm_eap_peap/peap.c freeradius-2.1.10+dfsg/src/modules/rlm_eap/types/rlm_eap_peap/peap.c
--- freeradius-2.1.10+dfsg.orig/src/modules/rlm_eap/types/rlm_eap_peap/peap.c	2010-09-28 13:03:56.0 +0200
+++ freeradius-2.1.10+dfsg/src/modules/rlm_eap/types/rlm_eap_peap/peap.c	2012-06-05 09:45:32.340350411 +0200
@@ -1075,8 +1075,8 @@
 			request-proxy = fake-packet;
 			memset(request-proxy-src_ipaddr, 0,
 			   sizeof(request-proxy-src_ipaddr));
-			memset(request-proxy-src_ipaddr, 0,
-			   sizeof(request-proxy-src_ipaddr));
+			memset(request-proxy-dst_ipaddr, 0,
+			   sizeof(request-proxy-dst_ipaddr));
 			request-proxy-src_port = 0;
 			request-proxy-dst_port = 0;
 			fake-packet = NULL;


Bug#645998: freeradius crashes due to segmentation fault

2012-05-17 Thread Josip Rodin
On Tue, May 15, 2012 at 10:09:02PM +0200, Rafael Varela Pet wrote:
 Are there any plans to fix this in a near future? Even though we have a
 fail over system with three servers, this bug is becoming very annoying...

I'm just being tardy with uploading the new version, sorry.
Hope to get to it soon (and if anyone wishes to help, be my guest).

-- 
 2. That which causes joy or happiness.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#645998: freeradius crashes due to segmentation fault

2012-05-15 Thread Rafael Varela Pet
Hi,

Are there any plans to fix this in a near future? Even though we have a
fail over system with three servers, this bug is becoming very annoying...

Best regards,
-- 
Rafael Varela Pet
Area de Tecnoloxías da Información e Comunicacións

Universidade de Santiago de Compostela
15782 Santiago de Compostela
http://www.usc.es/atic/sistemas



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#645998: freeradius crashes due to segmentation fault

2011-10-21 Thread Rafael Varela Pet
Hi,

I'm changing the severity of this bug to grave because the daemon is
crashing too frequently and this has a serious impact in our operations.

Regards,
-- 
Rafael Varela Pet
Area de Tecnoloxías da Información e Comunicacións

Universidade de Santiago de Compostela
15782 Santiago de Compostela
http://www.usc.es/atic/sistemas




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#645998: freeradius crashes due to segmentation fault

2011-10-20 Thread ATIC Sistemas Rede USC
Package: freeradius
Version: 2.1.10+dfsg-2
Severity: normal

Some times server crashes due to segfault problem. When occurs we can see a 
message
like this(*) in system log (/var/log/syslog).

We follow the instructions at /usr/share/doc/freeradius/bugs.gz and
try to 'hunt' the segfault, because it occurs occassionally. The result
was this (**).

We will provide more information about the configuration and architecture.

Thanks.

(*)
kernel: [622103.849166] freeradius[21529]: segfault at 18752346 ip b7866497
sp bfd16630 error 4 in libfreeradius-radius-2.1.10.so[b7855000+1e000]

(**)
Program received signal SIGSEGV, Segmentation fault.
rbtree_find (tree=0xabb0380e, Data=0x823af84) at rbtree.c:476
476 rbtree.c: No existe el fichero o el directorio.
 in rbtree.c
(gdb) where
#0  rbtree_find (tree=0xabb0380e, Data=0x823af84) at rbtree.c:476
#1  0xb7fcf979 in rbtree_deletebydata (tree=0xabb0380e, 
data=0x823af84) at rbtree.c:457
#2  0xb7bff31f in eap_handler_free (inst=0x82098f0, handler=0x823af84) 
at mem.c:138
#3  0x08067f7d in request_free (request_ptr=0xbfffef7c) at util.c:235
#4  0x0806c29f in ev_request_free (prequest=0xbfffef7c) at event.c:184
#5  0x0806f23c in cleanup_delay (ctx=0x823af80) at event.c:551
#6  0xb7fd6284 in fr_event_run (el=0x81b8838, when=0xb138) at
#event.c:220
#7  0xb7fd64fe in fr_event_loop (el=0x81b8838) at event.c:399
#8  0x0806c3f6 in radius_event_process () at event.c:3760
#9  0x0806496a in main (argc=2, argv=0xb304) at radiusd.c:406

-- System Information:
Debian Release: 6.0.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686-bigmem (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages freeradius depends on:
ii  adduser3.112+nmu2add and remove users and groups
ii  ca-certificates20090814+nmu3squeeze1 Common CA certificates
ii  freeradius-common  2.1.10+dfsg-2 FreeRADIUS common files
ii  libc6  2.11.2-10 Embedded GNU C Library: Shared lib
ii  libfreeradius2 2.1.10+dfsg-2 FreeRADIUS shared library
ii  libgdbm3   1.8.3-9   GNU dbm database routines (runtime
ii  libltdl7   2.2.6b-2  A system independent dlopen wrappe
ii  libpam0g   1.1.1-6.1 Pluggable Authentication Modules l
ii  libperl5.105.10.1-17squeeze2 shared Perl library
ii  libpython2.6   2.6.6-8+b1Shared Python runtime library (ver
ii  libssl0.9.80.9.8o-4squeeze3  SSL shared libraries
ii  lsb-base   3.2-23.2squeeze1  Linux Standard Base 3.2 init scrip
ii  ssl-cert   1.0.28simple debconf wrapper for OpenSSL
ii  zlib1g 1:1.2.3.4.dfsg-3  compression library - runtime

Versions of packages freeradius recommends:
ii  freeradius-utils   2.1.10+dfsg-2 FreeRADIUS client utilities

Versions of packages freeradius suggests:
pn  freeradius-krb5none(no description available)
ii  freeradius-ldap2.1.10+dfsg-2 LDAP module for FreeRADIUS server
ii  freeradius-mysql   2.1.10+dfsg-2 MySQL module for FreeRADIUS server
pn  freeradius-postgresql  none(no description available)

-- Configuration Files:
/etc/freeradius/acct_users [Errno 13] Permission denied: 
u'/etc/freeradius/acct_users'
/etc/freeradius/attrs [Errno 13] Permission denied: u'/etc/freeradius/attrs'
/etc/freeradius/attrs.access_challenge [Errno 13] Permission denied: 
u'/etc/freeradius/attrs.access_challenge'
/etc/freeradius/attrs.access_reject [Errno 13] Permission denied: 
u'/etc/freeradius/attrs.access_reject'
/etc/freeradius/attrs.accounting_response [Errno 13] Permission denied: 
u'/etc/freeradius/attrs.accounting_response'
/etc/freeradius/attrs.pre-proxy [Errno 13] Permission denied: 
u'/etc/freeradius/attrs.pre-proxy'
/etc/freeradius/clients.conf [Errno 13] Permission denied: 
u'/etc/freeradius/clients.conf'
/etc/freeradius/eap.conf [Errno 13] Permission denied: 
u'/etc/freeradius/eap.conf'
/etc/freeradius/experimental.conf [Errno 13] Permission denied: 
u'/etc/freeradius/experimental.conf'
/etc/freeradius/hints [Errno 13] Permission denied: u'/etc/freeradius/hints'
/etc/freeradius/huntgroups [Errno 13] Permission denied: 
u'/etc/freeradius/huntgroups'
/etc/freeradius/ldap.attrmap [Errno 13] Permission denied: 
u'/etc/freeradius/ldap.attrmap'
/etc/freeradius/modules/sql_log changed [not included]
/etc/freeradius/policy.conf [Errno 13] Permission denied: 
u'/etc/freeradius/policy.conf'
/etc/freeradius/policy.txt [Errno 13] Permission denied: 
u'/etc/freeradius/policy.txt'
/etc/freeradius/preproxy_users [Errno 13] Permission denied: 
u'/etc/freeradius/preproxy_users'
/etc/freeradius/proxy.conf [Errno 13] Permission denied: 
u'/etc/freeradius/proxy.conf'
/etc/freeradius/sql.conf changed [not included]