summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_gre.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 10:15:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 10:15:34 +0000
commitf68548b6d10e317aeedb009bab2cdc53aa196bd8 (patch)
tree612907d41d90d34f497c4bfbbfd9fbd368d2a1d7 /net/ipv6/ip6_gre.c
parentAdding debian version 6.1.82-1. (diff)
downloadlinux-f68548b6d10e317aeedb009bab2cdc53aa196bd8.tar.xz
linux-f68548b6d10e317aeedb009bab2cdc53aa196bd8.zip
Merging upstream version 6.1.85.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'net/ipv6/ip6_gre.c')
-rw-r--r--net/ipv6/ip6_gre.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index d3fba7d8d..b3e2d658a 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -528,6 +528,9 @@ static int ip6erspan_rcv(struct sk_buff *skb,
struct ip6_tnl *tunnel;
u8 ver;
+ if (unlikely(!pskb_may_pull(skb, sizeof(*ershdr))))
+ return PACKET_REJECT;
+
ipv6h = ipv6_hdr(skb);
ershdr = (struct erspan_base_hdr *)skb->data;
ver = ershdr->ver;