Re: [PATCH] sctp: add verification checks to SCTP_AUTH_KEY option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vlad Yasevich wrote:
> Eugene Teo wrote:
>> Vlad Yasevich wrote:
[...]
>>> +	if (authkey->sca_keylength > optlen) {
>>> +		ret = -EINVAL;
>>> +		goto out;
>> Is there a better upper bound check?
> 
> Hm...  optlen - sizeof(struct sctp_authkey)  is more accurate.
> 
> There is really no other bound.

Linus suggested that it is better to declare an upper bound for key_len.
I think it makes a lot of sense as a key shouldn't be as long as the
boundary limit of its declared data type.

Thanks,
Eugene
--
To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Networking Development]     [Linux OMAP]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux