From: Isak Westin <isak.westin@loytec.com>
To: linux-bluetooth@vger.kernel.org
Cc: Isak Westin <isak.westin@loytec.com>
Subject: [PATCH BlueZ 2/4] mesh: Verify padding bits in Friend Poll messages
Date: Tue, 4 Oct 2022 10:25:28 +0200 [thread overview]
Message-ID: <20221004082530.25719-3-isak.westin@loytec.com> (raw)
In-Reply-To: <20221004082530.25719-1-isak.westin@loytec.com>
The padding bits in a Friend Poll message must be zero.
See MshPRFv1.0.1 section 3.6.5.1.
---
mesh/net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mesh/net.c b/mesh/net.c
index 379a6e250..a8a527c2f 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -2059,7 +2059,7 @@ static bool ctl_received(struct mesh_net *net, uint32_t net_key_id,
break;
case NET_OP_FRND_POLL:
- if (len != 1 || ttl)
+ if (len != 1 || ttl || pkt[0] > 1)
return false;
print_packet("Rx-NET_OP_FRND_POLL", pkt, len);
--
2.20.1
next prev parent reply other threads:[~2022-10-04 8:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 8:25 [PATCH BlueZ 0/4] Mesh: Fixes for friendship procedures Isak Westin
2022-10-04 8:25 ` [PATCH BlueZ 1/4] mesh: Correct size of friend cache Isak Westin
2022-10-04 9:32 ` Mesh: Fixes for friendship procedures bluez.test.bot
2022-10-04 8:25 ` Isak Westin [this message]
2022-10-04 8:25 ` [PATCH BlueZ 3/4] mesh: Queue a friend update on IV Update change Isak Westin
2022-10-04 8:25 ` [PATCH BlueZ 4/4] mesh: Always relay messages from Low Power nodes Isak Westin
2022-10-06 20:59 ` [PATCH BlueZ 0/4] Mesh: Fixes for friendship procedures Gix, Brian
2022-10-06 21:00 ` patchwork-bot+bluetooth
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=20221004082530.25719-3-isak.westin@loytec.com \
--to=isak.westin@loytec.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;
as well as URLs for NNTP newsgroup(s).