Problem with Vendor ID greater then 32767
Hi, I was trying to use VSA with my private enterprise number registered with IANA (as describe in the documentation) and I found a little problem. In dict.c at dict_addvendor function you have this: if (value >= 32767) { fr_strerror_printf("dict_addvendor: Cannot handle vendor ID larger than 65535"); return -1; } and my number is 34045, so I got a return -1. So, after this I was looking for more of this limitation with vendor id, and I found one more in rlm_eap_ttls.c, I attached the patch to solve this problem. Ty, Rafael Ugolini Vex - Engineering Coordinator rafael.ugolini@vexcorp.com http://www.vexcorp.com Office: +55 11 4932 5932 Cel: +55 11 9467 8489
Rafael Ugolini wrote:
I was trying to use VSA with my private enterprise number registered with IANA (as describe in the documentation) and I found a little problem. ... and my number is 34045, so I got a return -1.
Hmm... IANA is already past 32K. Ugh.
So, after this I was looking for more of this limitation with vendor id, and I found one more in rlm_eap_ttls.c,
I attached the patch to solve this problem.
There's a bit more to it than that. The vendor IDs are packed into a field that is an "int". Enabling vendor IDs of over 32K can result in negative numbers. The code needs to be audited for that, too. I'll take a look... Alan DeKok.
On 12/08/2009 06:19, Alan DeKok wrote:
Rafael Ugolini wrote:
I was trying to use VSA with my private enterprise number registered with IANA (as describe in the documentation) and I found a little problem. ... and my number is 34045, so I got a return -1.
Hmm... IANA is already past 32K. Ugh.
So, after this I was looking for more of this limitation with vendor id, and I found one more in rlm_eap_ttls.c,
I attached the patch to solve this problem.
There's a bit more to it than that.
The vendor IDs are packed into a field that is an "int". Enabling vendor IDs of over 32K can result in negative numbers. The code needs to be audited for that, too.
I'll take a look...
Did you not think they'd get past 32K? Int is dead, long live long :) Arran -- Arran Cudbard-Bell <A.Cudbard-Bell@sussex.ac.uk>, Systems Administrator (AAA), Infrastructure Services (IT Services), E1-1-08, Engineering 1, University Of Sussex, Brighton, BN1 9QT DDI+FAX: +44 1273 873900 | INT: 3900 GPG: 86FF A285 1AA1 EE40 D228 7C2E 71A9 25BB 1E68 54A2
Arran Cudbard-Bell wrote:
Did you not think they'd get past 32K? Int is dead, long live long :)
I thought it would take longer than that... But the limitation in FreeRADIUS has been there for about 10 years... I guess it's OK for IANA to take 10 years to allocate 32K vendor ID's. Alan DeKok.
participants (3)
-
Alan DeKok -
Arran Cudbard-Bell -
Rafael Ugolini