diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-11-18 22:13:16 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-11-18 22:13:16 +0100 |
commit | 50fc24944a2a0ef5aab571dcac17f6c5f2613f56 (patch) | |
tree | 32477b48cc10073e948eb7b85877dc5a0746749d /net/ipv6 | |
parent | Merge branch 'lan78xx-napi' (diff) | |
parent | Merge tag 'net-5.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff) | |
download | linux-50fc24944a2a0ef5aab571dcac17f6c5f2613f56.tar.xz linux-50fc24944a2a0ef5aab571dcac17f6c5f2613f56.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/esp6.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index ed2f061b8768..f0bac6f7ab6b 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c @@ -808,6 +808,12 @@ int esp6_input_done2(struct sk_buff *skb, int err) struct tcphdr *th; offset = ipv6_skip_exthdr(skb, offset, &nexthdr, &frag_off); + + if (offset < 0) { + err = -EINVAL; + goto out; + } + uh = (void *)(skb->data + offset); th = (void *)(skb->data + offset); hdr_len += offset; |