* [PATCH] net: dsa: tag_brcm: legacy: fix pskb_may_pull length
@ 2025-05-29 12:44 Álvaro Fernández Rojas
2025-05-29 21:46 ` Florian Fainelli
2025-05-31 2:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Álvaro Fernández Rojas @ 2025-05-29 12:44 UTC (permalink / raw)
To: florian.fainelli, jonas.gorski, dgcbueu, andrew, olteanv, davem,
edumazet, kuba, pabeni, horms, netdev, linux-kernel
Cc: Álvaro Fernández Rojas
BRCM_LEG_PORT_ID was incorrectly used for pskb_may_pull length.
The correct check is BRCM_LEG_TAG_LEN + VLAN_HLEN, or 10 bytes.
Fixes: 964dbf186eaa ("net: dsa: tag_brcm: add support for legacy tags")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
net/dsa/tag_brcm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dsa/tag_brcm.c b/net/dsa/tag_brcm.c
index 8c3c068728e5..fe75821623a4 100644
--- a/net/dsa/tag_brcm.c
+++ b/net/dsa/tag_brcm.c
@@ -257,7 +257,7 @@ static struct sk_buff *brcm_leg_tag_rcv(struct sk_buff *skb,
int source_port;
u8 *brcm_tag;
- if (unlikely(!pskb_may_pull(skb, BRCM_LEG_PORT_ID)))
+ if (unlikely(!pskb_may_pull(skb, BRCM_LEG_TAG_LEN + VLAN_HLEN)))
return NULL;
brcm_tag = dsa_etype_header_pos_rx(skb);
--
2.39.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: dsa: tag_brcm: legacy: fix pskb_may_pull length
2025-05-29 12:44 [PATCH] net: dsa: tag_brcm: legacy: fix pskb_may_pull length Álvaro Fernández Rojas
@ 2025-05-29 21:46 ` Florian Fainelli
2025-05-31 2:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2025-05-29 21:46 UTC (permalink / raw)
To: Álvaro Fernández Rojas, florian.fainelli, jonas.gorski,
dgcbueu, andrew, olteanv, davem, edumazet, kuba, pabeni, horms,
netdev, linux-kernel
On 5/29/2025 5:44 AM, Álvaro Fernández Rojas wrote:
> BRCM_LEG_PORT_ID was incorrectly used for pskb_may_pull length.
> The correct check is BRCM_LEG_TAG_LEN + VLAN_HLEN, or 10 bytes.
>
> Fixes: 964dbf186eaa ("net: dsa: tag_brcm: add support for legacy tags")
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: dsa: tag_brcm: legacy: fix pskb_may_pull length
2025-05-29 12:44 [PATCH] net: dsa: tag_brcm: legacy: fix pskb_may_pull length Álvaro Fernández Rojas
2025-05-29 21:46 ` Florian Fainelli
@ 2025-05-31 2:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-05-31 2:30 UTC (permalink / raw)
To: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas_=3Cnoltari=40gmail=2Ecom=3E?=
Cc: florian.fainelli, jonas.gorski, dgcbueu, andrew, olteanv, davem,
edumazet, kuba, pabeni, horms, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 29 May 2025 14:44:06 +0200 you wrote:
> BRCM_LEG_PORT_ID was incorrectly used for pskb_may_pull length.
> The correct check is BRCM_LEG_TAG_LEN + VLAN_HLEN, or 10 bytes.
>
> Fixes: 964dbf186eaa ("net: dsa: tag_brcm: add support for legacy tags")
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> ---
> net/dsa/tag_brcm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- net: dsa: tag_brcm: legacy: fix pskb_may_pull length
https://git.kernel.org/netdev/net/c/efdddc448485
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:[~2025-05-31 2:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-29 12:44 [PATCH] net: dsa: tag_brcm: legacy: fix pskb_may_pull length Álvaro Fernández Rojas
2025-05-29 21:46 ` Florian Fainelli
2025-05-31 2:30 ` 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;
as well as URLs for NNTP newsgroup(s).