Linux 6.6.159
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.6.159 kernel.
All users of the 6.6 kernel series must upgrade.
The updated 6.6.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.6.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 +- include/net/ip.h | 7 +++++++ net/bridge/netfilter/nf_conntrack_bridge.c | 10 +++++++--- net/core/dev.c | 1 + net/ipv4/af_inet.c | 2 +- net/ipv4/ip_output.c | 10 +++++++--- net/ipv4/tcp_ipv4.c | 2 +- net/netfilter/nfnetlink_queue.c | 19 +++++++++++++++++-- net/netfilter/xt_CHECKSUM.c | 6 +++++- net/xfrm/xfrm_output.c | 16 +++++++++++----- 10 files changed, 58 insertions(+), 17 deletions(-)
Antonio Ojea (1):
netfilter: nfnetlink_queue: unbreak SCTP traffic
Eric Dumazet (1):
ipv4: free inet_opt and ireq_opt after an RCU grace period
Greg Kroah-Hartman (1):
Linux 6.6.159
Michael S. Tsirkin (1):
ipv4: validate checksum_start before completing checksum
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 6 -SUBLEVEL = 158 +SUBLEVEL = 159 EXTRAVERSION = NAME = Pinguïn Aangedreven
include/net/ip.h +7 -0
@@ -72,6 +72,13 @@ static inline unsigned int ip_hdrlen(const struct sk_buff *skb)return ip_hdr (skb)->ihl *4 ; } +static inline int ip_check_csum_start (const struct sk_buff *skb) +{ +if (unlikely (skb->csum_start < skb->network_header +ip_hdrlen (skb))) +return -EINVAL ; +return 0 ; +} +struct ipcm_cookie {struct sockcm_cookie sockc;__be32 addr;
net/bridge/netfilter/nf_conntrack_bridge.c +7 -3
@@ -40,9 +40,13 @@ static int nf_br_ip_fragment(struct net *net, struct sock *sk,int err =0 ;/* for offloaded checksums cleanup checksum before fragmentation */ -if (skb->ip_summed ==CHECKSUM_PARTIAL && - (err =skb_checksum_help (skb))) - goto blackhole; +if (skb->ip_summed ==CHECKSUM_PARTIAL ) { + err =ip_check_csum_start (skb); +if (!err) + err =skb_checksum_help (skb); +if (err) + goto blackhole; + } iph =ip_hdr (skb);
net/core/dev.c +1 -0
@@ -3431,6 +3431,7 @@ int skb_crc32c_csum_help(struct sk_buff *skb) out:return ret; } +EXPORT_SYMBOL (skb_crc32c_csum_help);__be16 skb_network_protocol (struct sk_buff *skb,int *depth) {
net/ipv4/af_inet.c +1 -1
@@ -154,7 +154,7 @@ void inet_sock_destruct(struct sock *sk)WARN_ON_ONCE (sk->sk_wmem_queued);WARN_ON_ONCE (sk_forward_alloc_get (sk)); -kfree (rcu_dereference_protected (inet->inet_opt,1 )); +kfree_rcu (rcu_dereference_protected (inet->inet_opt,1 ), rcu);dst_release (rcu_dereference_protected (sk->sk_dst_cache,1 ));dst_release (rcu_dereference_protected (sk->sk_rx_dst,1 )); }
net/ipv4/ip_output.c +7 -3
@@ -778,9 +778,13 @@ int ip_do_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,int err =0 ;/* for offloaded checksums cleanup checksum before fragmentation */ -if (skb->ip_summed ==CHECKSUM_PARTIAL && - (err =skb_checksum_help (skb))) - goto fail; +if (skb->ip_summed ==CHECKSUM_PARTIAL ) { + err =ip_check_csum_start (skb); +if (!err) + err =skb_checksum_help (skb); +if (err) + goto fail; + }/* * Point into the IP datagram header.
net/ipv4/tcp_ipv4.c +1 -1
@@ -1059,7 +1059,7 @@ static int tcp_v4_send_synack(const struct sock *sk, struct dst_entry *dst,*/ static void tcp_v4_reqsk_destructor (struct request_sock *req) { -kfree (rcu_dereference_protected (inet_rsk (req)->ireq_opt,1 )); +kfree_rcu (rcu_dereference_protected (inet_rsk (req)->ireq_opt,1 ), rcu); }#ifdef CONFIG_TCP_MD5SIG
net/netfilter/nfnetlink_queue.c +17 -2
@@ -31,6 +31,7 @@#include <linux/list.h> #include <linux/cgroup-defs.h> #include <net/gso.h> +#include <net/ip.h> #include <net/sock.h> #include <net/tcp_states.h> #include <net/netfilter/nf_queue.h>
@@ -385,6 +386,20 @@ static int nfqnl_put_bridge(struct nf_queue_entry *entry, struct sk_buff *skb)return -1 ; } +static int nf_queue_checksum_help (struct sk_buff *entskb) +{ +if (entskb->protocol ==htons (ETH_P_IP )) { +if (!pskb_network_may_pull (entskb,sizeof (struct iphdr )) || +ip_check_csum_start (entskb)) +return -EINVAL ; + } + +if (skb_csum_is_sctp (entskb)) +return skb_crc32c_csum_help (entskb); + +return skb_checksum_help (entskb); +} +static struct sk_buff * nfqnl_build_packet_message(struct net *net, struct nfqnl_instance *queue, struct nf_queue_entry *entry,
@@ -447,7 +462,7 @@ nfqnl_build_packet_message(struct net *net, struct nfqnl_instance *queue,case NFQNL_COPY_PACKET :if (!(queue->flags &NFQA_CFG_F_GSO ) && entskb->ip_summed ==CHECKSUM_PARTIAL && -skb_checksum_help (entskb)) +nf_queue_checksum_help (entskb))return NULL ; data_len =READ_ONCE (queue->copy_range);
@@ -859,7 +874,7 @@ nfqnl_enqueue_packet(struct nf_queue_entry *entry, unsigned int queuenum)break ; } -if ((queue->flags &NFQA_CFG_F_GSO ) || !skb_is_gso (skb)) +if (!skb_is_gso (skb) || ((queue->flags &NFQA_CFG_F_GSO ) && !skb_is_gso_sctp (skb)))return __nfqnl_enqueue_packet (net, queue, entry);nf_bridge_adjust_skb_data (skb);
net/netfilter/xt_CHECKSUM.c +5 -1
@@ -15,6 +15,7 @@#include <linux/netfilter_ipv4/ip_tables.h> #include <linux/netfilter_ipv6/ip6_tables.h> +#include <net/ip.h> MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Michael S. Tsirkin <[email protected]>" );
@@ -25,8 +26,11 @@ MODULE_ALIAS("ip6t_CHECKSUM");static unsigned int checksum_tg (struct sk_buff *skb,const struct xt_action_param *par) { -if (skb->ip_summed ==CHECKSUM_PARTIAL && !skb_is_gso (skb)) +if (skb->ip_summed ==CHECKSUM_PARTIAL && !skb_is_gso (skb)) { +if (xt_family (par) ==NFPROTO_IPV4 &&ip_check_csum_start (skb)) +return NF_DROP ;skb_checksum_help (skb); + }return XT_CONTINUE ; }
net/xfrm/xfrm_output.c +11 -5
@@ -810,16 +810,22 @@ int xfrm_output(struct sock *sk, struct sk_buff *skb) }if (skb->ip_summed ==CHECKSUM_PARTIAL ) { - err =skb_checksum_help (skb); -if (err) { -XFRM_INC_STATS (net,LINUX_MIB_XFRMOUTERROR ); -kfree_skb (skb); -return err; +if (skb->protocol ==htons (ETH_P_IP )) { + err =ip_check_csum_start (skb); +if (err) + goto error; } + err =skb_checksum_help (skb); +if (err) + goto error; } out:return xfrm_output2 (net, sk, skb); +error: +XFRM_INC_STATS (net,LINUX_MIB_XFRMOUTERROR ); +kfree_skb (skb); +return err; }EXPORT_SYMBOL_GPL (xfrm_output);