SQL results going ... wrong

Phil Mayers p.mayers at imperial.ac.uk
Fri Apr 15 09:02:09 CEST 2011


On 04/15/2011 06:57 AM, Stefan Winter wrote:
> Hi,
>
>>> Thu Apr 14 15:43:07 2011 : Error: rlm_sql: Invalid operator
>>> "?x�{?(�{?@�{?D�{?<�{?D�{?Z�{?]�{?v�{?swinter" for attribute +=
>>> Thu Apr 14 15:43:07 2011 : Error: rlm_sql (sql-aai): Error getting data
>>> from database
>>> Thu Apr 14 15:43:07 2011 : Error: [sql-aai] SQL query error;
>>> rejecting user
>>>
>>> Something looks like accessing memory where it better shouldn't.
>
>> What character set encodings are you using for the database?
>>
>> I suspect the database is set UTF8 and your default character encoding
> on the
>> system you are developing FreeRadius is different.
>
> This does definitely not look like a character encoding issue to me.
> I've seen lots of these, and I'm using the same database structure all
> around in our production setup. And the characters being transmitted are
> all good old plain ASCII characters.
>
> If you check the debug output against what's being sent, you'll see
> striking mismatches; ' Invalid operator "..." for attribute +='
>
> There is no attribute += - attributes are all "RESTENA-AAI-Attribute" -
> which is defined in my dictionaries.
>
> The quoted strange-string content contains my username swinter, but the
> debug output says it considers this to be part of the "operator" column.
> Sorry, but this is beyond character set badnesses. I'll run the same
> test case with sql module debug on - maybe that sheds more light into
> what's going wrong.

Maybe try an strace or gdb w/ breakpoint.

Is there any possibility you're pulling an attribute of >253 bytes from 
the database, which might be stomping the stack? IIRC rlm_sql should 
prevent that itself, but maybe there are holes in the code.



More information about the Freeradius-Users mailing list