Re: [PATCH] opensm/osm_slvl_map_rcv.c: verify port number values received from network

Hal Rosenstock
2010-01-04T19:12:20Z

On Sun, Jan 3, 2010 at 12:02 PM, Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org> wrote:
> On 09:48 Thu 31 Dec     , Hal Rosenstock wrote:
>>
>> I thought this was only done when these issues are actually found and
>> in general we are relying on compliance.
>
> OpenSM can rely on compliance in many cases, but it cannot crash (or
> become nonoperational in any other way) relying on compliance.

I think that's fine as a general principle but isn't practical. There
are many cases where OpenSM relies on SMA/PMA/SA client compliance
(without such checking/overhead).

>> Is there a specific known
>> issue here ?
>>
>> If we are worrying about this as a general principle, there are more
>> places to bullet proof like this.
>
> Likely so and it would be good to fix all of them.

Have you done a code review/inspection for such cases ?

>> I am wondering about why the
>> exception here.
>
> It is not exception.

I think there are more unprotected cases than protected ones.

-- Hal

> I found this one, so fixed.

> Sasha