TMPL_TYPE_LITERAL has non-zero bytes in its data union
Geaaru
geaaru at gmail.com
Wed Jul 31 20:54:45 CEST 2019
+FDev ML
Il giorno mer 31 lug 2019 alle ore 20:52 Geaaru <geaaru at gmail.com> ha
scritto:
> (gdb) p *map.lhs
> $4 = {
> type = TMPL_TYPE_ATTR,
> name = 0x555555adff40 "&control:Framed-IP-Netmask",
> len = 26,
> quote = 0 '\000',
> auto_converted = false,
> iflag = false,
> mflag = false,
> data = {
> attribute = {
> request = REQUEST_CURRENT,
> list = PAIR_LIST_CONTROL,
> da = 0x555555614df8,
> unknown = {
> da = '\000' <repeats 147 times>,
> name = '\000' <repeats 147 times>
> },
> num = -2147483648,
> tag = -128 '\200'
> },
> literal = {
> type = PW_TYPE_INTEGER,
> length = 93824993021432,
> data = {
> strvalue = 0x0,
> octets = 0x0,
> integer = 0,
> ipaddr = {
> s_addr = 0
> },
> date = 0,
> filter = {0, 0, 0, 0},
> ifid = "\000\000\000\000\000\000\000",
> ipv6addr = {
> __in6_u = {
> __u6_addr8 = '\000' <repeats 15 times>,
> __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
> --Type <RET> for more, q to quit, c to continue without paging--
> __u6_addr32 = {0, 0, 0, 0}
> }
> },
> ipv6prefix = '\000' <repeats 17 times>,
> byte = 0 '\000',
> ushort = 0,
> ether = "\000\000\000\000\000",
> sinteger = 0,
> integer64 = 0,
> ipv4prefix = "\000\000\000\000\000",
> ptr = 0x0
> }
> },
> xlat = 0x300000002,
> preg = 0x300000002
> }
> }
>
> (gdb) p *map->rhs
> $9 = {
> type = TMPL_TYPE_ATTR_UNDEFINED,
> name = 0x555555ae0110 "&control:Framed-IP-Network",
> len = 26,
> quote = 0 '\000',
> auto_converted = false,
> iflag = false,
> mflag = false,
> data = {
> attribute = {
> request = REQUEST_CURRENT,
> list = PAIR_LIST_CONTROL,
> da = 0x0,
> unknown = {
> da = "Framed-IP-Network", '\000' <repeats 130 times>,
> name = "Framed-IP-Network", '\000' <repeats 130 times>
> },
> num = -2147483648,
> tag = -128 '\200'
> },
> literal = {
> type = PW_TYPE_INTEGER,
> length = 0,
> data = {
> strvalue = 0x492d64656d617246 <error: Cannot access memory at
> address 0x492d64656d617246>,
> octets = 0x492d64656d617246 <error: Cannot access memory at
> address 0x492d64656d617246>,
> integer = 1835102790,
> ipaddr = {
> s_addr = 1835102790
> },
> date = 1835102790,
> filter = {5272981125510296134, 8245940784538201424, 107, 0},
> ifid = "Framed-I",
> ipv6addr = {
> __in6_u = {
> __u6_addr8 = "Framed-IP-Networ",
> __u6_addr16 = {29254, 28001, 25701, 18733, 11600, 25934,
> 30580, 29295},
> --Type <RET> for more, q to quit, c to continue without paging--
> __u6_addr32 = {1835102790, 1227711589, 1699622224, 1919907700}
> }
> },
> ipv6prefix = "Framed-IP-Network",
> byte = 70 'F',
> ushort = 29254,
> ether = "Framed",
> sinteger = 1835102790,
> integer64 = 5272981125510296134,
> ipv4prefix = "Framed",
> ptr = 0x492d64656d617246
> }
> },
> xlat = 0x300000002,
> preg = 0x300000002
> }
> }
>
> (gdb) p *map->next->rhs
> $12 = {
> type = TMPL_TYPE_ATTR,
> name = 0x555555ae0540 "&control:Framed-Protocol",
> len = 24,
> quote = 0 '\000',
> auto_converted = false,
> iflag = false,
> mflag = false,
> data = {
> attribute = {
> request = REQUEST_CURRENT,
> list = PAIR_LIST_CONTROL,
> da = 0x555555614da8,
> unknown = {
> da = '\000' <repeats 147 times>,
> name = '\000' <repeats 147 times>
> },
> num = -2147483648,
> tag = -128 '\200'
> },
> literal = {
> type = PW_TYPE_INTEGER,
> length = 93824993021352,
> data = {
> strvalue = 0x0,
> octets = 0x0,
> integer = 0,
> ipaddr = {
> s_addr = 0
> },
> date = 0,
> filter = {0, 0, 0, 0},
> ifid = "\000\000\000\000\000\000\000",
> ipv6addr = {
> __in6_u = {
> __u6_addr8 = '\000' <repeats 15 times>,
> __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
> --Type <RET> for more, q to quit, c to continue without paging--
> __u6_addr32 = {0, 0, 0, 0}
> }
> },
> ipv6prefix = '\000' <repeats 17 times>,
> byte = 0 '\000',
> ushort = 0,
> ether = "\000\000\000\000\000",
> sinteger = 0,
> integer64 = 0,
> ipv4prefix = "\000\000\000\000\000",
> ptr = 0x0
> }
> },
> xlat = 0x300000002,
> preg = 0x300000002
> }
> }
>
> (gdb) p *map->next->next->rhs
> $14 = {
> type = TMPL_TYPE_ATTR,
> name = 0x555555ae0960 "&control:Pool-Name",
> len = 18,
> quote = 0 '\000',
> auto_converted = false,
> iflag = false,
> mflag = false,
> data = {
> attribute = {
> request = REQUEST_CURRENT,
> list = PAIR_LIST_CONTROL,
> da = 0x55555579e678,
> unknown = {
> da = '\000' <repeats 147 times>,
> name = '\000' <repeats 147 times>
> },
> num = -2147483648,
> tag = -128 '\200'
> },
> literal = {
> type = PW_TYPE_INTEGER,
> length = 93824994633336,
> data = {
> strvalue = 0x0,
> octets = 0x0,
> integer = 0,
> ipaddr = {
> s_addr = 0
> },
> date = 0,
> filter = {0, 0, 0, 0},
> ifid = "\000\000\000\000\000\000\000",
> ipv6addr = {
> __in6_u = {
> __u6_addr8 = '\000' <repeats 15 times>,
> __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
> --Type <RET> for more, q to quit, c to continue without paging--
> __u6_addr32 = {0, 0, 0, 0}
> }
> },
> ipv6prefix = '\000' <repeats 17 times>,
> byte = 0 '\000',
> ushort = 0,
> ether = "\000\000\000\000\000",
> sinteger = 0,
> integer64 = 0,
> ipv4prefix = "\000\000\000\000\000",
> ptr = 0x0
> }
> },
> xlat = 0x300000002,
> preg = 0x300000002
> }
> }
>
> p *map->next->next
> $15 = {
> lhs = 0x555555ae0660,
> rhs = 0x555555ae0820,
> op = T_OP_SET,
> ci = 0x5555557f26f0,
> next = 0x0
> }
>
> (gdb) p *map->next->next->next
> Cannot access memory at address 0x0
>
> It seems that list doesn't contain AVP with data but only AVP not
> available on control list (Pool-Name, Framed-Ip-Address, Framed-Protocol).
>
>
> Il giorno mer 31 lug 2019 alle ore 20:45 Alan DeKok <
> aland at deployingradius.com> ha scritto:
>
>>
>>
>> > On Jul 31, 2019, at 2:37 PM, Geaaru <geaaru at gmail.com> wrote:
>> >
>> >
>> > (gdb) p *map
>> > $1 = {
>> > lhs = 0x555555adfe00,
>> > rhs = 0x555555adffd0,
>> > op = T_OP_SET,
>> > ci = 0x5555557f2230,
>> > next = 0x555555ae01a0
>> > }
>>
>> Hmm.. and what's the output of this:
>>
>> (gdb) p *map->lhs
>> (gdb) p *map->res
>>
>> That should give a bit more information.
>>
>> > I'm sure that is a regression because the same code now is in
>> production with 3.0.17.
>>
>> OK.
>>
>> > # Cache for store authentication data
>> > cache cache_auth {
>> > ...
>> > }
>>
>> Yeah, nothing weird there.
>>
>> > Could be related to setting of control:My-User when is not present?
>>
>> Maybe. It's hard to say.
>>
>> Alan DeKok.
>>
>>
>
> --
> --
> --
> Geaaru
>
--
--
--
Geaaru
More information about the Freeradius-Devel
mailing list