From: "Stotland, Inga" <inga.stotland@intel.com>
To: "jakub.witowski@silvair.com" <jakub.witowski@silvair.com>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>
Cc: "Gix, Brian" <brian.gix@intel.com>
Subject: Re: [RFC BlueZ 0/1] Validate element indexation
Date: Mon, 8 Jul 2019 16:53:06 +0000 [thread overview]
Message-ID: <65651744c67ae13bd95ffac88fae42f0f6c16c61.camel@intel.com> (raw)
In-Reply-To: <20190708141314.13950-1-jakub.witowski@silvair.com>
[-- Attachment #1: Type: text/plain, Size: 1391 bytes --]
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 #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3265 bytes --]
next prev parent reply other threads:[~2019-07-08 16:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-08 14:13 [RFC BlueZ 0/1] Validate element indexation Jakub Witowski
2019-07-08 14:13 ` [RFC BlueZ 1/1] mesh: " Jakub Witowski
2019-07-08 16:53 ` Stotland, Inga [this message]
2019-07-08 18:22 ` [RFC BlueZ 0/1] " Michał Lowas-Rzechonek
2019-07-09 6:36 ` Stotland, Inga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=65651744c67ae13bd95ffac88fae42f0f6c16c61.camel@intel.com \
--to=inga.stotland@intel.com \
--cc=brian.gix@intel.com \
--cc=jakub.witowski@silvair.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox