From 68d7fb69fe867f199772bd661e817a07ac210192 Mon Sep 17 00:00:00 2001 From: Pavel Vasilyev Date: Wed, 27 Aug 2025 14:02:11 +0200 Subject: [PATCH] bluetooth: mesh: pb_adv: check SegN in Transaction Continuation PDU Check that SegN is not 0. SegN = 0 is invalid as the first segment is sent in Transaction Start PDU. Signed-off-by: Pavel Vasilyev (cherry picked from commit 427cf0da6aeb2c85995fc7eec82d7b2f45b8ac61) --- subsys/bluetooth/mesh/pb_adv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/bluetooth/mesh/pb_adv.c b/subsys/bluetooth/mesh/pb_adv.c index 86f20497704f3..57a7c16b4f8c1 100644 --- a/subsys/bluetooth/mesh/pb_adv.c +++ b/subsys/bluetooth/mesh/pb_adv.c @@ -515,7 +515,7 @@ static void gen_prov_cont(struct prov_rx *rx, struct net_buf_simple *buf) return; } - if (seg > link.rx.last_seg) { + if (seg > link.rx.last_seg || seg == 0) { LOG_ERR("Invalid segment index %u", seg); prov_failed(PROV_ERR_NVAL_FMT); return;