From: Szymon Janc <szymon.janc@tieto.com>
To: Jakub Tyszkowski <jakub.tyszkowski@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 11/11] android/gatt: Verify offset on srvc change ccc write
Date: Tue, 13 Jan 2015 14:48:57 +0100 [thread overview]
Message-ID: <2487952.WsYVOWAuiO@uw000953> (raw)
In-Reply-To: <1420708669-32600-11-git-send-email-jakub.tyszkowski@tieto.com>
Hi Jakub,
On Thursday 08 of January 2015 10:17:49 Jakub Tyszkowski wrote:
> Protect CCC from remote sending invalid prepare write offset.
>
> We are not using offset value in the code right now, but there is a test
> case in PTS that expects this error to be send. PTS can use this embeded
> service's ccc descriptor if no such descriptors are added by the user.
Please mention affected PTS test name.
> ---
> android/gatt.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/android/gatt.c b/android/gatt.c
> index c00eb9e..70b8a00 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -7029,6 +7029,12 @@ static void gatt_srvc_change_write_cb(struct gatt_db_attribute *attrib,
> return;
> }
>
> + if (offset > 1) {
> + gatt_db_attribute_write_result(attrib, id,
> + ATT_ECODE_INVALID_OFFSET);
> + return;
Indentation is wrong here.
> + }
> +
> /* 2 octets are expected as CCC value */
> if (len != 2) {
> gatt_db_attribute_write_result(attrib, id,
>
--
Best regards,
Szymon Janc
next prev parent reply other threads:[~2015-01-13 13:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 9:17 [PATCH 01/11] android/tester: Use uint16_t for handles Jakub Tyszkowski
2015-01-08 9:17 ` [PATCH 02/11] android/tester: Add macro improving pdu send procedure Jakub Tyszkowski
2015-01-08 9:17 ` [PATCH 03/11] android/tester: Support remote sending pdu from fragments Jakub Tyszkowski
2015-01-08 9:17 ` [PATCH 04/11] android/tester: Use multiple iovecs instead of one large buffer Jakub Tyszkowski
2015-01-08 9:17 ` [PATCH 05/11] android/tester: Add case for GATT embeded attributes writes Jakub Tyszkowski
2015-01-08 9:17 ` [PATCH 06/11] android/tester: Add case for GATT prep. and exec. write on ccc descr Jakub Tyszkowski
2015-01-13 13:48 ` Szymon Janc
2015-01-08 9:17 ` [PATCH 07/11] android/gatt: Fix not handling service change ccc write execute Jakub Tyszkowski
2015-01-13 13:48 ` Szymon Janc
2015-01-08 9:17 ` [PATCH 08/11] android/tester: Add GATT Server test for invalid value length for ccc Jakub Tyszkowski
2015-01-08 9:17 ` [PATCH 09/11] android/tester: Add case for error passing in GATT server responses Jakub Tyszkowski
2015-01-08 9:17 ` [PATCH 10/11] android/tester: Add GATT case for Svc. change invalid offset write Jakub Tyszkowski
2015-01-08 9:17 ` [PATCH 11/11] android/gatt: Verify offset on srvc change ccc write Jakub Tyszkowski
2015-01-13 13:48 ` Szymon Janc [this message]
2015-01-13 13:48 ` [PATCH 01/11] android/tester: Use uint16_t for handles Szymon Janc
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=2487952.WsYVOWAuiO@uw000953 \
--to=szymon.janc@tieto.com \
--cc=jakub.tyszkowski@tieto.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