TMPL_TYPE_LITERAL has non-zero bytes in its data union

Geaaru geaaru at gmail.com
Wed Jun 26 19:01:34 CEST 2019


Hi Alan,
I saw your patch on upstream and I dunno if your commits cover
completely this use case.
But if could help, now I have a different stack for the exception with
your last changes:
CONSISTENCY CHECK FAILED /home/geaaru/Projects/freeradius-
server/src/main/tmpl.c[1103]: TMPL_TYPE_LITERAL has non-zero bytes in
its data unionSOFT ASSERT FAILED /home/geaaru/Projects/freeradius-
server/src/main/tmpl.c[2158]: 0CAUGHT SIGNAL: AbortedBacktrace of last
16 frames:/tmp/radius/usr/lib/libfreeradius-
radius.so(fr_fault+0x12c)[0x7ffff7b42f76]/tmp/radius/usr/lib/libfreerad
ius-
radius.so(fr_assert_cond+0x5b)[0x7ffff7b43c2a]/tmp/radius/usr/lib/libfr
eeradius-
server.so(tmpl_verify+0x1ef)[0x7ffff7dac8bc]/tmp/radius/usr/lib/libfree
radius-
server.so(tmpl_cast_in_place+0x116)[0x7ffff7daa369]/tmp/radius/usr/lib/
libfreeradius-
server.so(+0x1a29a)[0x7ffff7da229a]/tmp/radius/usr/lib/libfreeradius-
server.so(+0x18c79)[0x7ffff7da0c79]/tmp/radius/usr/lib/libfreeradius-
server.so(fr_condition_tokenize+0x5e)[0x7ffff7da38e7]/tmp/radius/usr/li
b/libfreeradius-
server.so(+0xe9c7)[0x7ffff7d969c7]/tmp/radius/usr/lib/libfreeradius-
server.so(+0xf906)[0x7ffff7d97906]/tmp/radius/usr/lib/libfreeradius-
server.so(+0xe4fa)[0x7ffff7d964fa]/tmp/radius/usr/lib/libfreeradius-
server.so(+0xf906)[0x7ffff7d97906]/tmp/radius/usr/lib/libfreeradius-
server.so(cf_file_read+0x119)[0x7ffff7d97c6d]/tmp/radius/usr/sbin/radiu
sd(main_config_init+0x4fa)[0x55555557e8eb]/tmp/radius/usr/sbin/radiusd(
main+0x735)[0x55555558d18e]/lib64/libc.so.6(__libc_start_main+0xe7)[0x7
ffff6a63c07]/tmp/radius/usr/sbin/radiusd(_start+0x2a)[0x555555566a7a]No
panic action set
Program received signal SIGABRT, Aborted.0x00007ffff6eb86cb in raise ()
from /lib64/libpthread.so.0(gdb) bt#0  0x00007ffff6eb86cb in raise ()
from /lib64/libpthread.so.0#1  0x00007ffff7b43243 in fr_fault (sig=6)
at /home/geaaru/Projects/freeradius-
server/src/lib/debug.c:763#2  0x00007ffff7b43c2a in fr_assert_cond
(file=0x7ffff7dc1d90 "/home/geaaru/Projects/freeradius-
server/src/main/tmpl.c", line=2158, expr=0x7ffff7dc1e90 "0",
cond=false) at /home/geaaru/Projects/freeradius-
server/src/lib/debug.c:1101#3  0x00007ffff7dac8bc in tmpl_verify
(file=0x7ffff7dc1d90 "/home/geaaru/Projects/freeradius-
server/src/main/tmpl.c", line=1103, vpt=0x555555a772f0) at
/home/geaaru/Projects/freeradius-
server/src/main/tmpl.c:2158#4  0x00007ffff7daa369 in tmpl_cast_in_place
(vpt=0x555555a772f0, type=PW_TYPE_INTEGER, enumv=0x55555598bb58) at
/home/geaaru/Projects/freeradius-
server/src/main/tmpl.c:1103#5  0x00007ffff7da229a in condition_tokenize
(ctx=0x555555a69750, ci=0x555555a76b10, start=0x7ffffffe88de
"&Control:Auth-Type == \"CHAP\") {", brace=true, pcond=0x555555a69760,
error=0x7ffffffe87a0, flags=1)    at /home/geaaru/Projects/freeradius-
server/src/main/parser.c:1140#6  0x00007ffff7da0c79 in
condition_tokenize (ctx=0x555555a76b10, ci=0x555555a76b10,
start=0x7ffffffe88dd "(&Control:Auth-Type == \"CHAP\") {", brace=false,
pcond=0x7ffffffe87b0, error=0x7ffffffe87a0, flags=1)    at
/home/geaaru/Projects/freeradius-
server/src/main/parser.c:530#7  0x00007ffff7da38e7 in
fr_condition_tokenize (ctx=0x555555a76b10, ci=0x555555a76b10,
start=0x7ffffffe88dd "(&Control:Auth-Type == \"CHAP\") {",
head=0x7ffffffe87b0, error=0x7ffffffe87a0, flags=1)    at
/home/geaaru/Projects/freeradius-server/src/main/parser.c:1754


On Wed, 2019-06-26 at 10:16 -0400, Alan DeKok wrote:
> On Jun 26, 2019, at 10:00 AM, Geaaru <geaaru at gmail.com> wrote:
> > Yeah, I did that. Thanks. But the weird thing is that this happens
> > in different configurations:
> > This seems that first use case (if I drop all operations and I
> > leave this):
> >   authorize {
> >           if (&Control:Auth-Type == "CHAP") {
> >           }
> >   }
> > the exception is visible from my side.
> 
>   OK.  I see that too.
>   Now that I can reproduce it here, it should be easier to fix.
>   Alan DeKok.


More information about the Freeradius-Devel mailing list