Linux 4.16.2
Greg KH
maintainerI'm announcing the release of the 4.16.2 kernel.
All users of the 4.16 kernel series must upgrade.
The updated 4.16.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.16.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 +- drivers/net/ethernet/marvell/sky2.c | 2 +- drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 9 +++++---- drivers/net/ppp/pptp.c | 1 - drivers/sbus/char/Kconfig | 3 ++- net/8021q/vlan_dev.c | 6 +++++- net/core/dev.c | 2 +- net/dsa/dsa_priv.h | 8 +++++++- net/ipv4/arp.c | 2 +- net/ipv4/ip_tunnel.c | 11 ++++++----- net/ipv6/ip6_gre.c | 8 +++++--- net/ipv6/ip6_output.c | 7 +++++-- net/ipv6/ip6_tunnel.c | 11 +++++++---- net/ipv6/ip6_vti.c | 7 +++++-- net/ipv6/sit.c | 8 +++++--- net/sched/act_bpf.c | 12 ++++++++---- net/sched/cls_u32.c | 1 + net/sctp/ipv6.c | 4 +++- net/sctp/socket.c | 13 ++++++++----- 19 files changed, 76 insertions(+), 41 deletions(-)
Andrew Lunn (1):
net: dsa: Discard frames from unused ports
Cong Wang (1):
net_sched: fix a missing idr_remove() in u32_delete_key()
Davide Caratti (1):
net/sched: fix NULL dereference in the error path of tcf_bpf_init()
Dirk van der Merwe (1):
nfp: use full 40 bits of the NSP buffer address
Eric Dumazet (9):
pptp: remove a buggy dst release in pptp_connect()
sctp: do not leak kernel memory to user space
sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6
net: fool proof dev_valid_name()
ip_tunnel: better validate user provided tunnel names
ipv6: sit: better validate user provided tunnel names
ip6_gre: better validate user provided tunnel names
ip6_tunnel: better validate user provided tunnel names
vti6: better validate user provided tunnel names
Greg Kroah-Hartman (1):
Linux 4.16.2
Guenter Roeck (1):
sparc64: Oracle DAX driver depends on SPARC64
Hangbin Liu (1):
vlan: also check phy_driver ts_info for vlan's real device
Jeff Barnhill (1):
net/ipv6: Increment OUTxxx counters after netfilter hook
Kai-Heng Feng (1):
sky2: Increase D3 delay to sky2 stops working after suspend
Miguel Fadon Perlines (1):
arp: fix arp_filter on l3slave devices
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 16 -SUBLEVEL = 1 +SUBLEVEL = 2 EXTRAVERSION = NAME = Fearless Coyote
drivers/net/ethernet/marvell/sky2.c +1 -1
@@ -5087,7 +5087,7 @@ static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)INIT_WORK (&hw->restart_work, sky2_restart);pci_set_drvdata (pdev, hw); - pdev->d3_delay =150 ; + pdev->d3_delay =200 ;return 0 ;
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c +5 -4
@@ -71,10 +71,11 @@/* CPP address to retrieve the data from */ #define NSP_BUFFER 0x10#define NSP_BUFFER_CPP GENMASK_ULL(63, 40) -#define NSP_BUFFER_PCIE GENMASK_ULL(39, 38) -#define NSP_BUFFER_ADDRESS GENMASK_ULL(37, 0) +#define NSP_BUFFER_ADDRESS GENMASK_ULL(39, 0)#define NSP_DFLT_BUFFER 0x18 +#define NSP_DFLT_BUFFER_CPP GENMASK_ULL(63, 40) +#define NSP_DFLT_BUFFER_ADDRESS GENMASK_ULL(39, 0)#define NSP_DFLT_BUFFER_CONFIG 0x20#define NSP_DFLT_BUFFER_SIZE_MB GENMASK_ULL(7, 0)
@@ -427,8 +428,8 @@ __nfp_nsp_command_buf(struct nfp_nsp *nsp, u16 code, u32 option,if (err <0 )return err; - cpp_id =FIELD_GET (NSP_BUFFER_CPP , reg) <<8 ; - cpp_buf =FIELD_GET (NSP_BUFFER_ADDRESS , reg); + cpp_id =FIELD_GET (NSP_DFLT_BUFFER_CPP , reg) <<8 ; + cpp_buf =FIELD_GET (NSP_DFLT_BUFFER_ADDRESS , reg);if (in_buf && in_size) { err =nfp_cpp_write (cpp, cpp_id, cpp_buf, in_buf, in_size);
drivers/net/ppp/pptp.c +0 -1
@@ -464,7 +464,6 @@ static int pptp_connect(struct socket *sock, struct sockaddr *uservaddr, po->chan.mtu =dst_mtu (&rt->dst);if (!po->chan.mtu) po->chan.mtu =PPP_MRU ; -ip_rt_put (rt); po->chan.mtu -=PPTP_HEADER_OVERHEAD ; po->chan.hdrlen =2 +sizeof (struct pptp_gre_header );
drivers/sbus/char/Kconfig +2 -1
@@ -72,7 +72,8 @@ config DISPLAY7SEG config ORACLE_DAX tristate "Oracle Data Analytics Accelerator" - default m if SPARC64 + depends on SPARC64 + default m help Driver for Oracle Data Analytics Accelerator, which is a coprocessor that performs database operations in hardware.
net/8021q/vlan_dev.c +5 -1
@@ -29,6 +29,7 @@#include <linux/net_tstamp.h> #include <linux/etherdevice.h> #include <linux/ethtool.h> +#include <linux/phy.h> #include <net/arp.h> #include <net/switchdev.h>
@@ -665,8 +666,11 @@ static int vlan_ethtool_get_ts_info(struct net_device *dev, {const struct vlan_dev_priv *vlan =vlan_dev_priv (dev);const struct ethtool_ops *ops = vlan->real_dev->ethtool_ops; +struct phy_device *phydev = vlan->real_dev->phydev; -if (ops->get_ts_info) { +if (phydev && phydev->drv && phydev->drv->ts_info) { +return phydev->drv->ts_info (phydev, info); + }else if (ops->get_ts_info) {return ops->get_ts_info (vlan->real_dev, info); }else { info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
net/core/dev.c +1 -1
@@ -1027,7 +1027,7 @@ bool dev_valid_name(const char *name) {if (*name =='\0' )return false; -if (strlen (name) >=IFNAMSIZ ) +if (strnlen (name,IFNAMSIZ ) ==IFNAMSIZ )return false;if (!strcmp (name,"." ) || !strcmp (name,".." ))return false;
net/dsa/dsa_priv.h +7 -1
@@ -126,6 +126,7 @@ static inline struct net_device *dsa_master_find_slave(struct net_device *dev,struct dsa_port *cpu_dp = dev->dsa_ptr;struct dsa_switch_tree *dst = cpu_dp->dst;struct dsa_switch *ds; +struct dsa_port *slave_port;if (device <0 || device >=DSA_MAX_SWITCHES )return NULL ;
@@ -137,7 +138,12 @@ static inline struct net_device *dsa_master_find_slave(struct net_device *dev,if (port <0 || port >= ds->num_ports)return NULL ; -return ds->ports[port].slave; + slave_port = &ds->ports[port]; + +if (unlikely (slave_port->type !=DSA_PORT_TYPE_USER )) +return NULL ; + +return slave_port->slave; }/* port.c */
net/ipv4/arp.c +1 -1
@@ -437,7 +437,7 @@ static int arp_filter(__be32 sip, __be32 tip, struct net_device *dev)/*unsigned long now; */ struct net *net =dev_net (dev); - rt =ip_route_output (net, sip, tip,0 ,0 ); + rt =ip_route_output (net, sip, tip,0 ,l3mdev_master_ifindex_rcu (dev));if (IS_ERR (rt))return 1 ;if (rt->dst.dev != dev) {
net/ipv4/ip_tunnel.c +6 -5
@@ -253,13 +253,14 @@ static struct net_device *__ip_tunnel_create(struct net *net,struct net_device *dev;char name[IFNAMSIZ ]; -if (parms->name[0 ]) + err = -E2BIG ; +if (parms->name[0 ]) { +if (!dev_valid_name (parms->name)) + goto failed;strlcpy (name, parms->name,IFNAMSIZ ); -else { -if (strlen (ops->kind) > (IFNAMSIZ -3 )) { - err = -E2BIG ; + }else { +if (strlen (ops->kind) > (IFNAMSIZ -3 )) goto failed; - }strlcpy (name, ops->kind,IFNAMSIZ );strncat (name,"%d" ,2 ); }
net/ipv6/ip6_gre.c +5 -3
@@ -335,11 +335,13 @@ static struct ip6_tnl *ip6gre_tunnel_locate(struct net *net,if (t || !create)return t; -if (parms->name[0 ]) +if (parms->name[0 ]) { +if (!dev_valid_name (parms->name)) +return NULL ;strlcpy (name, parms->name,IFNAMSIZ ); -else + }else {strcpy (name,"ip6gre%d" ); - + } dev =alloc_netdev (sizeof (*t), name,NET_NAME_UNKNOWN , ip6gre_tunnel_setup);if (!dev)
net/ipv6/ip6_output.c +5 -2
@@ -375,6 +375,11 @@ static int ip6_forward_proxy_check(struct sk_buff *skb)static inline int ip6_forward_finish (struct net *net,struct sock *sk,struct sk_buff *skb) { +struct dst_entry *dst =skb_dst (skb); + +__IP6_INC_STATS (net,ip6_dst_idev (dst),IPSTATS_MIB_OUTFORWDATAGRAMS ); +__IP6_ADD_STATS (net,ip6_dst_idev (dst),IPSTATS_MIB_OUTOCTETS , skb->len); +return dst_output (net, sk, skb); }
@@ -569,8 +574,6 @@ int ip6_forward(struct sk_buff *skb) hdr->hop_limit--; -__IP6_INC_STATS (net,ip6_dst_idev (dst),IPSTATS_MIB_OUTFORWDATAGRAMS ); -__IP6_ADD_STATS (net,ip6_dst_idev (dst),IPSTATS_MIB_OUTOCTETS , skb->len);return NF_HOOK (NFPROTO_IPV6 ,NF_INET_FORWARD , net,NULL , skb, skb->dev, dst->dev, ip6_forward_finish);
net/ipv6/ip6_tunnel.c +7 -4
@@ -297,13 +297,16 @@ static struct ip6_tnl *ip6_tnl_create(struct net *net, struct __ip6_tnl_parm *p)struct net_device *dev;struct ip6_tnl *t;char name[IFNAMSIZ ]; -int err = -ENOMEM ; +int err = -E2BIG ; -if (p->name[0 ]) +if (p->name[0 ]) { +if (!dev_valid_name (p->name)) + goto failed;strlcpy (name, p->name,IFNAMSIZ ); -else + }else {sprintf (name,"ip6tnl%%d" ); - + } + err = -ENOMEM ; dev =alloc_netdev (sizeof (*t), name,NET_NAME_UNKNOWN , ip6_tnl_dev_setup);if (!dev)
net/ipv6/ip6_vti.c +5 -2
@@ -212,10 +212,13 @@ static struct ip6_tnl *vti6_tnl_create(struct net *net, struct __ip6_tnl_parm *pchar name[IFNAMSIZ ];int err; -if (p->name[0 ]) +if (p->name[0 ]) { +if (!dev_valid_name (p->name)) + goto failed;strlcpy (name, p->name,IFNAMSIZ ); -else + }else {sprintf (name,"ip6_vti%%d" ); + } dev =alloc_netdev (sizeof (*t), name,NET_NAME_UNKNOWN , vti6_dev_setup);if (!dev)
net/ipv6/sit.c +5 -3
@@ -250,11 +250,13 @@ static struct ip_tunnel *ipip6_tunnel_locate(struct net *net,if (!create) goto failed; -if (parms->name[0 ]) +if (parms->name[0 ]) { +if (!dev_valid_name (parms->name)) + goto failed;strlcpy (name, parms->name,IFNAMSIZ ); -else + }else {strcpy (name,"sit%d" ); - + } dev =alloc_netdev (sizeof (*t), name,NET_NAME_UNKNOWN , ipip6_tunnel_setup);if (!dev)
net/sched/act_bpf.c +8 -4
@@ -248,10 +248,14 @@ static int tcf_bpf_init_from_efd(struct nlattr **tb, struct tcf_bpf_cfg *cfg)static void tcf_bpf_cfg_cleanup (const struct tcf_bpf_cfg *cfg) { -if (cfg->is_ebpf) -bpf_prog_put (cfg->filter); -else -bpf_prog_destroy (cfg->filter); +struct bpf_prog *filter = cfg->filter; + +if (filter) { +if (cfg->is_ebpf) +bpf_prog_put (filter); +else +bpf_prog_destroy (filter); + }kfree (cfg->bpf_ops);kfree (cfg->bpf_name);
net/sched/cls_u32.c +1 -0
@@ -489,6 +489,7 @@ static int u32_delete_key(struct tcf_proto *tp, struct tc_u_knode *key)RCU_INIT_POINTER (*kp, key->next);tcf_unbind_filter (tp, &key->res); +idr_remove (&ht->handle_idr, key->handle);tcf_exts_get_net (&key->exts);call_rcu (&key->rcu, u32_delete_key_freepf_rcu);return 0 ;
net/sctp/ipv6.c +3 -1
@@ -728,8 +728,10 @@ static int sctp_v6_addr_to_user(struct sctp_sock *sp, union sctp_addr *addr)sctp_v6_map_v4 (addr); } -if (addr->sa.sa_family ==AF_INET ) +if (addr->sa.sa_family ==AF_INET ) { +memset (addr->v4.sin_zero,0 ,sizeof (addr->v4.sin_zero));return sizeof (struct sockaddr_in ); + }return sizeof (struct sockaddr_in6 ); }
net/sctp/socket.c +8 -5
@@ -354,11 +354,14 @@ static struct sctp_af *sctp_sockaddr_af(struct sctp_sock *opt,if (!opt->pf->af_supported (addr->sa.sa_family, opt))return NULL ; -/* V4 mapped address are really of AF_INET family */ -if (addr->sa.sa_family ==AF_INET6 && -ipv6_addr_v4mapped (&addr->v6.sin6_addr) && - !opt->pf->af_supported (AF_INET , opt)) -return NULL ; +if (addr->sa.sa_family ==AF_INET6 ) { +if (len <SIN6_LEN_RFC2133 ) +return NULL ; +/* V4 mapped address are really of AF_INET family */ +if (ipv6_addr_v4mapped (&addr->v6.sin6_addr) && + !opt->pf->af_supported (AF_INET , opt)) +return NULL ; + }/* If we get this far, af is valid. */ af =sctp_get_af_specific (addr->sa.sa_family);