From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D813C364935 for ; Fri, 20 Mar 2026 08:54:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773996852; cv=none; b=NM3bBhvQ94GygJrVtR4b6ewxfBvF2YUmxGBehXQAwNHmPl5x2RwR1F4ZHm1JlXMKxhBrkYNzhSrza1jTKPYX5K7vHN2dPKb19SXtk2dWq1MtjRwnAIN7m2qCyejo6OfSSMWKTRNgHJYDfPM4/R2OY4CKbuTsPXEPBf+eZmAi79w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773996852; c=relaxed/simple; bh=zbSgm+7SlAz8zl0TnAby9Selii0j4ohBDROYh4sCceU=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=O2slAiOv0mjEnwnAj70JtcwKiGaH65gdSCAxX5aFf29ky+DKSZnLbZmTBEQ87zUKrX90rL2KwztkDT1/BAIx9jja48AOE8Rdo7+JUx3EFBeS4DWvdxbfT21vJS+OEJcovsLsitpFA4NePRzF6rMuSuBVLF+xpushQLfqxcIPYPI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qtkel8Ne; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="qtkel8Ne" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06075C4CEF7; Fri, 20 Mar 2026 08:54:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773996852; bh=zbSgm+7SlAz8zl0TnAby9Selii0j4ohBDROYh4sCceU=; h=Subject:To:Cc:From:Date:From; b=qtkel8Netbvbubu2ZiL3/hTJSxkSlsQ71QuQQY5xjrbghElM0D6hdHepWS52U3bEs puxNRAmyIsm9gS21RIi2kV/KzGvvoJ6s9g0iQr1mI1BDvrWzn4Yu4Ff7n7ud1XfiQ6 WwQaYFalJvCw5Kb3nt6kAnzTIHPFS4Bdc3DD+h2I= Subject: FAILED: patch "[PATCH] batman-adv: avoid OGM aggregation when skb tailroom is" failed to apply to 6.1-stable tree To: n05ec@lzu.edu.cn,bird@lzu.edu.cn,sven@narfation.org,sw@simonwunderlich.de,tanyuan98@outlook.com,tomapufckgml@gmail.com,yifanwucs@gmail.com Cc: From: Date: Fri, 20 Mar 2026 09:54:04 +0100 Message-ID: <2026032003-angrily-tranquil-eb2a@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x 0d4aef630be9d5f9c1227d07669c26c4383b5ad0 # git commit -s git send-email --to '' --in-reply-to '2026032003-angrily-tranquil-eb2a@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 0d4aef630be9d5f9c1227d07669c26c4383b5ad0 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Sat, 14 Mar 2026 07:11:27 +0000 Subject: [PATCH] batman-adv: avoid OGM aggregation when skb tailroom is insufficient When OGM aggregation state is toggled at runtime, an existing forwarded packet may have been allocated with only packet_len bytes, while a later packet can still be selected for aggregation. Appending in this case can hit skb_put overflow conditions. Reject aggregation when the target skb tailroom cannot accommodate the new packet. The caller then falls back to creating a new forward packet instead of appending. Fixes: c6c8fea29769 ("net: Add batman-adv meshing protocol") Cc: stable@vger.kernel.org Reported-by: Yifan Wu Reported-by: Juefei Pu Signed-off-by: Yuan Tan Signed-off-by: Xin Liu Signed-off-by: Ao Zhou Signed-off-by: Yang Yang Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index b75c2228e69a..f28e9cbf8ad5 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c @@ -473,6 +473,9 @@ batadv_iv_ogm_can_aggregate(const struct batadv_ogm_packet *new_bat_ogm_packet, if (aggregated_bytes > max_bytes) return false; + if (skb_tailroom(forw_packet->skb) < packet_len) + return false; + if (packet_num >= BATADV_MAX_AGGREGATION_PACKETS) return false;