Linux 3.18.82
Greg KH
maintainerI'm announcing the release of the 3.18.82 kernel.
All users of the 3.18 kernel series must upgrade.
The updated 3.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.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 - arch/arm/boot/dts/imx53-qsb-common.dtsi | 20 +++++----- arch/powerpc/Kconfig | 5 -- arch/s390/Kconfig | 3 - arch/sparc/Kconfig | 3 - arch/x86/Kconfig | 4 -- drivers/input/misc/ims-pcu.c | 16 +++++++- drivers/net/macvtap.c | 2 + drivers/net/tun.c | 7 +++ drivers/target/iscsi/iscsi_target.c | 19 +++------- drivers/usb/misc/usbtest.c | 5 +- fs/ceph/caps.c | 5 -- include/linux/netdevice.h | 3 + include/net/tcp.h | 6 +-- include/target/target_core_base.h | 1 net/core/dev.c | 6 +-- net/ipv4/ipip.c | 59 ++++++++++++++++++++++---------- net/ipv4/tcp_output.c | 3 + net/ipv6/ip6_flowlabel.c | 1 net/ipv6/ip6_gre.c | 11 +++-- net/ipv6/ip6_output.c | 4 +- net/l2tp/l2tp_ppp.c | 3 + net/mac80211/key.c | 53 +++++++++++++++++++++++++++- net/sctp/input.c | 2 - net/sctp/socket.c | 32 +++++++++++++++++ net/unix/diag.c | 2 + security/keys/Kconfig | 4 ++ 27 files changed, 201 insertions(+), 80 deletions(-)
Alan Stern (1):
usb: usbtest: fix NULL pointer dereference
Andrei Vagin (1):
net/unix: don't show information about sockets from other namespaces
Bart Van Assche (1):
target/iscsi: Fix iSCSI task reassignment handling
Bilal Amarni (1):
security/keys: add CONFIG_KEYS_COMPAT to Kconfig
Cong Wang (1):
tun: call dev_get_valid_name() before register_netdevice()
Craig Gallek (1):
tun/tap: sanitize TUNSETSNDBUF input
Dmitry Torokhov (1):
Input: ims-psu - check if CDC union descriptor is sane
Eric Dumazet (2):
tcp: fix tcp_mtu_probe() vs highest_sack
ipv6: flowlabel: do not leave opt->tot_len with garbage
Greg Kroah-Hartman (3):
Revert "ceph: unlock dangling spinlock in try_flush_caps()" Revert "ARM: dts: imx53-qsb-common: fix FEC pinmux config" Linux 3.18.82
Guillaume Nault (1):
l2tp: check ps->sock before running pppol2tp_session_ioctl()
Jason A. Donenfeld (1):
mac80211: use constant time comparison with keys
Johannes Berg (2):
mac80211: accept key reinstall without changing anything
mac80211: don't compare TKIP TX MIC key in reinstall prevention
Julien Gomes (1):
tun: allow positive return values on dev_get_valid_name() call
Xin Long (4):
sctp: add the missing sock_owned_by_user check in sctp_icmp_redirect
sctp: reset owner sk for data chunks on out queues when migrating a sock
ipip: only increase err_count for some certain type icmp in ipip_err
ip6_gre: only increase err_count for some certain type icmpv6 in ip6gre_err
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 18 -SUBLEVEL = 81 +SUBLEVEL = 82 EXTRAVERSION = NAME = Diseased Newt
arch/arm/boot/dts/imx53-qsb-common.dtsi +10 -10
@@ -215,16 +215,16 @@ pinctrl_fec: fecgrp { fsl,pins = < - MX53_PAD_FEC_MDC__FEC_MDC 0x4 - MX53_PAD_FEC_MDIO__FEC_MDIO 0x1fc - MX53_PAD_FEC_REF_CLK__FEC_TX_CLK 0x180 - MX53_PAD_FEC_RX_ER__FEC_RX_ER 0x180 - MX53_PAD_FEC_CRS_DV__FEC_RX_DV 0x180 - MX53_PAD_FEC_RXD1__FEC_RDATA_1 0x180 - MX53_PAD_FEC_RXD0__FEC_RDATA_0 0x180 - MX53_PAD_FEC_TX_EN__FEC_TX_EN 0x4 - MX53_PAD_FEC_TXD1__FEC_TDATA_1 0x4 - MX53_PAD_FEC_TXD0__FEC_TDATA_0 0x4 + MX53_PAD_FEC_MDC__FEC_MDC 0x80000000 + MX53_PAD_FEC_MDIO__FEC_MDIO 0x80000000 + MX53_PAD_FEC_REF_CLK__FEC_TX_CLK 0x80000000 + MX53_PAD_FEC_RX_ER__FEC_RX_ER 0x80000000 + MX53_PAD_FEC_CRS_DV__FEC_RX_DV 0x80000000 + MX53_PAD_FEC_RXD1__FEC_RDATA_1 0x80000000 + MX53_PAD_FEC_RXD0__FEC_RDATA_0 0x80000000 + MX53_PAD_FEC_TX_EN__FEC_TX_EN 0x80000000 + MX53_PAD_FEC_TXD1__FEC_TDATA_1 0x80000000 + MX53_PAD_FEC_TXD0__FEC_TDATA_0 0x80000000 >; };
arch/powerpc/Kconfig +0 -5
@@ -1070,11 +1070,6 @@ source "arch/powerpc/Kconfig.debug" source "security/Kconfig" -config KEYS_COMPAT - bool - depends on COMPAT && KEYS - default y - source "crypto/Kconfig" config PPC_LIB_RHEAP
arch/s390/Kconfig +0 -3
@@ -332,9 +332,6 @@ config COMPAT config SYSVIPC_COMPAT def_bool y if COMPAT && SYSVIPC -config KEYS_COMPAT - def_bool y if COMPAT && KEYS - config SMP def_bool y prompt "Symmetric multi-processing support"
arch/sparc/Kconfig +0 -3
@@ -542,9 +542,6 @@ config SYSVIPC_COMPAT depends on COMPAT && SYSVIPC default y -config KEYS_COMPAT - def_bool y if COMPAT && KEYS - endmenu source "net/Kconfig"
arch/x86/Kconfig +0 -4
@@ -2471,10 +2471,6 @@ config COMPAT_FOR_U64_ALIGNMENT config SYSVIPC_COMPAT def_bool y depends on SYSVIPC - -config KEYS_COMPAT - def_bool y - depends on KEYS endif endmenu
drivers/input/misc/ims-pcu.c +14 -2
@@ -1635,13 +1635,25 @@ ims_pcu_get_cdc_union_desc(struct usb_interface *intf)return NULL ; } -while (buflen >0 ) { +while (buflen >=sizeof (*union_desc)) { union_desc = (struct usb_cdc_union_desc *)buf; +if (union_desc->bLength > buflen) { +dev_err (&intf->dev,"Too large descriptor\n" ); +return NULL ; + } +if (union_desc->bDescriptorType ==USB_DT_CS_INTERFACE && union_desc->bDescriptorSubType ==USB_CDC_UNION_TYPE ) {dev_dbg (&intf->dev,"Found union header\n" ); -return union_desc; + +if (union_desc->bLength >=sizeof (*union_desc)) +return union_desc; + +dev_err (&intf->dev, +"Union descriptor to short (%d vs %zd\n)" , + union_desc->bLength,sizeof (*union_desc)); +return NULL ; } buflen -= union_desc->bLength;
drivers/net/macvtap.c +2 -0
@@ -1047,6 +1047,8 @@ static long macvtap_ioctl(struct file *file, unsigned int cmd,case TUNSETSNDBUF :if (get_user (u, up))return -EFAULT ; +if (u <=0 ) +return -EINVAL ; q->sk.sk_sndbuf = u;return 0 ;
drivers/net/tun.c +7 -0
@@ -1656,6 +1656,9 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)if (!dev)return -ENOMEM ; + err =dev_get_valid_name (net, dev, name); +if (err <0 ) + goto err_free_dev;dev_net_set (dev, net); dev->rtnl_link_ops = &tun_link_ops;
@@ -2054,6 +2057,10 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd, ret = -EFAULT ;break ; } +if (sndbuf <=0 ) { + ret = -EINVAL ; +break ; + } tun->sndbuf = sndbuf;tun_set_sndbuf (tun);
drivers/target/iscsi/iscsi_target.c +7 -12
@@ -1749,7 +1749,7 @@ iscsit_handle_task_mgt_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,struct iscsi_tm *hdr;int out_of_order_cmdsn =0 , ret;bool sess_ref = false; -u8 function; +u8 function, tcm_function =TMR_UNKNOWN ; hdr = (struct iscsi_tm *) buf; hdr->flags &= ~ISCSI_FLAG_CMD_FINAL ;
@@ -1795,10 +1795,6 @@ iscsit_handle_task_mgt_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,* LIO-Target $FABRIC_MOD */ if (function !=ISCSI_TM_FUNC_TASK_REASSIGN ) { - -u8 tcm_function; -int ret; - transport_init_se_cmd(&cmd->se_cmd, &lio_target_fabric_configfs->tf_ops, conn->sess->se_sess, 0, DMA_NONE,
@@ -1835,15 +1831,14 @@ iscsit_handle_task_mgt_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,return iscsit_add_reject_cmd (cmd,ISCSI_REASON_BOOKMARK_NO_RESOURCES , buf); } - - ret =core_tmr_alloc_req (&cmd->se_cmd, cmd->tmr_req, - tcm_function,GFP_KERNEL ); -if (ret <0 ) -return iscsit_add_reject_cmd (cmd, + } + ret =core_tmr_alloc_req (&cmd->se_cmd, cmd->tmr_req, tcm_function, +GFP_KERNEL ); +if (ret <0 ) +return iscsit_add_reject_cmd (cmd,ISCSI_REASON_BOOKMARK_NO_RESOURCES , buf); - cmd->tmr_req->se_tmr_req = cmd->se_cmd.se_tmr_req; - } + cmd->tmr_req->se_tmr_req = cmd->se_cmd.se_tmr_req; cmd->iscsi_opcode =ISCSI_OP_SCSI_TMFUNC ; cmd->i_state =ISTATE_SEND_TASKMGTRSP ;
drivers/usb/misc/usbtest.c +3 -2
@@ -183,12 +183,13 @@ found:return tmp; } -if (in) { +if (in) dev->in_pipe =usb_rcvbulkpipe (udev, in->desc.bEndpointAddress &USB_ENDPOINT_NUMBER_MASK ); +if (out) dev->out_pipe =usb_sndbulkpipe (udev, out->desc.bEndpointAddress &USB_ENDPOINT_NUMBER_MASK ); - } +if (iso_in) { dev->iso_in = &iso_in->desc; dev->in_iso_pipe = usb_rcvisocpipe(udev,
fs/ceph/caps.c +1 -4
@@ -1748,7 +1748,6 @@ static int try_flush_caps(struct inode *inode, unsigned *flush_tid) retry:spin_lock (&ci->i_ceph_lock);if (ci->i_ceph_flags &CEPH_I_NOFLUSH ) { -spin_unlock (&ci->i_ceph_lock);dout ("try_flush_caps skipping %p I_NOFLUSH set\n" , inode); goto out; }
@@ -1766,10 +1765,8 @@ retry:mutex_lock (&session->s_mutex); goto retry; } -if (cap->session->s_state <CEPH_MDS_SESSION_OPEN ) { -spin_unlock (&ci->i_ceph_lock); +if (cap->session->s_state <CEPH_MDS_SESSION_OPEN ) goto out; - } flushing =__mark_caps_flushing (inode, session);
include/linux/netdevice.h +3 -0
@@ -3245,6 +3245,9 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,unsigned char name_assign_type, void (*setup)(struct net_device *), unsigned int txqs, unsigned int rxqs); +int dev_get_valid_name (struct net *net,struct net_device *dev, +const char *name); +#define alloc_netdev (sizeof_priv, name, name_assign_type, setup) \ alloc_netdev_mqs(sizeof_priv, name, name_assign_type, setup, 1, 1)
include/net/tcp.h +3 -3
@@ -1532,12 +1532,12 @@ static inline void tcp_highest_sack_reset(struct sock *sk)tcp_sk (sk)->highest_sack =tcp_write_queue_head (sk); } -/* Called when old skb is about to be deleted (to be combined with new skb) */ -static inline void tcp_highest_sack_combine (struct sock *sk, +/* Called when old skb is about to be deleted and replaced by new skb */ +static inline void tcp_highest_sack_replace (struct sock *sk,struct sk_buff *old,struct sk_buff *new) { -if (tcp_sk (sk)->sacked_out && (old ==tcp_sk (sk)->highest_sack)) +if (old ==tcp_highest_sack (sk))tcp_sk (sk)->highest_sack = new; }
include/target/target_core_base.h +1 -0
@@ -231,6 +231,7 @@ enum tcm_tmreq_table {TMR_LUN_RESET =5 ,TMR_TARGET_WARM_RESET =6 ,TMR_TARGET_COLD_RESET =7 , + TMR_UNKNOWN = 0xff, };/* fabric independent task management response values */
net/core/dev.c +3 -3
@@ -1059,9 +1059,8 @@ static int dev_alloc_name_ns(struct net *net,return ret; } -static int dev_get_valid_name (struct net *net, -struct net_device *dev, -const char *name) +int dev_get_valid_name (struct net *net,struct net_device *dev, +const char *name) {BUG_ON (!net);
@@ -1077,6 +1076,7 @@ static int dev_get_valid_name(struct net *net,return 0 ; } +EXPORT_SYMBOL (dev_get_valid_name);/** * dev_change_name - change name of a device
net/ipv4/ipip.c +42 -17
85 lines not on this page · raw message
net/ipv4/tcp_output.c +2 -1
@@ -1870,6 +1870,7 @@ static int tcp_mtu_probe(struct sock *sk) nskb->ip_summed = skb->ip_summed;tcp_insert_write_queue_before (nskb, skb, sk); +tcp_highest_sack_replace (sk, skb, nskb); len =0 ; tcp_for_write_queue_from_safe(skb, next, sk) {
@@ -2374,7 +2375,7 @@ static void tcp_collapse_retrans(struct sock *sk, struct sk_buff *skb)BUG_ON (tcp_skb_pcount (skb) !=1 ||tcp_skb_pcount (next_skb) !=1 ); -tcp_highest_sack_combine (sk, next_skb, skb); +tcp_highest_sack_replace (sk, next_skb, skb);tcp_unlink_write_queue (next_skb, sk);
net/ipv6/ip6_flowlabel.c +1 -0
@@ -316,6 +316,7 @@ struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions *opt_space, } opt_space->dst1opt = fopt->dst1opt; opt_space->opt_flen = fopt->opt_flen; + opt_space->tot_len = fopt->tot_len;return opt_space; }EXPORT_SYMBOL_GPL (fl6_merge_options);
net/ipv6/ip6_gre.c +7 -4
@@ -409,13 +409,16 @@ static void ip6gre_err(struct sk_buff *skb, struct inet6_skb_parm *opt,case ICMPV6_DEST_UNREACH :net_warn_ratelimited ("%s: Path to destination invalid or inactive!\n" , t->parms.name); -break ; +if (code !=ICMPV6_PORT_UNREACH ) +break ; +return ;case ICMPV6_TIME_EXCEED :if (code ==ICMPV6_EXC_HOPLIMIT ) {net_warn_ratelimited ("%s: Too small hop limit or routing loop in tunnel!\n" , t->parms.name); +break ; } -break ; +return ;case ICMPV6_PARAMPROB : teli =0 ;if (code ==ICMPV6_HDR_FIELD )
@@ -431,13 +434,13 @@ static void ip6gre_err(struct sk_buff *skb, struct inet6_skb_parm *opt,net_warn_ratelimited ("%s: Recipient unable to parse tunneled packet!\n" , t->parms.name); } -break ; +return ;case ICMPV6_PKT_TOOBIG : mtu =be32_to_cpu (info) - offset;if (mtu <IPV6_MIN_MTU ) mtu =IPV6_MIN_MTU ; t->dev->mtu = mtu; -break ; +return ; }if (time_before (jiffies, t->err_time +IP6TUNNEL_ERR_TIMEO ))
net/ipv6/ip6_output.c +2 -2
@@ -1177,11 +1177,11 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,if (WARN_ON (np->cork.opt))return -EINVAL ; - np->cork.opt =kzalloc (opt->tot_len, sk->sk_allocation); + np->cork.opt =kzalloc (sizeof (*opt), sk->sk_allocation);if (unlikely (np->cork.opt ==NULL ))return -ENOBUFS ; - np->cork.opt->tot_len = opt->tot_len; + np->cork.opt->tot_len =sizeof (*opt); np->cork.opt->opt_flen = opt->opt_flen; np->cork.opt->opt_nflen = opt->opt_nflen;
net/l2tp/l2tp_ppp.c +3 -0
@@ -1017,6 +1017,9 @@ static int pppol2tp_session_ioctl(struct l2tp_session *session, session->name, cmd, arg); sk = ps->sock; +if (!sk) +return -EBADR ; +sock_hold (sk);switch (cmd) {
net/mac80211/key.c +50 -3
89 lines not on this page · raw message
net/sctp/input.c +1 -1
@@ -420,7 +420,7 @@ void sctp_icmp_redirect(struct sock *sk, struct sctp_transport *t, {struct dst_entry *dst; -if (!t) +if (sock_owned_by_user (sk) || !t)return ; dst =sctp_transport_dst_check (t);if (dst)
net/sctp/socket.c +32 -0
@@ -173,6 +173,36 @@ static inline void sctp_set_owner_w(struct sctp_chunk *chunk)sk_mem_charge (sk, chunk->skb->truesize); } +static void sctp_clear_owner_w (struct sctp_chunk *chunk) +{ +skb_orphan (chunk->skb); +} + +static void sctp_for_each_tx_datachunk (struct sctp_association *asoc, +void (*cb)(struct sctp_chunk *)) + +{ +struct sctp_outq *q = &asoc->outqueue; +struct sctp_transport *t; +struct sctp_chunk *chunk; + +list_for_each_entry (t, &asoc->peer.transport_addr_list, transports) +list_for_each_entry (chunk, &t->transmitted, transmitted_list) +cb (chunk); + +list_for_each_entry (chunk, &q->retransmit, list) +cb (chunk); + +list_for_each_entry (chunk, &q->sacked, list) +cb (chunk); + +list_for_each_entry (chunk, &q->abandoned, list) +cb (chunk); + +list_for_each_entry (chunk, &q->out_chunk_list, list) +cb (chunk); +} +/* Verify that this is a valid address. */ static inline int sctp_verify_addr (struct sock *sk,union sctp_addr *addr,int len)
@@ -7367,7 +7397,9 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,* paths won't try to lock it and then oldsk. */ lock_sock_nested (newsk,SINGLE_DEPTH_NESTING ); +sctp_for_each_tx_datachunk (assoc, sctp_clear_owner_w);sctp_assoc_migrate (assoc, newsk); +sctp_for_each_tx_datachunk (assoc, sctp_set_owner_w);/* If the association on the newsk is already closed before accept() * is called, set RCV_SHUTDOWN flag.
net/unix/diag.c +2 -0
@@ -256,6 +256,8 @@ static int unix_diag_get_exact(struct sk_buff *in_skb, err = -ENOENT ;if (sk ==NULL ) goto out_nosk; +if (!net_eq (sock_net (sk), net)) + goto out; err =sock_diag_check_cookie (sk, req->udiag_cookie);if (err)
security/keys/Kconfig +4 -0
@@ -20,6 +20,10 @@ config KEYS If you are unsure as to whether this is required, answer N. +config KEYS_COMPAT + def_bool y + depends on COMPAT && KEYS + config PERSISTENT_KEYRINGS bool "Enable register of persistent per-UID keyrings" depends on KEYS