From f7da2ab03a1ed9336e868eceabac57ba62d59c3e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 9 Sep 2023 23:18:05 +0100 Subject: [PATCH] fix up dccp patch for 4.19 and 4.14 --- .../dccp-fix-out-of-bounds-access-in-dccp-error-handler.patch | 4 ++-- .../dccp-fix-out-of-bounds-access-in-dccp-error-handler.patch | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/queue-4.14/dccp-fix-out-of-bounds-access-in-dccp-error-handler.patch b/queue-4.14/dccp-fix-out-of-bounds-access-in-dccp-error-handler.patch index ccf2a80abfc..6175ac58ffb 100644 --- a/queue-4.14/dccp-fix-out-of-bounds-access-in-dccp-error-handler.patch +++ b/queue-4.14/dccp-fix-out-of-bounds-access-in-dccp-error-handler.patch @@ -44,7 +44,7 @@ Signed-off-by: Greg Kroah-Hartman - BUILD_BUG_ON(offsetofend(struct dccp_hdr, dccph_dport) > 8); + dh = (struct dccp_hdr *)(skb->data + offset); + if (!pskb_may_pull(skb, offset + __dccp_basic_hdr_len(dh))) -+ return -EINVAL; ++ return; + iph = (struct iphdr *)skb->data; dh = (struct dccp_hdr *)(skb->data + offset); @@ -77,7 +77,7 @@ Signed-off-by: Greg Kroah-Hartman - BUILD_BUG_ON(offsetofend(struct dccp_hdr, dccph_dport) > 8); + dh = (struct dccp_hdr *)(skb->data + offset); + if (!pskb_may_pull(skb, offset + __dccp_basic_hdr_len(dh))) -+ return -EINVAL; ++ return; + hdr = (const struct ipv6hdr *)skb->data; dh = (struct dccp_hdr *)(skb->data + offset); diff --git a/queue-4.19/dccp-fix-out-of-bounds-access-in-dccp-error-handler.patch b/queue-4.19/dccp-fix-out-of-bounds-access-in-dccp-error-handler.patch index ccf2a80abfc..6175ac58ffb 100644 --- a/queue-4.19/dccp-fix-out-of-bounds-access-in-dccp-error-handler.patch +++ b/queue-4.19/dccp-fix-out-of-bounds-access-in-dccp-error-handler.patch @@ -44,7 +44,7 @@ Signed-off-by: Greg Kroah-Hartman - BUILD_BUG_ON(offsetofend(struct dccp_hdr, dccph_dport) > 8); + dh = (struct dccp_hdr *)(skb->data + offset); + if (!pskb_may_pull(skb, offset + __dccp_basic_hdr_len(dh))) -+ return -EINVAL; ++ return; + iph = (struct iphdr *)skb->data; dh = (struct dccp_hdr *)(skb->data + offset); @@ -77,7 +77,7 @@ Signed-off-by: Greg Kroah-Hartman - BUILD_BUG_ON(offsetofend(struct dccp_hdr, dccph_dport) > 8); + dh = (struct dccp_hdr *)(skb->data + offset); + if (!pskb_may_pull(skb, offset + __dccp_basic_hdr_len(dh))) -+ return -EINVAL; ++ return; + hdr = (const struct ipv6hdr *)skb->data; dh = (struct dccp_hdr *)(skb->data + offset); -- 2.47.3