Linux 3.4.62
Greg KH
maintainerI'm announcing the release of the 3.4.62 kernel.
All users of the 3.4 kernel series must upgrade.
The updated 3.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.4.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/m32r/boot/compressed/Makefile | 6 +-- arch/m32r/boot/compressed/misc.c | 12 ++++++ arch/x86/kvm/emulate.c | 4 -- drivers/net/bonding/bond_main.c | 8 +++- drivers/net/ethernet/realtek/8139cp.c | 1 drivers/net/macvtap.c | 62 ++++++++++++++++++++-------------- drivers/net/tun.c | 6 ++- drivers/vhost/vhost.c | 1 include/linux/icmpv6.h | 2 + include/linux/ipv6.h | 1 net/bridge/br_multicast.c | 3 + net/core/neighbour.c | 10 +++-- net/core/sysctl_net_core.c | 7 +++ net/ipv4/fib_trie.c | 5 -- net/ipv4/tcp_cubic.c | 12 +++--- net/ipv6/addrconf.c | 10 ++--- net/ipv6/icmp.c | 10 ++++- net/ipv6/ip6_fib.c | 16 ++++++-- net/ipv6/ndisc.c | 16 ++++---- net/ipv6/reassembly.c | 5 ++ net/ipv6/tcp_ipv6.c | 2 - net/sched/sch_htb.c | 2 - net/tipc/eth_media.c | 15 +++++++- 24 files changed, 145 insertions(+), 73 deletions(-)
Dan Carpenter (1):
tun: signedness bug in tun_get_user()
Daniel Borkmann (2):
net: bridge: convert MLDv2 Query MRC into msecs_to_jiffies for max_delay
net: ipv6: tcp: fix potential use after free in tcp_v6_do_rcv
Dave Jones (1):
8139cp: Fix skb leak in rx_status_loop failure path.
Eric Dumazet (3):
fib_trie: remove potential out of bound access
tcp: cubic: fix overflow error in bictcp_update()
tcp: cubic: fix bug in bictcp_acked()
Geert Uytterhoeven (3):
m32r: consistently use "suffix-$(...)"
m32r: add memcpy() for CONFIG_KERNEL_GZIP=y
m32r: make memset() global for CONFIG_KERNEL_BZIP2=y
Greg Kroah-Hartman (2):
Revert "KVM: X86 emulator: fix source operand decoding for 8bit mov[zs]x instructions" Linux 3.4.62
Hannes Frederic Sowa (3):
ipv6: don't stop backtracking in fib6_lookup_1 if subtree does not match
ipv6: remove max_addresses check from ipv6_create_tempaddr
ipv6: drop packets with multiple fragmentation headers
Jason Wang (2):
vhost: zerocopy: poll vq in zerocopy callback
macvtap: do not zerocopy if iov needs more pages than MAX_SKB_FRAGS
Jiri Bohac (1):
ICMPv6: treat dest unreachable codes 5 and 6 as EACCES, not EPROTO
Roman Gushchin (1):
net: check net.core.somaxconn sysctl values
Thomas Graf (1):
ipv6: Don't depend on per socket memory for neighbour discovery messages
Veaceslav Falico (2):
neighbour: populate neigh_parms on alloc before calling ndo_neigh_setup
bonding: modify only neigh_parms owned by us
Ying Xue (1):
tipc: fix lockdep warning during bearer initialization
stephen hemminger (1):
htb: fix sign extension bug
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 4 -SUBLEVEL = 61 +SUBLEVEL = 62 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/m32r/boot/compressed/Makefile +3 -3
@@ -43,9 +43,9 @@ endif OBJCOPYFLAGS += -R .empty_zero_page -suffix_$(CONFIG_KERNEL_GZIP) = gz -suffix_$(CONFIG_KERNEL_BZIP2) = bz2 -suffix_$(CONFIG_KERNEL_LZMA) = lzma +suffix-$(CONFIG_KERNEL_GZIP) = gz +suffix-$(CONFIG_KERNEL_BZIP2) = bz2 +suffix-$(CONFIG_KERNEL_LZMA) = lzma $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE $(call if_changed,ld)
arch/m32r/boot/compressed/misc.c +11 -1
@@ -28,7 +28,7 @@ static unsigned long free_mem_ptr;static unsigned long free_mem_end_ptr;#ifdef CONFIG_KERNEL_BZIP2 -static void *memset (void *s,int c,size_t n) +void *memset (void *s,int c,size_t n) {char *ss = s;
@@ -39,6 +39,16 @@ static void *memset(void *s, int c, size_t n)#endif #ifdef CONFIG_KERNEL_GZIP +void *memcpy (void *dest,const void *src,size_t n) +{ +char *d = dest; +const char *s = src; +while (n--) + *d++ = *s++; + +return dest; +} +#define BOOT_HEAP_SIZE 0x10000#include "../../../../lib/decompress_inflate.c" #endif
arch/x86/kvm/emulate.c +0 -4
@@ -3737,10 +3737,6 @@ static int decode_operand(struct x86_emulate_ctxt *ctxt, struct operand *op,break ;case OpMem8: ctxt->memop.bytes =1 ; -if (ctxt->memop.type ==OP_REG ) { - ctxt->memop.addr.reg =decode_register (ctxt, ctxt->modrm_rm,1 ); -fetch_register_operand (&ctxt->memop); - } goto mem_common;case OpMem16: ctxt->memop.bytes =2 ;
drivers/net/bonding/bond_main.c +7 -1
@@ -3750,11 +3750,17 @@ static int bond_neigh_init(struct neighbour *n)* The bonding ndo_neigh_setup is called at init time beofre any * slave exists. So we must declare proxy setup function which will * be used at run time to resolve the actual slave neigh param setup. +* +* It's also called by master devices (such as vlans) to setup their +* underlying devices. In that case - do nothing, we're already set up from +* our init. */ static int bond_neigh_setup (struct net_device *dev,struct neigh_parms *parms) { - parms->neigh_setup = bond_neigh_init; +/* modify only our neigh_parms */ +if (parms->dev == dev) + parms->neigh_setup = bond_neigh_init;return 0 ; }
drivers/net/ethernet/realtek/8139cp.c +1 -0
@@ -524,6 +524,7 @@ rx_status_loop: PCI_DMA_FROMDEVICE);if (dma_mapping_error (&cp->pdev->dev, new_mapping)) { dev->stats.rx_dropped++; +kfree_skb (new_skb); goto rx_next; }
drivers/net/macvtap.c +37 -25
83 lines not on this page · raw message
drivers/net/tun.c +4 -2
@@ -615,8 +615,9 @@ static ssize_t tun_get_user(struct tun_struct *tun,int offset =0 ;if (!(tun->flags &TUN_NO_PI )) { -if ((len -=sizeof (pi)) > count) +if (len <sizeof (pi))return -EINVAL ; + len -=sizeof (pi);if (memcpy_fromiovecend ((void *)&pi, iv,0 ,sizeof (pi)))return -EFAULT ;
@@ -624,8 +625,9 @@ static ssize_t tun_get_user(struct tun_struct *tun, }if (tun->flags &TUN_VNET_HDR ) { -if ((len -= tun->vnet_hdr_sz) > count) +if (len < tun->vnet_hdr_sz)return -EINVAL ; + len -= tun->vnet_hdr_sz;if (memcpy_fromiovecend ((void *)&gso, iv, offset,sizeof (gso)))return -EFAULT ;
drivers/vhost/vhost.c +1 -0
@@ -1603,6 +1603,7 @@ void vhost_zerocopy_callback(struct ubuf_info *ubuf)struct vhost_ubuf_ref *ubufs = ubuf->ctx;struct vhost_virtqueue *vq = ubufs->vq; +vhost_poll_queue (&vq->poll);/* set len = 1 to mark this desc buffers done DMA */ vq->heads[ubuf->desc].len =VHOST_DMA_DONE_LEN ;kref_put (&ubufs->kref, vhost_zerocopy_done_signal);
include/linux/icmpv6.h +2 -0
@@ -123,6 +123,8 @@ static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb)#define ICMPV6_NOT_NEIGHBOUR 2#define ICMPV6_ADDR_UNREACH 3#define ICMPV6_PORT_UNREACH 4 +#define ICMPV6_POLICY_FAIL 5 +#define ICMPV6_REJECT_ROUTE 6/* * Codes for Time Exceeded
include/linux/ipv6.h +1 -0
@@ -260,6 +260,7 @@ struct inet6_skb_parm {#define IP6SKB_XFRM_TRANSFORMED 1#define IP6SKB_FORWARDED 2#define IP6SKB_REROUTED 4 +#define IP6SKB_FRAGMENTED 16 };#define IP6CB (skb) ((struct inet6_skb_parm*)((skb)->cb))
net/bridge/br_multicast.c +2 -1
@@ -1155,7 +1155,8 @@ static int br_ip6_multicast_query(struct net_bridge *br, mld2q = (struct mld2_query *)icmp6_hdr (skb);if (!mld2q->mld2q_nsrcs) group = &mld2q->mld2q_mca; - max_delay = mld2q->mld2q_mrc ?MLDV2_MRC (mld2q->mld2q_mrc) :1 ; + + max_delay =max (msecs_to_jiffies (MLDV2_MRC (ntohs (mld2q->mld2q_mrc))),1UL ); }if (!group)
net/core/neighbour.c +6 -4
@@ -1442,16 +1442,18 @@ struct neigh_parms *neigh_parms_alloc(struct net_device *dev,atomic_set (&p->refcnt,1 ); p->reachable_time =neigh_rand_reach_time (p->base_reachable_time); +dev_hold (dev); + p->dev = dev; +write_pnet (&p->net,hold_net (net)); + p->sysctl_table =NULL ;if (ops->ndo_neigh_setup && ops->ndo_neigh_setup (dev, p)) { +release_net (net); +dev_put (dev);kfree (p);return NULL ; } -dev_hold (dev); - p->dev = dev; -write_pnet (&p->net,hold_net (net)); - p->sysctl_table =NULL ;write_lock_bh (&tbl->lock); p->next = tbl->parms.next; tbl->parms.next = p;
net/core/sysctl_net_core.c +6 -1
@@ -19,6 +19,9 @@#include <net/sock.h> #include <net/net_ratelimit.h> +static int zero =0 ; +static int ushort_max =USHRT_MAX ; +#ifdef CONFIG_RPS static int rps_sock_flow_sysctl (ctl_table *table,int write,void __user *buffer,size_t *lenp,loff_t *ppos)
@@ -197,7 +200,9 @@ static struct ctl_table netns_core_table[] = { .data = &init_net.core.sysctl_somaxconn, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_dointvec + .extra1 = &zero, + .extra2 = &ushort_max, + .proc_handler = proc_dointvec_minmax }, { } };
net/ipv4/fib_trie.c +1 -4
@@ -71,7 +71,6 @@#include <linux/init.h> #include <linux/list.h> #include <linux/slab.h> -#include <linux/prefetch.h> #include <linux/export.h> #include <net/net_namespace.h> #include <net/ip.h>
@@ -1772,10 +1771,8 @@ static struct leaf *leaf_walk_rcu(struct tnode *p, struct rt_trie_node *c)if (!c)continue ; -if (IS_LEAF (c)) { -prefetch (rcu_dereference_rtnl (p->child[idx])); +if (IS_LEAF (c))return (struct leaf *) c; - }/* Rescan start scanning in new node */ p = (struct tnode *) c;
net/ipv4/tcp_cubic.c +7 -5
@@ -206,8 +206,8 @@ static u32 cubic_root(u64 a)*/ static inline void bictcp_update (struct bictcp *ca,u32 cwnd) { -u64 offs; -u32 delta, t, bic_target, max_cnt; +u32 delta, bic_target, max_cnt; +u64 offs, t; ca->ack_cnt++;/* count the number of ACKs */
@@ -250,9 +250,11 @@ static inline void bictcp_update(struct bictcp *ca, u32 cwnd)* if the cwnd < 1 million packets !!! */ + t = (s32)(tcp_time_stamp - ca->epoch_start); + t +=msecs_to_jiffies (ca->delay_min >>3 );/* change the unit from HZ to bictcp_HZ */ - t = ((tcp_time_stamp +msecs_to_jiffies (ca->delay_min>>3 ) - - ca->epoch_start) <<BICTCP_HZ ) /HZ ; + t <<=BICTCP_HZ ; +do_div (t,HZ );if (t < ca->bic_K)/* t - K */ offs = ca->bic_K - t;
@@ -414,7 +416,7 @@ static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt_us)return ;/* Discard delay samples right after fast recovery */ -if ((s32)(tcp_time_stamp - ca->epoch_start) <HZ ) +if (ca->epoch_start && (s32)(tcp_time_stamp - ca->epoch_start) <HZ )return ; delay = (rtt_us <<3 ) /USEC_PER_MSEC ;
net/ipv6/addrconf.c +4 -6
@@ -910,12 +910,10 @@ retry:if (ifp->flags &IFA_F_OPTIMISTIC ) addr_flags |=IFA_F_OPTIMISTIC ; - ift = !max_addresses || -ipv6_count_addresses (idev) < max_addresses ? -ipv6_add_addr (idev, &addr, tmp_plen, -ipv6_addr_type (&addr)&IPV6_ADDR_SCOPE_MASK , - addr_flags) :NULL ; -if (!ift ||IS_ERR (ift)) { + ift =ipv6_add_addr (idev, &addr, tmp_plen, +ipv6_addr_type (&addr)&IPV6_ADDR_SCOPE_MASK , + addr_flags); +if (IS_ERR (ift)) {in6_ifa_put (ifp);in6_dev_put (idev); printk(KERN_INFO
net/ipv6/icmp.c +9 -1
@@ -917,6 +917,14 @@ static const struct icmp6_err { .err = ECONNREFUSED, .fatal = 1, }, + {/* POLICY_FAIL */ + .err = EACCES, + .fatal = 1, + }, + {/* REJECT_ROUTE */ + .err = EACCES, + .fatal = 1, + }, };int icmpv6_err_convert (u8 type,u8 code,int *err)
@@ -928,7 +936,7 @@ int icmpv6_err_convert(u8 type, u8 code, int *err)switch (type) {case ICMPV6_DEST_UNREACH : fatal =1 ; -if (code <=ICMPV6_PORT_UNREACH ) { +if (code <ARRAY_SIZE (tab_unreach)) { *err = tab_unreach[code].err; fatal = tab_unreach[code].fatal; }
net/ipv6/ip6_fib.c +12 -4
@@ -949,14 +949,22 @@ static struct fib6_node * fib6_lookup_1(struct fib6_node *root,if (ipv6_prefix_equal (&key->addr, args->addr, key->plen)) {#ifdef CONFIG_IPV6_SUBTREES -if (fn->subtree) - fn =fib6_lookup_1 (fn->subtree, args +1 ); +if (fn->subtree) { +struct fib6_node *sfn; + sfn =fib6_lookup_1 (fn->subtree, + args +1 ); +if (!sfn) + goto backtrack; + fn = sfn; + }#endif -if (!fn || fn->fn_flags &RTN_RTINFO ) +if (fn->fn_flags &RTN_RTINFO )return fn; } } - +#ifdef CONFIG_IPV6_SUBTREES +backtrack: +#endif if (fn->fn_flags &RTN_ROOT )break ;
net/ipv6/ndisc.c +9 -7
@@ -441,7 +441,6 @@ struct sk_buff *ndisc_build_skb(struct net_device *dev,int hlen =LL_RESERVED_SPACE (dev);int tlen = dev->needed_tailroom;int len; -int err;u8 *opt;if (!dev->addr_len)
@@ -451,14 +450,12 @@ struct sk_buff *ndisc_build_skb(struct net_device *dev,if (llinfo) len +=ndisc_opt_addr_space (dev); - skb =sock_alloc_send_skb (sk, - (MAX_HEADER +sizeof (struct ipv6hdr ) + - len + hlen + tlen), -1 , &err); + skb =alloc_skb ((MAX_HEADER +sizeof (struct ipv6hdr ) + + len + hlen + tlen),GFP_ATOMIC );if (!skb) {ND_PRINTK0 (KERN_ERR -"ICMPv6 ND: %s() failed to allocate an skb, err=%d.\n" , - __func__, err); +"ICMPv6 ND: %s() failed to allocate an skb.\n" , + __func__);return NULL ; }
@@ -486,6 +483,11 @@ struct sk_buff *ndisc_build_skb(struct net_device *dev,csum_partial (hdr, len, 0)); +/* Manually assign socket ownership as we avoid calling +* sock_alloc_send_pskb() to bypass wmem buffer limits +*/ +skb_set_owner_w (skb, sk); +return skb; }
net/ipv6/reassembly.c +5 -0
@@ -516,6 +516,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev, head->tstamp = fq->q.stamp;ipv6_hdr (head)->payload_len =htons (payload_len);IP6CB (head)->nhoff = nhoff; +IP6CB (head)->flags |=IP6SKB_FRAGMENTED ;/* Yes, and fold redundant checksum back. 8) */ if (head->ip_summed ==CHECKSUM_COMPLETE )
@@ -551,6 +552,9 @@ static int ipv6_frag_rcv(struct sk_buff *skb)const struct ipv6hdr *hdr =ipv6_hdr (skb);struct net *net =dev_net (skb_dst (skb)->dev); +if (IP6CB (skb)->flags &IP6SKB_FRAGMENTED ) + goto fail_hdr; +IP6_INC_STATS_BH (net,ip6_dst_idev (skb_dst (skb)),IPSTATS_MIB_REASMREQDS );/* Jumbo payload inhibits frag. header */
@@ -571,6 +575,7 @@ static int ipv6_frag_rcv(struct sk_buff *skb) ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_REASMOKS);IP6CB (skb)->nhoff = (u8 *)fhdr -skb_network_header (skb); +IP6CB (skb)->flags |=IP6SKB_FRAGMENTED ;return 1 ; }
net/ipv6/tcp_ipv6.c +1 -1
@@ -1571,7 +1571,7 @@ ipv6_pktoptions:if (np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) np->mcast_hops =ipv6_hdr (opt_skb)->hop_limit;if (np->rxopt.bits.rxtclass) - np->rcv_tclass =ipv6_tclass (ipv6_hdr (skb)); + np->rcv_tclass =ipv6_tclass (ipv6_hdr (opt_skb));if (ipv6_opt_accepted (sk, opt_skb)) {skb_set_owner_r (opt_skb, sk); opt_skb =xchg (&np->pktoptions, opt_skb);
net/sched/sch_htb.c +1 -1
@@ -86,7 +86,7 @@ struct htb_class {unsigned int children;struct htb_class *parent;/* parent class */ -int prio;/* these two are used only by leaves... */ +u32 prio;/* these two are used only by leaves... */ int quantum;/* but stored for parent-to-leaf return */ union {
net/tipc/eth_media.c +14 -1
@@ -53,6 +53,7 @@ struct eth_bearer {struct tipc_bearer *bearer;struct net_device *dev;struct packet_type tipc_packet_type; +struct work_struct setup;struct work_struct cleanup; };
@@ -138,6 +139,17 @@ static int recv_msg(struct sk_buff *buf, struct net_device *dev, }/** +* setup_bearer - setup association between Ethernet bearer and interface +*/ +static void setup_bearer (struct work_struct *work) +{ +struct eth_bearer *eb_ptr = + container_of(work, struct eth_bearer, setup); + +dev_add_pack (&eb_ptr->tipc_packet_type); +} + +/** * enable_bearer - attach TIPC bearer to an Ethernet interface */
@@ -181,7 +193,8 @@ static int enable_bearer(struct tipc_bearer *tb_ptr) eb_ptr->tipc_packet_type.func = recv_msg; eb_ptr->tipc_packet_type.af_packet_priv = eb_ptr;INIT_LIST_HEAD (&(eb_ptr->tipc_packet_type.list)); -dev_add_pack (&eb_ptr->tipc_packet_type); +INIT_WORK (&eb_ptr->setup, setup_bearer); +schedule_work (&eb_ptr->setup);/* Associate TIPC bearer with Ethernet bearer */