Re: oh shit

William Bulley (web@merit.edu)
Fri, 16 Feb 1996 17:19:25 -0500 (EST)

According to Andrew J. Doane:
>
> It core dumps with this:
>
> get_radrequest: Request from cc784e09 (ts21.ais.net[1026]) code = 4, id = 52, len = 94
> Acct-Session-Id = "00000006"
> User-Name = "whitting"
> NAS-IP-Address = "204.120.78.9"
> NAS-Port = 7
> Received unknown attribute 61
> of length 4: 0x00000000
> Acct-Status-Type = Start
> Acct-Authentic = RADIUS
> Service-Type = Framed
> Framed-Protocol = PPP
> Framed-IP-Address = "206.225.198.6"
> Received unknown attribute 128
> of length 242:
> 0x0800C0F40706000000010806CEE1C00F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
> ^C
> [1] + Segmentation fault ./radiusd -p 1645 -q 1646 -x -z (core dumped)

It looks like the RADIUS packet from the ComOS was corrupted in some fashion.

Notice that the length of the incoming request packet was reported (in the
header) as 94 octets (from the first line of debug output above). Then also
notice that the bogus attribute 128 claims to have a length of 242 (!)

I can count 68 bytes of attributes listed above (including #61) plus twenty
octets for the RADIUS protocol header gives 88 octets. That leaves me with
six (6) octets left over (which is a normal and reasonable number: attribute
plus length plus four octets of data equals six octets).

There are some things in gen_valpairs() in the Merit code which I will change.
But something screwy was received. From the above I am unable to determine
where in the Merit code the crash occurred. If anyone can consistently
reproduce these symptoms and/or still has a core file laying around, would
you please fire up a debugger and print out the final stack trace-back for
me to examine? If you use dbx(1) then the "where" command would give you
that information. This information will help me track down where the code
is weak and will result in a better and more robust server for everyone.

Send me what you can, thanks!

Regards,

web...

-- 
William Bulley, N8NXN              Senior Systems Research Programmer
Merit Network Inc.                 Domain: web@merit.edu
4251 Plymouth Road                 MaBell: (313) 764-9993
Ann Arbor, Michigan  48105-2785    Fax:    (313) 747-3185