Re: [RFC BlueZ 0/1] Validate element indexation

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

 



Hi Jakub,

On Mon, 2019-07-08 at 16:13 +0200, Jakub Witowski wrote:
> Hello,
> 
> I've prepared validation of element indexation.
> 
> First of all I've used 64-bit unsigned value to collect all given
> indexes.
> As You can deduce from "4.2.1.1 Composition Data Page 0", the maximum
> value of elements can be 61.
> It is limited by max message size which is 376. Furthermore the
> element indexes should be given
> with no gap between them, for example:
>   element index: 3, 2, 0, 1 will be ok,
>   element index: 3, 2, 0 should return an error because the idx 1 is
> missing
> 
> Secondly I think, that the validation of element index value may be
> required, cause for now
> we support 255 (uint8_t).
> 
> Please let me know what do You thing of aboves.
> 
> BR,
> Jakub Witowski 
> 
> Jakub Witowski (1):
>   mesh: Validate element indexation
> 
>  mesh/node.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 

I agree that the validation for the gaps is needed. Interesting point
about max number of elements...

I wonder if a better check woul be to we to add to construct
composition data as a validation point to make sure it fits in mesh message. Plus, an additional strict check can be done when Attach method is called: stored composition can be byte compared to the one dynamically generated from collected properties...



Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux