From mboxrd@z Thu Jan 1 00:00:00 1970 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 C37A9313E34; Sat, 30 May 2026 18:37:31 +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=1780166252; cv=none; b=O388zxxQvZQnLa3czzXZJ+2IxbSzA4bad6n/8fujh6Yn/ohoLtfLSiQ5X4HEpJIhx4HH+jzBo2ael/TZjdl44L9lkb83D5i7ylGTSbXfWQBJ4ObkdwrF04G6oC2DZlx6HR8+dLf31PFmyLnGo7/NJC0YW4pYNepcPhwRyGrxwuA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780166252; c=relaxed/simple; bh=E4JXawO+su92iD1OWQNQSTlWdkYxWPCYhh7rmDMBl9Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ga48Zjo+5l3fYn+5Tyucp1u9wjlRReFh4obweNKDbkD4+Wpew8NGgfCkaEmqzDkE9qB0plsRFCLpk7f9lv+QjSjYcHHbSrdu0WdXLenug4A6AalUXrEgMwsZZNxgIIbk/GxhxKSlxeTLGSD7yuh6cAu3umx+eVFP+TmDHuY82RM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zleBxptH; 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="zleBxptH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16D071F00893; Sat, 30 May 2026 18:37:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780166251; bh=lMDsXWGLCZeV5qNOFad1eaVR2XObD2Ae10mc0T4PG4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=zleBxptHAFWHnnuE2dJNNlXahuombZPCpQdh56I4Sxm8dw6XJJY4Sb/hdBUqvA2dZ 838JaX5hf+7bmifNUr7bj60WjZz9a9oSqeGoqgbPirAF8XKuTfHKRuiDuMEE1wqWxX Zmom0rOc9s3hXBeUW60XDrWLSMsR7OE5bv5olLck= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Lyes Bourennani , Alexis Pinson , Sven Eckelmann Subject: [PATCH 5.10 281/589] batman-adv: fix integer overflow on buff_pos Date: Sat, 30 May 2026 18:02:42 +0200 Message-ID: <20260530160232.340779647@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260530160224.570625122@linuxfoundation.org> References: <20260530160224.570625122@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 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lyes Bourennani commit 0799e5943611006b346b8813c7daf7dd5aa26bfd upstream. Fixing an integer overflow present in batadv_iv_ogm_send_to_if. The size check is done using the int type in batadv_iv_ogm_aggr_packet whereas the buff_pos variable uses the s16 type. This could lead to an out-of-bound read. Cc: stable@vger.kernel.org Fixes: c6c8fea29769 ("net: Add batman-adv meshing protocol") Signed-off-by: Lyes Bourennani Signed-off-by: Alexis Pinson Signed-off-by: Sven Eckelmann Signed-off-by: Greg Kroah-Hartman --- net/batman-adv/bat_iv_ogm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c @@ -336,7 +336,7 @@ static void batadv_iv_ogm_send_to_if(str struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); const char *fwd_str; u8 packet_num; - s16 buff_pos; + int buff_pos; struct batadv_ogm_packet *batadv_ogm_packet; struct sk_buff *skb; u8 *packet_pos;