FreeRADIUS 1.1.1 Segmentation fault on Fedora 4

Stuart Auchterlonie stuart.auchterlonie at homechoice.net
Mon May 8 12:16:49 CEST 2006


On Fri, 2006-05-05 at 14:00 -0400, Alan DeKok wrote:
> Bjarni Hardarson <freeradius at hardarson.se> wrote:
> > Think i have the same problem. I normally use EAP-PEAP but i couldnt get 
> > the server to segfault in valgrind with that. Think it was openssl that 
> > grinded it to a halt. Tried with EAP-MD5 instead and it produced the 
> > "desired" result.
> 
>   I'm running FC4 on one of my machines, and I don't see the same
> problem with the CVS head of 1.1 (i.e. 1.1.1 + a few patches that
> shouldn't affect this).
> 
>   And looking at what valgrind *is* complaining about, I can't see for
> the life of me why the code depends on uninitialized values.  If I
> walk back up the callstack valgrind shows, the code clearly
> initializes the data structures.

In general, a lot of 'unitialized value' errors that valgrind complains
about come from the network libs.

If you ignore the 'unitialized value' errors in the valgrind log then
you come to the real errors, 'Invalid Write', 'Invalid Read' to/from
memory areas that aren't part of the server or were previously freed.

The first real error I can see in the log is

==15822== Thread 24:
==15822== Invalid write of size 4
==15822==    at 0x457D797: eaplist_find (mem.c:332)
==15822==    by 0x457C2F7: eap_handler (eap.c:993)
==15822==    by 0x457BC11: eap_authenticate (rlm_eap.c:230)
==15822==    by 0x8054775: modcall (modcall.c:236)
==15822==    by 0x8054CF8: call_one (modcall.c:269)
==15822==    by 0x80549B9: modcall (modcall.c:324)
==15822==    by 0x8052D6F: indexed_modcall (modules.c:469)
==15822==    by 0x804CC27: rad_check_password (auth.c:367)
==15822==    by 0x804D16B: rad_authenticate (auth.c:662)
==15822==    by 0x8055D05: rad_respond (radiusd.c:1642)
==15822==    by 0x805C5B6: request_handler_thread (threads.c:517)
==15822==    by 0x4053CB6: start_thread (in /lib/tls/libpthread.so.0)
==15822==  Address 0x5A17BEC is 4 bytes inside a block of size 72 free'd
==15822==    at 0x401C178: free (vg_replace_malloc.c:235)
==15822==    by 0x457D564: eap_handler_free (mem.c:142)
==15822==    by 0x457BF3E: eap_authenticate (rlm_eap.c:268)
==15822==    by 0x8054775: modcall (modcall.c:236)
==15822==    by 0x8054CF8: call_one (modcall.c:269)
==15822==    by 0x80549B9: modcall (modcall.c:324)
==15822==    by 0x8052D6F: indexed_modcall (modules.c:469)
==15822==    by 0x804CC27: rad_check_password (auth.c:367)
==15822==    by 0x804D16B: rad_authenticate (auth.c:662)
==15822==    by 0x8055D05: rad_respond (radiusd.c:1642)
==15822==    by 0x805C5B6: request_handler_thread (threads.c:517)
==15822==    by 0x4053CB6: start_thread (in /lib/tls/libpthread.so.0)

which is a write to some memory that we previously held, but have since
free'd.

Regards,
Stuart Auchterlonie



=======================================================================
Homechoice is a trading name of Video Networks Limited of 205 Holland Park Avenue, London W11 4XB and registered in England and Wales (No. 2740910).
This email may contain confidential and privileged information and is intended for the named or authorised recipients only.  If you are not the named or authorised recipient of this email, please note that any copying, distribution, disclosure or use of its contents is strictly prohibited.  If you have received this email in error please notify the sender immediately and then destroy it. The views expressed in this email are not necessarily those held by Video Networks Limited and we do not accept any liability for any action taken in reliance on the contents of this message.  We do not guarantee that the integrity of this email has been maintained, nor that it is free of viruses, interceptions or interference.

_______________________________________________________________________
This email has been scanned for all known viruses by the MessageLabs Email Security System.
_______________________________________________________________________



More information about the Freeradius-Users mailing list