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 1E6752E06ED for ; Fri, 20 Mar 2026 08:54:24 +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=1773996865; cv=none; b=Jjz3Vg3W31GblZmXczjMjaBKn/J7O9x/0iIaNZ+b+Tb1lbTkVa4vMw8zpYARttGf5G9p1UengY/ZOd0ITtDpdMi5SkIVS4YE8zpAeyIlJYA95Aut9PO7tPc/MChMWUskoLuURSXopIlMS1g5SWEKrPsoGpqEptYHz/Xp211OHZQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773996865; c=relaxed/simple; bh=7aZq9RP/tWhIQpytWxjBzm1S8P16ZYX8bnjx+nhAJes=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=iMCXilLjQnEiBCOcj/UJa92lZw/UcgKk65vCh77t6Yb2OdQCuAPLjWpW0ljf+W38lJPQmptlFmzRMSiKcgACtCNp3Jk+sJoNQpUoOc7B4qyk5X4j2Bu9iSIRqhYGnropqx1WvLZjmc9pBx9+nmOFooDZf7L+cZhGQf/AiBJY+fA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Dd+fTWUx; 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="Dd+fTWUx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A986C4CEF7; Fri, 20 Mar 2026 08:54:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773996864; bh=7aZq9RP/tWhIQpytWxjBzm1S8P16ZYX8bnjx+nhAJes=; h=Subject:To:Cc:From:Date:From; b=Dd+fTWUxfm5Favb/1MOL2a1qj5N1qOYphpQAO5K9jHcBLJABPiekLzliGsUpOIfnd o2xp/qw+XnA54d1+5qMTzUMYsRaAYJDeqfWKVp+ZQG0J48N0+AVvOuxOgIwK3CZ2sR ZWbnb1+pLIBEd7/ohH4b36jS2JIUQqFBzwnHzVKk= Subject: FAILED: patch "[PATCH] batman-adv: avoid OGM aggregation when skb tailroom is" failed to apply to 5.15-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:07 +0100 Message-ID: <2026032007-october-puma-6f9c@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 5.15-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-5.15.y git checkout FETCH_HEAD git cherry-pick -x 0d4aef630be9d5f9c1227d07669c26c4383b5ad0 # git commit -s git send-email --to '' --in-reply-to '2026032007-october-puma-6f9c@gregkh' --subject-prefix 'PATCH 5.15.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;