public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/1] pull request: batman-adv 2026-03-17
@ 2026-03-17 16:00 Simon Wunderlich
  2026-03-17 16:00 ` [PATCH net 1/1] batman-adv: avoid OGM aggregation when skb tailroom is insufficient Simon Wunderlich
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Wunderlich @ 2026-03-17 16:00 UTC (permalink / raw)
  To: davem, kuba; +Cc: netdev, b.a.t.m.a.n, Simon Wunderlich

Hi David, hi Jakub,

here is a bugfix for batman-adv which we would like to have integrated into net.

Please pull or let me know of any problem!

Thank you,
      Simon

The following changes since commit cfc83a3c71517b59c1047db57da31e26a9dc2f33:

  batman-adv: Avoid double-rtnl_lock ELP metric worker (2026-02-21 13:01:55 +0100)

are available in the Git repository at:

  https://git.open-mesh.org/linux-merge.git tags/batadv-net-pullrequest-20260317

for you to fetch changes up to 0d4aef630be9d5f9c1227d07669c26c4383b5ad0:

  batman-adv: avoid OGM aggregation when skb tailroom is insufficient (2026-03-14 08:29:47 +0100)

----------------------------------------------------------------
Here is a batman-adv bugfix:

- avoid OGM aggregation when skb tailroom is insufficient, by Yang Yang

----------------------------------------------------------------
Yang Yang (1):
      batman-adv: avoid OGM aggregation when skb tailroom is insufficient

 net/batman-adv/bat_iv_ogm.c | 3 +++
 1 file changed, 3 insertions(+)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH net 1/1] batman-adv: avoid OGM aggregation when skb tailroom is insufficient
  2026-03-17 16:00 [PATCH net 0/1] pull request: batman-adv 2026-03-17 Simon Wunderlich
@ 2026-03-17 16:00 ` Simon Wunderlich
  2026-03-19  0:50   ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Wunderlich @ 2026-03-17 16:00 UTC (permalink / raw)
  To: davem, kuba
  Cc: netdev, b.a.t.m.a.n, Yang Yang, stable, Yifan Wu, Juefei Pu,
	Yuan Tan, Xin Liu, Sven Eckelmann, Simon Wunderlich

From: Yang Yang <n05ec@lzu.edu.cn>

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 <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Signed-off-by: Yuan Tan <tanyuan98@outlook.com>
Signed-off-by: Xin Liu <bird@lzu.edu.cn>
Signed-off-by: Ao Zhou <n05ec@lzu.edu.cn>
Signed-off-by: Yang Yang <n05ec@lzu.edu.cn>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
---
 net/batman-adv/bat_iv_ogm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index b75c2228e69a6..f28e9cbf8ad5f 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;
 
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net 1/1] batman-adv: avoid OGM aggregation when skb tailroom is insufficient
  2026-03-17 16:00 ` [PATCH net 1/1] batman-adv: avoid OGM aggregation when skb tailroom is insufficient Simon Wunderlich
@ 2026-03-19  0:50   ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-19  0:50 UTC (permalink / raw)
  To: Simon Wunderlich
  Cc: davem, kuba, netdev, b.a.t.m.a.n, n05ec, stable, yifanwucs,
	tomapufckgml, tanyuan98, bird, sven

Hello:

This patch was applied to netdev/net.git (main)
by Simon Wunderlich <sw@simonwunderlich.de>:

On Tue, 17 Mar 2026 17:00:02 +0100 you wrote:
> From: Yang Yang <n05ec@lzu.edu.cn>
> 
> 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.
> 
> [...]

Here is the summary with links:
  - [net,1/1] batman-adv: avoid OGM aggregation when skb tailroom is insufficient
    https://git.kernel.org/netdev/net/c/0d4aef630be9

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-19  0:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-17 16:00 [PATCH net 0/1] pull request: batman-adv 2026-03-17 Simon Wunderlich
2026-03-17 16:00 ` [PATCH net 1/1] batman-adv: avoid OGM aggregation when skb tailroom is insufficient Simon Wunderlich
2026-03-19  0:50   ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox