rlm_sql: readclients segmentation fault

Milan Holub holub at thenet.ch
Mon Apr 16 15:27:22 CEST 2007


Hi Alan,

with the latest cvs head I've experienced following serious bug:

radiusd.conf:
...
listen {
        ipaddr = *
        port = 0
        type = auth
}
listen {
        ipaddr = *
        port = 0
        type = acct
}
...


clients.conf:
client 127.0.0.1 {
    secret          = testing123
    shortname       = localhost
}

sql.conf:
...
readclients = yes
...

When starting rlm_sql says it's adding nases from DB:
freeradius -X:
>>>BEGIN DEBUG
...
rlm_sql (sql): Read entry nasname=a.b.c.d,shortname=wlan-gw33,secret=secret
rlm_sql (sql): Adding client a.b.c.d (wlan-gw33) to clients list
rlm_sql (sql): Released sql socket id: 4
...
>>>END DEBUG

When testing freeradius with radclient from localhost it works OK.
However when sending some request from eg. nas a.b.c.d(wlan-gw33) 
we ends up with segmentation fault:
>>>BEGIN DEBUG
Nothing to do.  Sleeping until we see a request.

rad_recv: Access-Request packet from host a.b.c.d port 42926,
id=82, length=46
(no debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 16225)]
0x08052987 in client_listener_find ()
(gdb)
(gdb)
(gdb) bt
#0  0x08052987 in client_listener_find ()
#1  0x080590df in main ()
#2  0x4024714f in __libc_start_main () from /lib/libc.so.6
>>>END DEBUG

I can confirm that at least cvs build from 6.4. 2007 did not have such a
bug. Thus obviously there must be something rotten in latest cvs
commits...

Please advise.


Milan Holub
holub (at) thenet (dot) ch

--------------------------------------
 TheNet-Internet Services AG,
 im Bernertechnopark, Morgenstr. 129
 CH-3018, Bern, Switzerland
 031 998 4333, Fax 031 998 4330
 http://www.thenet.ch
 http://wlan.thenet.ch
--------------------------------------



More information about the Freeradius-Users mailing list