diff --git linux-libre-7.0.4-gnu/Makefile linux-libre-7.0.5-gnu/Makefile
index 0f89ad429b18..8adec8642c8a 100644
--- linux-libre-7.0.4-gnu/Makefile
+++ linux-libre-7.0.5-gnu/Makefile
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 7
 PATCHLEVEL = 0
-SUBLEVEL = 4
+SUBLEVEL = 5
 EXTRAVERSION = -gnu
 NAME = Baby Opossum Posse
 
diff --git linux-libre-7.0.4-gnu/net/ipv4/esp4.c linux-libre-7.0.5-gnu/net/ipv4/esp4.c
index 6dfc0bcdef65..6a5febbdbee4 100644
--- linux-libre-7.0.4-gnu/net/ipv4/esp4.c
+++ linux-libre-7.0.5-gnu/net/ipv4/esp4.c
@@ -873,7 +873,8 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb)
 			nfrags = 1;
 
 			goto skip_cow;
-		} else if (!skb_has_frag_list(skb)) {
+		} else if (!skb_has_frag_list(skb) &&
+			   !skb_has_shared_frag(skb)) {
 			nfrags = skb_shinfo(skb)->nr_frags;
 			nfrags++;
 
diff --git linux-libre-7.0.4-gnu/net/ipv4/ip_output.c linux-libre-7.0.5-gnu/net/ipv4/ip_output.c
index e4790cc7b5c2..5bcd73cbdb41 100644
--- linux-libre-7.0.4-gnu/net/ipv4/ip_output.c
+++ linux-libre-7.0.5-gnu/net/ipv4/ip_output.c
@@ -1233,6 +1233,8 @@ alloc_new_skb:
 			if (err < 0)
 				goto error;
 			copy = err;
+			if (!(flags & MSG_NO_SHARED_FRAGS))
+				skb_shinfo(skb)->flags |= SKBFL_SHARED_FRAG;
 			wmem_alloc_delta += copy;
 		} else if (!zc) {
 			int i = skb_shinfo(skb)->nr_frags;
diff --git linux-libre-7.0.4-gnu/net/ipv6/esp6.c linux-libre-7.0.5-gnu/net/ipv6/esp6.c
index 9f75313734f8..9c06c5a1419d 100644
--- linux-libre-7.0.4-gnu/net/ipv6/esp6.c
+++ linux-libre-7.0.5-gnu/net/ipv6/esp6.c
@@ -915,7 +915,8 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
 			nfrags = 1;
 
 			goto skip_cow;
-		} else if (!skb_has_frag_list(skb)) {
+		} else if (!skb_has_frag_list(skb) &&
+			   !skb_has_shared_frag(skb)) {
 			nfrags = skb_shinfo(skb)->nr_frags;
 			nfrags++;
 
diff --git linux-libre-7.0.4-gnu/net/ipv6/ip6_output.c linux-libre-7.0.5-gnu/net/ipv6/ip6_output.c
index 8e2a6b28cea7..3f14e363c96e 100644
--- linux-libre-7.0.4-gnu/net/ipv6/ip6_output.c
+++ linux-libre-7.0.5-gnu/net/ipv6/ip6_output.c
@@ -1765,6 +1765,8 @@ alloc_new_skb:
 			if (err < 0)
 				goto error;
 			copy = err;
+			if (!(flags & MSG_NO_SHARED_FRAGS))
+				skb_shinfo(skb)->flags |= SKBFL_SHARED_FRAG;
 			wmem_alloc_delta += copy;
 		} else if (!zc) {
 			int i = skb_shinfo(skb)->nr_frags;
