* [PATCH net-next v7] net: hsr: require valid EOT supervision TLV
@ 2026-05-23 13:04 luka.gejak
2026-05-23 16:36 ` Fernando Fernandez Mancera
2026-05-27 1:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: luka.gejak @ 2026-05-23 13:04 UTC (permalink / raw)
To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman
Cc: Luka Gejak, Felix Maurer, netdev, linux-kernel
From: Luka Gejak <luka.gejak@linux.dev>
Supervision frames are only valid if terminated with a zero-length EOT
TLV. The current check fails to reject non-EOT entries as the terminal
TLV, potentially allowing malformed supervision traffic.
Fix this by strictly requiring the terminal TLV to be HSR_TLV_EOT with
a length of zero.
Assisted-by: Gemini:Gemini-3.1-flash
Signed-off-by: Luka Gejak <luka.gejak@linux.dev>
---
Changes in v7:
- Send as standalone patch as other patch was moved to net. See NOTE.
NOTE: This patch was previously part of a net-next series and was
seperated as requested by Jakub Kicinski. Link to the old series is [1].
[1]:https://lore.kernel.org/netdev/20260513182657.20346-1-luka.gejak@linux.dev/
net/hsr/hsr_forward.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c
index f669a226d728..0774981a65c1 100644
--- a/net/hsr/hsr_forward.c
+++ b/net/hsr/hsr_forward.c
@@ -110,7 +110,7 @@ static bool is_supervision_frame(struct hsr_priv *hsr, struct sk_buff *skb)
}
/* end of tlvs must follow at the end */
- if (hsr_sup_tlv->HSR_TLV_type == HSR_TLV_EOT &&
+ if (hsr_sup_tlv->HSR_TLV_type != HSR_TLV_EOT ||
hsr_sup_tlv->HSR_TLV_length != 0)
return false;
--
2.54.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v7] net: hsr: require valid EOT supervision TLV
2026-05-23 13:04 [PATCH net-next v7] net: hsr: require valid EOT supervision TLV luka.gejak
@ 2026-05-23 16:36 ` Fernando Fernandez Mancera
2026-05-27 1:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Fernando Fernandez Mancera @ 2026-05-23 16:36 UTC (permalink / raw)
To: luka.gejak, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman
Cc: Felix Maurer, netdev, linux-kernel
On 5/23/26 3:04 PM, luka.gejak@linux.dev wrote:
> From: Luka Gejak <luka.gejak@linux.dev>
>
> Supervision frames are only valid if terminated with a zero-length EOT
> TLV. The current check fails to reject non-EOT entries as the terminal
> TLV, potentially allowing malformed supervision traffic.
>
> Fix this by strictly requiring the terminal TLV to be HSR_TLV_EOT with
> a length of zero.
>
> Assisted-by: Gemini:Gemini-3.1-flash
> Signed-off-by: Luka Gejak <luka.gejak@linux.dev>
Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v7] net: hsr: require valid EOT supervision TLV
2026-05-23 13:04 [PATCH net-next v7] net: hsr: require valid EOT supervision TLV luka.gejak
2026-05-23 16:36 ` Fernando Fernandez Mancera
@ 2026-05-27 1:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-05-27 1:50 UTC (permalink / raw)
To: Luka Gejak
Cc: davem, edumazet, kuba, pabeni, horms, fmaurer, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sat, 23 May 2026 15:04:20 +0200 you wrote:
> From: Luka Gejak <luka.gejak@linux.dev>
>
> Supervision frames are only valid if terminated with a zero-length EOT
> TLV. The current check fails to reject non-EOT entries as the terminal
> TLV, potentially allowing malformed supervision traffic.
>
> Fix this by strictly requiring the terminal TLV to be HSR_TLV_EOT with
> a length of zero.
>
> [...]
Here is the summary with links:
- [net-next,v7] net: hsr: require valid EOT supervision TLV
https://git.kernel.org/netdev/net-next/c/46d111a3ef3b
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-05-27 1:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-23 13:04 [PATCH net-next v7] net: hsr: require valid EOT supervision TLV luka.gejak
2026-05-23 16:36 ` Fernando Fernandez Mancera
2026-05-27 1: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
all inboxes | Powered by JetHome®