Freeradius possible memory leak

Szymon Roczniak simon at dischaos.com
Tue Sep 8 12:20:28 CEST 2009


On Fri, Sep 04, 2009 at 02:27:13PM +0200, Alan DeKok wrote:
>   Can you re-build the rlm_sql module with debugging symbols? (-g, and
> DELETE any -O2 flags you find).  That way, it will print out line
> numbers like the following:

I can't make valgrind print file lines from modules for some reason. I've
build radius and all modules with -g and can see all debugging information in
gdb but not valgrind (at least not with memcheck, it works fine and prints
line numbers with callgrind...)

>   What are the attributes in the DB for the one that leaks memory?

The one that uses leaking memory returns "Auth-Type : Accept" from
authorize_check_query on realm match. Authorize_reply_query returns
Context-Name and 1-10 groups of Tunnel-Type, Tunnel-Password,
Tunnel-Preference and Tunnel-Server-Endpoint.

the Auth query is:

authorize_check_query = "SELECT 1,'notused','Auth-Type','Accept',':' FROM ${authcheck_table} WHERE Realm = substring_index('%{SQL-User-Name} ','@',-1)"

and sample output from reply_query:

Tunnel-Type:0 += L2TP
Tunnel-Password:0 += "xxx"
Tunnel-Preference:0 += 10
Tunnel-Server-Endpoint:0 += "1.2.3.4"
Context-Name := "local"
Tunnel-Type:1 += L2TP
Tunnel-Password:1 += "xxx"
Tunnel-Preference:1 += 10
Tunnel-Server-Endpoint:1 += "1.2.3.5"
Tunnel-Type:2 += L2TP
Tunnel-Password:2 += "xxx"
Tunnel-Preference:2 += 10
Tunnel-Server-Endpoint:2 += "1.2.3.6"

This works fine, but I guess it's probably not the best way of doing it...


-- 
szymon roczniak
simon at dischaos.com



More information about the Freeradius-Users mailing list