segfault in 2.2.5 comparing Client-IP-Address

Harald Terkelsen Harald.Terkelsen at hioa.no
Fri Jun 27 10:04:50 CEST 2014


Hi,

When we changed a check from "if (<some other checks> || NAS-IP-Address 
== xxx.xxx.xxx.xxx)" to "if (<some other checks> || Client-IP-Address == 
xxx.xxx.xxx.xxx)", Freeradius 2.2.5 segfaults.

gdb:

? Evaluating (NAS-IP-Address == xxx.xxx.xxx.xxx ) -> FALSE
     expand: %{Client-IP-Address} ->

Program received signal SIGSEGV, Segmentation fault.
paircmp (one=0x7ffff8454760, two=0x0) at valuepair.c:2036
2036            compare = ntohl(two->vp_ipaddr) - ntohl(one->vp_ipaddr);

It looks like the segfault happens when Freeradius receives a request 
from a NAS using IPv6. We did not see the segfault when the 
Client-IP-Address was an IPv4 address in the tests we did.

Same problem with Packet-Src-IP-Address.

Regards,

Harald Terkelsen
Oslo and Akershus University College of Applied Sciences


More information about the Freeradius-Users mailing list