summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-11-18 13:13:16 -0800
committerJakub Kicinski <kuba@kernel.org>2021-11-18 13:13:16 -0800
commit50fc24944a2a0ef5aab571dcac17f6c5f2613f56 (patch)
tree32477b48cc10073e948eb7b85877dc5a0746749d /net/ipv4/tcp.c
parentbb8cecf8ba127abca8ccd102207a59c55fdae515 (diff)
parent8d0112ac6fd001f95aabb084ec2ccaa3637bc344 (diff)
downloadlinux-50fc24944a2a0ef5aab571dcac17f6c5f2613f56.tar.bz2
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index d1949fdb1462..6ab82e1a1d41 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1788,6 +1788,9 @@ static skb_frag_t *skb_advance_to_frag(struct sk_buff *skb, u32 offset_skb,
{
skb_frag_t *frag;
+ if (unlikely(offset_skb >= skb->len))
+ return NULL;
+
offset_skb -= skb_headlen(skb);
if ((int)offset_skb < 0 || skb_has_frag_list(skb))
return NULL;