MySQL Segmentation Fault

Bryan Dobson bdobson at gmail.com
Thu Sep 27 19:06:06 CEST 2012


I have a new installation and configuration that I am working on for
FreeRadius on CentOS 6.3 the versions are:

freeradius-2.1.12-3.el6.x86_64

Testing authentication, which goes to a remote MySQL database which
was pre-existing with all user data. It executes the query and then
immediately gives me a segmentation fault. Of note I have also
compiled version 2.2 from source and receive the exact same error. I
would prefer, if a tall possible to stick to using the RPM's from the
distribution.

Including relevant output from "radiusd -X" below:

rlm_sql Creating new attribute sql_acctlocal-SQL-Group
rlm_sql (sql_acctlocal): Driver rlm_sql_mysql (module rlm_sql_mysql)
loaded and linked
rlm_sql (sql_acctlocal): Attempting to connect to radius at localhost:/radiusdb
rlm_sql (sql_acctlocal): starting 0
rlm_sql (sql_acctlocal): Attempting to connect rlm_sql_mysql #0
rlm_sql_mysql: Starting connect to MySQL server for #0
rlm_sql (sql_acctlocal): Connected new DB handle, #0
rlm_sql (sql_acctlocal): starting 1
rlm_sql (sql_acctlocal): Attempting to connect rlm_sql_mysql #1
rlm_sql_mysql: Starting connect to MySQL server for #1
rlm_sql (sql_acctlocal): Connected new DB handle, #1
rlm_sql (sql_acctlocal): starting 2
rlm_sql (sql_acctlocal): Attempting to connect rlm_sql_mysql #2
rlm_sql_mysql: Starting connect to MySQL server for #2
rlm_sql (sql_acctlocal): Connected new DB handle, #2
rlm_sql (sql_acctlocal): starting 3
rlm_sql (sql_acctlocal): Attempting to connect rlm_sql_mysql #3
rlm_sql_mysql: Starting connect to MySQL server for #3
rlm_sql (sql_acctlocal): Connected new DB handle, #3
rlm_sql (sql_acctlocal): starting 4
rlm_sql (sql_acctlocal): Attempting to connect rlm_sql_mysql #4
rlm_sql_mysql: Starting connect to MySQL server for #4
rlm_sql (sql_acctlocal): Connected new DB handle, #4
 Module: Linked to module rlm_attr_filter
 Module: Instantiating module "attr_filter.accounting_response" from
file /etc/raddb/modules/attr_filter
  attr_filter attr_filter.accounting_response {
	attrsfile = "/etc/raddb/attrs.accounting_response"
	key = "%{User-Name}"
	relaxed = no
  }
 Module: Checking session {...} for more modules to load
 Module: Checking post-proxy {...} for more modules to load
 Module: Checking post-auth {...} for more modules to load
 Module: Instantiating module "attr_filter.access_reject" from file
/etc/raddb/modules/attr_filter
  attr_filter attr_filter.access_reject {
	attrsfile = "/etc/raddb/attrs.access_reject"
	key = "%{User-Name}"
	relaxed = no
  }
 } # modules
} # server
server inner-tunnel { # from file /etc/raddb/sites-enabled/inner-tunnel
 modules {
 Module: Checking authenticate {...} for more modules to load
 Module: Checking authorize {...} for more modules to load
 Module: Checking session {...} for more modules to load
 Module: Checking post-proxy {...} for more modules to load
 Module: Checking post-auth {...} for more modules to load
 } # modules
} # server
radiusd: #### Opening IP addresses and Ports ####
listen {
	type = "auth"
	ipaddr = *
	port = 0
}
listen {
	type = "acct"
	ipaddr = *
	port = 0
}
listen {
	type = "control"
 listen {
	socket = "/var/run/radiusd/radiusd.sock"
 }
}
listen {
	type = "auth"
	ipaddr = 127.0.0.1
	port = 18120
}
 ... adding new socket proxy address * port 39929
Listening on authentication address * port 1812
Listening on accounting address * port 1813
Listening on command file /var/run/radiusd/radiusd.sock
Listening on authentication address 127.0.0.1 port 18120 as server inner-tunnel
Listening on proxy address * port 1814
Ready to process requests.
rad_recv: Access-Request packet from host 127.0.0.1 port 38243,
id=224, length=91
	User-Name = "mci-test at znidomain.com"
	User-Password = "e9d9d2jc23o330k"
	NAS-IP-Address = 127.0.0.1
	NAS-Port = 0
	Message-Authenticator = 0xcf05723e13f3a4e69256bb129551e1ef
# Executing section authorize from file /etc/raddb/sites-enabled/default
+- entering group authorize {...}
++- entering policy filter_username {...}
+++? if (User-Name =~ /^ /)
? Evaluating (User-Name =~ /^ /) -> FALSE
+++? if (User-Name =~ /^ /) -> FALSE
+++? if (User-Name =~ / $$/)
? Evaluating (User-Name =~ / $$/) -> FALSE
+++? if (User-Name =~ / $$/) -> FALSE
+++? if (User-Name != "%{tolower:%{User-Name}}")
	expand: %{User-Name} -> mci-test at znidomain.com
	expand: %{tolower:%{User-Name}} -> mci-test at znidomain.com
? Evaluating (User-Name != "%{tolower:%{User-Name}}") -> FALSE
+++? if (User-Name != "%{tolower:%{User-Name}}") -> FALSE
++- policy filter_username returns notfound
++[preprocess] returns ok
++[chap] returns noop
++[mschap] returns noop
++[digest] returns noop
[suffix] Looking up realm "uniserve.com" for User-Name = "mci-test at uniserve.com"
[suffix] Found realm "uniserve.com"
[suffix] Adding Stripped-User-Name = "mci-test"
[suffix] Adding Realm = "uniserve.com"
[suffix] Proxying request from user mci-test to realm uniserve.com
[suffix] Preparing to proxy authentication request to realm "uniserve.com"
++[suffix] returns updated
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[files] returns noop
[sql_authremote] 	expand: %{Stripped-User-Name} -> mci-test
[sql_authremote] 	expand:
%{%{Stripped-User-Name}:-%{%{User-Name}:-DEFAULT}} -> mci-test
[sql_authremote] sql_set_user escaped user --> 'mci-test'
rlm_sql (sql_authremote): Reserving sql socket id: 4
[sql_authremote] 	expand: SELECT id, u.username, u.password as value
FROM users u, classes c WHERE u.username = '%{SQL-User-Name}' AND
u.class = c.classid AND c.dial = 'Y' AND u.realm = (select realmid
from realms where domainname = '%{Realm}') ORDER BY id -> SELECT id,
u.username, u.password as value FROM users u, classes c WHERE
u.username = 'mci-test' AND u.class = c.classid AND c.dial = 'Y' AND
u.realm = (select realmid from realms where domainname =
'znidomain.com') ORDER BY id
Segmentation fault


More information about the Freeradius-Users mailing list