Linux 5.7.19
Greg Kroah-Hartman
maintainer----------
Note, this is the LAST 5.7.y kernel to be released. This release series is now end-of-life, please move to 5.8.y at this point in time.
------------
I'm announcing the release of the 5.7.19 kernel.
All users of the 5.7 kernel series must upgrade.
The updated 5.7.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.7.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 +- arch/powerpc/kernel/cpu_setup_power.S | 2 +- drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 ++++- fs/binfmt_flat.c | 20 ++++++++++++-------- net/core/skbuff.c | 4 ++-- net/ethtool/features.c | 19 ++++++++++--------- net/ipv4/nexthop.c | 5 ++++- net/ipv6/ip6_tunnel.c | 10 +++++++++- net/qrtr/qrtr.c | 20 +++++++++++--------- net/sched/act_ct.c | 2 +- net/sctp/stream.c | 6 ++++-- net/smc/smc_diag.c | 16 +++++++++------- net/tipc/crypto.c | 2 ++ net/tipc/netlink_compat.c | 12 +++++++++++- 14 files changed, 81 insertions(+), 44 deletions(-)
Alaa Hleihel (1):
net/sched: act_ct: Fix skb double-free in tcf_ct_handle_fragments() error flow
Cong Wang (1):
tipc: fix uninit skb->data in tipc_nl_compat_dumpit()
David Laight (1):
net: sctp: Fix negotiation of the number of data streams.
Greg Kroah-Hartman (1):
Linux 5.7.19
Mark Tomlinson (1):
gre6: Fix reception with IP6_TNL_F_RCV_DSCP_COPY
Max Filippov (1):
binfmt_flat: revert "binfmt_flat: don't offset the data start"
Maxim Mikityanskiy (3):
ethtool: Fix preserving of wanted feature bits in netlink interface
ethtool: Account for hw_features in netlink interface
ethtool: Don't omit the netlink reply if no features were changed
Miaohe Lin (1):
net: Fix potential wrong skb->protocol in skb_vlan_untag()
Michael Ellerman (1):
powerpc/64s: Don't init FSCR_DSCR in __init_FSCR()
Necip Fazil Yildiran (1):
net: qrtr: fix usage of idr in port assignment to socket
Nikolay Aleksandrov (1):
net: nexthop: don't allow empty NHA_GROUP
Peilin Ye (1):
net/smc: Prevent kernel-infoleak in __smc_diag_dump()
Shay Agroskin (1):
net: ena: Make missed_tx stat incremental
Xin Long (1):
tipc: call rcu_read_lock() in tipc_aead_encrypt_done()
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 7 -SUBLEVEL = 18 +SUBLEVEL = 19 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/powerpc/kernel/cpu_setup_power.S +1 -1
@@ -184,7 +184,7 @@ __init_LPCR_ISA300: __init_FSCR: mfspr r3,SPRN_FSCR - ori r3,r3,FSCR_TAR|FSCR_DSCR|FSCR_EBB + ori r3,r3,FSCR_TAR|FSCR_EBB mtspr SPRN_FSCR,r3 blr
drivers/net/ethernet/amazon/ena/ena_netdev.c +4 -1
@@ -3594,7 +3594,7 @@ static int check_missing_comp_in_tx_queue(struct ena_adapter *adapter, }u64_stats_update_begin (&tx_ring->syncp); - tx_ring->tx_stats.missed_tx = missed_tx; + tx_ring->tx_stats.missed_tx += missed_tx;u64_stats_update_end (&tx_ring->syncp);return rc;
@@ -4519,6 +4519,9 @@ static void ena_keep_alive_wd(void *adapter_data, rx_drops = ((u64 )desc->rx_drops_high <<32 ) | desc->rx_drops_low;u64_stats_update_begin (&adapter->syncp); +/* These stats are accumulated by the device, so the counters indicate +* all drops since last reset. +*/ adapter->dev_stats.rx_drops = rx_drops;u64_stats_update_end (&adapter->syncp); }
fs/binfmt_flat.c +12 -8
@@ -571,7 +571,7 @@ static int load_flat_file(struct linux_binprm *bprm, goto err; } - len = data_len + extra; + len = data_len + extra +MAX_SHARED_LIBS *sizeof (unsigned long ); len =PAGE_ALIGN (len); realdatastart =vm_mmap (NULL ,0 , len,PROT_READ |PROT_WRITE |PROT_EXEC ,MAP_PRIVATE ,0 );
@@ -585,7 +585,9 @@ static int load_flat_file(struct linux_binprm *bprm,vm_munmap (textpos, text_len); goto err; } - datapos =ALIGN (realdatastart,FLAT_DATA_ALIGN ); + datapos =ALIGN (realdatastart + +MAX_SHARED_LIBS *sizeof (unsigned long ), +FLAT_DATA_ALIGN );pr_debug ("Allocated data+bss+stack (%u bytes): %lx\n" , data_len + bss_len + stack_len, datapos);
@@ -615,7 +617,7 @@ static int load_flat_file(struct linux_binprm *bprm, memp_size = len; }else { - len = text_len + data_len + extra; + len = text_len + data_len + extra +MAX_SHARED_LIBS *sizeof (u32); len =PAGE_ALIGN (len); textpos =vm_mmap (NULL ,0 , len,PROT_READ |PROT_EXEC |PROT_WRITE ,MAP_PRIVATE ,0 );
@@ -630,7 +632,9 @@ static int load_flat_file(struct linux_binprm *bprm, } realdatastart = textpos +ntohl (hdr->data_start); - datapos =ALIGN (realdatastart,FLAT_DATA_ALIGN ); + datapos =ALIGN (realdatastart + +MAX_SHARED_LIBS *sizeof (u32), +FLAT_DATA_ALIGN ); reloc = (__be32 __user *) (datapos + (ntohl (hdr->reloc_start) - text_len));
@@ -647,9 +651,8 @@ static int load_flat_file(struct linux_binprm *bprm, (text_len + full_data -sizeof (struct flat_hdr )), 0); -if (datapos != realdatastart) -memmove ((void *)datapos, (void *)realdatastart, - full_data); +memmove ((void *) datapos, (void *) realdatastart, + full_data);#else /* * This is used on MMU systems mainly for testing.
@@ -705,7 +708,8 @@ static int load_flat_file(struct linux_binprm *bprm,if (IS_ERR_VALUE (result)) { ret = result;pr_err ("Unable to read code+data+bss, errno %d\n" , ret); -vm_munmap (textpos, text_len + data_len + extra); +vm_munmap (textpos, text_len + data_len + extra + +MAX_SHARED_LIBS *sizeof (u32)); goto err; } }
net/core/skbuff.c +2 -2
@@ -5421,8 +5421,8 @@ struct sk_buff *skb_vlan_untag(struct sk_buff *skb) skb =skb_share_check (skb,GFP_ATOMIC );if (unlikely (!skb)) goto err_free; - -if (unlikely (!pskb_may_pull (skb,VLAN_HLEN ))) +/* We may access the two bytes after vlan_hdr in vlan_set_encap_proto(). */ +if (unlikely (!pskb_may_pull (skb,VLAN_HLEN +sizeof (unsigned short )))) goto err_free; vhdr = (struct vlan_hdr *)skb->data;
net/ethtool/features.c +10 -9
@@ -224,7 +224,9 @@ int ethnl_set_features(struct sk_buff *skb, struct genl_info *info)DECLARE_BITMAP (wanted_diff_mask,NETDEV_FEATURE_COUNT );DECLARE_BITMAP (active_diff_mask,NETDEV_FEATURE_COUNT );DECLARE_BITMAP (old_active,NETDEV_FEATURE_COUNT ); +DECLARE_BITMAP (old_wanted,NETDEV_FEATURE_COUNT );DECLARE_BITMAP (new_active,NETDEV_FEATURE_COUNT ); +DECLARE_BITMAP (new_wanted,NETDEV_FEATURE_COUNT );DECLARE_BITMAP (req_wanted,NETDEV_FEATURE_COUNT );DECLARE_BITMAP (req_mask,NETDEV_FEATURE_COUNT );struct nlattr *tb[ETHTOOL_A_FEATURES_MAX +1 ];
@@ -250,6 +252,7 @@ int ethnl_set_features(struct sk_buff *skb, struct genl_info *info)rtnl_lock ();ethnl_features_to_bitmap (old_active, dev->features); +ethnl_features_to_bitmap (old_wanted, dev->wanted_features); ret =ethnl_parse_bitset (req_wanted, req_mask,NETDEV_FEATURE_COUNT , tb[ETHTOOL_A_FEATURES_WANTED ], netdev_features_strings, info->extack);
@@ -261,17 +264,15 @@ int ethnl_set_features(struct sk_buff *skb, struct genl_info *info) goto out_rtnl; } -/* set req_wanted bits not in req_mask from old_active */ +/* set req_wanted bits not in req_mask from old_wanted */ bitmap_and (req_wanted, req_wanted, req_mask,NETDEV_FEATURE_COUNT ); -bitmap_andnot (new_active, old_active, req_mask,NETDEV_FEATURE_COUNT ); -bitmap_or (req_wanted, new_active, req_wanted,NETDEV_FEATURE_COUNT ); -if (bitmap_equal (req_wanted, old_active,NETDEV_FEATURE_COUNT )) { - ret =0 ; - goto out_rtnl; +bitmap_andnot (new_wanted, old_wanted, req_mask,NETDEV_FEATURE_COUNT ); +bitmap_or (req_wanted, new_wanted, req_wanted,NETDEV_FEATURE_COUNT ); +if (!bitmap_equal (req_wanted, old_wanted,NETDEV_FEATURE_COUNT )) { + dev->wanted_features &= ~dev->hw_features; + dev->wanted_features |=ethnl_bitmap_to_features (req_wanted) & dev->hw_features; +__netdev_update_features (dev); } - - dev->wanted_features =ethnl_bitmap_to_features (req_wanted); -__netdev_update_features (dev);ethnl_features_to_bitmap (new_active, dev->features); mod = !bitmap_equal (old_active, new_active,NETDEV_FEATURE_COUNT );
net/ipv4/nexthop.c +4 -1
@@ -402,7 +402,7 @@ static int nh_check_attr_group(struct net *net, struct nlattr *tb[],struct nexthop_grp *nhg;unsigned int i, j; -if (len & (sizeof (struct nexthop_grp ) -1 )) { +if (!len || len & (sizeof (struct nexthop_grp ) -1 )) {NL_SET_ERR_MSG (extack,"Invalid length for nexthop group attribute" );return -EINVAL ;
@@ -1104,6 +1104,9 @@ static struct nexthop *nexthop_create_group(struct net *net,struct nexthop *nh;int i; +if (WARN_ON (!num_nh)) +return ERR_PTR (-EINVAL ); + nh =nexthop_alloc ();if (!nh)return ERR_PTR (-ENOMEM );
net/ipv6/ip6_tunnel.c +9 -1
@@ -886,7 +886,15 @@ int ip6_tnl_rcv(struct ip6_tnl *t, struct sk_buff *skb, struct metadata_dst *tun_dst, bool log_ecn_err) { - return __ip6_tnl_rcv(t, skb, tpi, tun_dst, ip6ip6_dscp_ecn_decapsulate, +int (*dscp_ecn_decapsulate)(const struct ip6_tnl *t, +const struct ipv6hdr *ipv6h, +struct sk_buff *skb); + + dscp_ecn_decapsulate = ip6ip6_dscp_ecn_decapsulate; +if (tpi->proto ==htons (ETH_P_IP )) + dscp_ecn_decapsulate = ip4ip6_dscp_ecn_decapsulate; + +return __ip6_tnl_rcv (t, skb, tpi, tun_dst, dscp_ecn_decapsulate, log_ecn_err); }EXPORT_SYMBOL (ip6_tnl_rcv);
net/qrtr/qrtr.c +11 -9
@@ -692,23 +692,25 @@ static void qrtr_port_remove(struct qrtr_sock *ipc)*/ static int qrtr_port_assign (struct qrtr_sock *ipc,int *port) { +u32 min_port;int rc;mutex_lock (&qrtr_port_lock);if (!*port) { - rc =idr_alloc (&qrtr_ports, ipc, -QRTR_MIN_EPH_SOCKET ,QRTR_MAX_EPH_SOCKET +1 , -GFP_ATOMIC ); -if (rc >=0 ) - *port = rc; + min_port =QRTR_MIN_EPH_SOCKET ; + rc =idr_alloc_u32 (&qrtr_ports, ipc, &min_port,QRTR_MAX_EPH_SOCKET ,GFP_ATOMIC ); +if (!rc) + *port = min_port; }else if (*port <QRTR_MIN_EPH_SOCKET && !capable (CAP_NET_ADMIN )) { rc = -EACCES ; }else if (*port ==QRTR_PORT_CTRL ) { - rc =idr_alloc (&qrtr_ports, ipc,0 ,1 ,GFP_ATOMIC ); + min_port =0 ; + rc =idr_alloc_u32 (&qrtr_ports, ipc, &min_port,0 ,GFP_ATOMIC ); }else { - rc =idr_alloc (&qrtr_ports, ipc, *port, *port +1 ,GFP_ATOMIC ); -if (rc >=0 ) - *port = rc; + min_port = *port; + rc =idr_alloc_u32 (&qrtr_ports, ipc, &min_port, *port,GFP_ATOMIC ); +if (!rc) + *port = min_port; }mutex_unlock (&qrtr_port_lock);
net/sched/act_ct.c +1 -1
@@ -702,7 +702,7 @@ static int tcf_ct_handle_fragments(struct net *net, struct sk_buff *skb, err =ip_defrag (net, skb, user);local_bh_enable ();if (err && err != -EINPROGRESS ) - goto out_free; +return err;if (!err) { *defrag = true;
net/sctp/stream.c +4 -2
@@ -88,12 +88,13 @@ static int sctp_stream_alloc_out(struct sctp_stream *stream, __u16 outcnt,int ret;if (outcnt <= stream->outcnt) -return 0 ; + goto out; ret =genradix_prealloc (&stream->out, outcnt, gfp);if (ret)return ret; +out: stream->outcnt = outcnt;return 0 ; }
@@ -104,12 +105,13 @@ static int sctp_stream_alloc_in(struct sctp_stream *stream, __u16 incnt,int ret;if (incnt <= stream->incnt) -return 0 ; + goto out; ret =genradix_prealloc (&stream->in, incnt, gfp);if (ret)return ret; +out: stream->incnt = incnt;return 0 ; }
net/smc/smc_diag.c +9 -7
@@ -170,13 +170,15 @@ static int __smc_diag_dump(struct sock *sk, struct sk_buff *skb, (req->diag_ext & (1 << (SMC_DIAG_DMBINFO - 1))) && !list_empty(&smc->conn.lgr->list)) {struct smc_connection *conn = &smc->conn; -struct smcd_diag_dmbinfo dinfo = { - .linkid = *((u32 *)conn->lgr->id), - .peer_gid = conn->lgr->peer_gid, - .my_gid = conn->lgr->smcd->local_gid, - .token = conn->rmb_desc->token, - .peer_token = conn->peer_token - }; +struct smcd_diag_dmbinfo dinfo; + +memset (&dinfo,0 ,sizeof (dinfo)); + + dinfo.linkid = *((u32 *)conn->lgr->id); + dinfo.peer_gid = conn->lgr->peer_gid; + dinfo.my_gid = conn->lgr->smcd->local_gid; + dinfo.token = conn->rmb_desc->token; + dinfo.peer_token = conn->peer_token;if (nla_put (skb,SMC_DIAG_DMBINFO ,sizeof (dinfo), &dinfo) <0 ) goto errout;
net/tipc/crypto.c +2 -0
@@ -757,10 +757,12 @@ static void tipc_aead_encrypt_done(struct crypto_async_request *base, int err)switch (err) {case 0 :this_cpu_inc (tx->stats->stat[STAT_ASYNC_OK ]); +rcu_read_lock ();if (likely (test_bit (0 , &b->up))) b->media->send_msg (net, skb, b, &tx_ctx->dst);else kfree_skb (skb); +rcu_read_unlock ();break ;case -EINPROGRESS :return ;
net/tipc/netlink_compat.c +11 -1
@@ -275,8 +275,9 @@ static int __tipc_nl_compat_dumpit(struct tipc_nl_compat_cmd_dump *cmd,static int tipc_nl_compat_dumpit (struct tipc_nl_compat_cmd_dump *cmd,struct tipc_nl_compat_msg *msg) { -int err; +struct nlmsghdr *nlh;struct sk_buff *arg; +int err;if (msg->req_type && (!msg->req_size || !TLV_CHECK_TYPE (msg->req, msg->req_type)))
@@ -305,6 +306,15 @@ static int tipc_nl_compat_dumpit(struct tipc_nl_compat_cmd_dump *cmd,return -ENOMEM ; } + nlh =nlmsg_put (arg,0 ,0 , tipc_genl_family.id,0 ,NLM_F_MULTI ); +if (!nlh) { +kfree_skb (arg); +kfree_skb (msg->rep); + msg->rep =NULL ; +return -EMSGSIZE ; + } +nlmsg_end (arg, nlh); + err =__tipc_nl_compat_dumpit (cmd, msg, arg);if (err) {kfree_skb (msg->rep);