Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66A2D43CE53; Mon, 17 Aug 2026 13:45:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786974326; cv=none; b=nLmEflwMGD8hBblmdrhD1lO5X9Mfb0SQiHdCe8J1FD4uBp/Mhs6Fe6z1lv8UCe0VxFC+kP3kpSOQd1cNxCBtrtveGSLvT2oelG3vTXWwNkWzg8NviyPiKVhRDDqI9zdoJS1NXMZSdw0YSgOhFK0o3xCFKaroHTuaUMG38ZL9EdI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786974326; c=relaxed/simple; bh=BHPGQOUVTH5rzHuUkLYi/yfEe+YGPw6ZQ26Z9zILe5g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CDhrqk7lIWCYLuyrmbZqFY/nLptVKzEUv2p1xvnsuxgwTn0GH0gT3l28i66+t7gA8l9U6bS0+qTXm//8FkoSYHz5wFMeFOwwyNYc67pjJ6eymWj2RipZsFbUOqiU81PI4qXwyvlYYroRwWRPdv65Rh/AjuOTfYWFkPcNhnfdYAI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jbOMuNLl; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="jbOMuNLl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 987841F00A3A; Mon, 17 Aug 2026 13:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786974318; bh=26ItsiO89LEuXjpVl0+VR0tHd50GEdGUCtGoqkYoeDs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jbOMuNLl4POQN5jSwFFTek1rfPviZWi4WfbRiqbm575SdrtemQf/8EKV5KV/9A3F3 0VcCJ4n+HRcHLfVjrQ9q7mi9toqXrHp1GZ9TUBxw1xZiIopnCVQizTYUbhwq1oUYKH x1C1AgftlURoe6qSNzf7gwWyXvtKCwX8ORz26Et0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nikolay Aleksandrov , Baul Lee , Jakub Kicinski Subject: [PATCH 7.1 162/271] net: bridge: mrp: fix uninitialised bytes on the wire Date: Mon, 17 Aug 2026 15:31:27 +0200 Message-ID: <20260817132543.567648522@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260817132536.752504388@linuxfoundation.org> References: <20260817132536.752504388@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Baul Lee commit 63488dba65ef91373ef616575b32eb0eb21459f4 upstream. br_mrp_alloc_test_skb() builds MRP test frames on an skb from dev_alloc_skb(), which does not clear the linear data area. On the MRA ring-role branch the sub-option TLV header is appended with sub_tlv = skb_put(skb, sizeof(*sub_tlv)); sub_tlv->type = BR_MRP_SUB_TLV_HEADER_TEST_AUTO_MGR; so sub_tlv->length is never written, and the two trailing alignment bytes are appended with a bare skb_put() that does not clear them either. The neighbouring oui and sub_opt regions are explicitly zeroed, so three uninitialised bytes are left in every MRA MRP_Test frame that goes out. Put the sub-option TLV header and the alignment padding in a single skb_put_zero(), which clears both. The AUTO_MGR sub-TLV carries no payload, so the zeroed length field is already the value it should have. Fixes: f7458934b079 ("net: bridge: mrp: Update the Test frames for MRA") Suggested-by: Nikolay Aleksandrov Cc: stable@vger.kernel.org Signed-off-by: Baul Lee Acked-by: Nikolay Aleksandrov Link: https://patch.msgid.link/20260729131941.10254-1-baul.lee@xbow.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/bridge/br_mrp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/net/bridge/br_mrp.c +++ b/net/bridge/br_mrp.c @@ -224,11 +224,9 @@ static struct sk_buff *br_mrp_alloc_test sub_opt = skb_put(skb, sizeof(*sub_opt)); memset(sub_opt, 0x0, sizeof(*sub_opt)); - sub_tlv = skb_put(skb, sizeof(*sub_tlv)); - sub_tlv->type = BR_MRP_SUB_TLV_HEADER_TEST_AUTO_MGR; - /* 32 bit alligment shall be ensured therefore add 2 bytes */ - skb_put(skb, MRP_OPT_PADDING); + sub_tlv = skb_put_zero(skb, sizeof(*sub_tlv) + MRP_OPT_PADDING); + sub_tlv->type = BR_MRP_SUB_TLV_HEADER_TEST_AUTO_MGR; } br_mrp_skb_tlv(skb, BR_MRP_TLV_HEADER_END, 0x0);