Linux 3.14.73
Greg KH
maintainerI'm announcing the release of the 3.14.73 kernel.
All users of the 3.14 kernel series must upgrade.
The updated 3.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.14.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
------------
Documentation/sysctl/fs.txt | 23 + Makefile | 2 arch/arm/kernel/ptrace.c | 2 arch/mips/include/asm/processor.h | 2 arch/parisc/kernel/unaligned.c | 10 arch/powerpc/include/asm/reg.h | 6 arch/powerpc/platforms/pseries/eeh_pseries.c | 51 ++- arch/x86/kvm/x86.c | 5 drivers/crypto/ccp/ccp-crypto-aes-xts.c | 17 - drivers/net/ethernet/sfc/ef10.c | 16 + fs/dcache.c | 4 fs/ecryptfs/kthread.c | 13 fs/pipe.c | 47 +++ fs/xfs/xfs_inode.c | 2 include/linux/netfilter/x_tables.h | 12 include/linux/pipe_fs_i.h | 4 include/linux/sched.h | 1 kernel/sysctl.c | 14 + net/ipv4/netfilter/arp_tables.c | 328 ++++++++---------------- net/ipv4/netfilter/ip_tables.c | 361 ++++++++------------------- net/ipv6/netfilter/ip6_tables.c | 355 +++++++------------------- net/ipv6/tcp_ipv6.c | 4 net/netfilter/x_tables.c | 245 ++++++++++++++++++ net/netlink/af_netlink.c | 7 net/wireless/wext-core.c | 25 + 25 files changed, 798 insertions(+), 758 deletions(-)
Al Viro (1):
fix d_walk()/non-delayed __d_free() race
Bernhard Thaler (1):
Revert "netfilter: ensure number of counters is >0 in do_replace()"
Dave Jones (1):
netfilter: ensure number of counters is >0 in do_replace()
Edward Cree (1):
sfc: on MC reset, clear PIO buffer linkage in TXQs
Florian Westphal (19):
netfilter: x_tables: validate e->target_offset early
netfilter: x_tables: make sure e->next_offset covers remaining blob size
netfilter: x_tables: fix unconditional helper
netfilter: x_tables: don't move to non-existent next rule
netfilter: x_tables: validate targets of jumps
netfilter: x_tables: add and use xt_check_entry_offsets
netfilter: x_tables: kill check_entry helper
netfilter: x_tables: assert minimum target size
netfilter: x_tables: add compat version of xt_check_entry_offsets
netfilter: x_tables: check standard target size too
netfilter: x_tables: check for bogus target offset
netfilter: x_tables: validate all offsets and sizes in a rule
netfilter: x_tables: don't reject valid target size on some architectures
netfilter: arp_tables: simplify translate_compat_table args
netfilter: ip_tables: simplify translate_compat_table args
netfilter: ip6_tables: simplify translate_compat_table args
netfilter: x_tables: xt_compat_match_from_user doesn't need a retval
netfilter: x_tables: do compat validation via translate_table
netfilter: x_tables: introduce and use xt_copy_counters_from_user
Greg Kroah-Hartman (2):
xfs: fix up backport error in fs/xfs/xfs_inode.c Linux 3.14.73
Helge Deller (1):
parisc: Fix pagefault crash in unaligned __get_user() call
Herbert Xu (1):
netlink: Fix dump skb leak/double free
Jann Horn (1):
ecryptfs: forbid opening files without mmap handler
Paolo Bonzini (1):
KVM: x86: fix OOPS after invalid KVM_SET_DEBUGREGS
Prasun Maiti (1):
wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel
Ralf Baechle (1):
MIPS: Fix 64k page support for 32 bit kernels.
Russell Currey (1):
powerpc/pseries/eeh: Handle RTAS delay requests in configure_bridge
Russell King (1):
ARM: fix PTRACE_SETVFPREGS on SMP systems
Thomas Huth (2):
powerpc: Fix definition of SIAR and SDAR registers
powerpc: Use privileged SPR number for MMCR2
Tom Lendacky (1):
crypto: ccp - Fix AES XTS error for request sizes above 4096
Willy Tarreau (1):
pipe: limit the per-user amount of pages allocated in pipes
Yuchung Cheng (1):
tcp: record TLP and ER timer stats in v6 stats
Greg KH
maintainerDocumentation/sysctl/fs.txt +23 -0
@@ -32,6 +32,8 @@ Currently, these files are in /proc/sys/fs: - nr_open - overflowuid - overflowgid +- pipe-user-pages-hard +- pipe-user-pages-soft - protected_hardlinks - protected_symlinks - suid_dumpable
@@ -159,6 +161,27 @@ The default is 65534. ============================================================== +pipe-user-pages-hard: + +Maximum total number of pages a non-privileged user may allocate for pipes. +Once this limit is reached, no new pipes may be allocated until usage goes +below the limit again. When set to 0, no limit is applied, which is the default +setting. + +============================================================== + +pipe-user-pages-soft: + +Maximum total number of pages a non-privileged user may allocate for pipes +before the pipe size gets limited to a single page. Once this limit is reached, +new pipes will be limited to a single page in size for this user in order to +limit total memory usage, and trying to increase them using fcntl() will be +denied until usage goes below the limit again. The default value allows to +allocate up to 1024 pipes at their default size. When set to 0, no limit is +applied. + +============================================================== + protected_hardlinks: A long-standing class of security issues is the hardlink-based
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 14 -SUBLEVEL = 72 +SUBLEVEL = 73 EXTRAVERSION = NAME = Remembering Coco
arch/arm/kernel/ptrace.c +1 -1
@@ -733,8 +733,8 @@ static int vfp_set(struct task_struct *target,if (ret)return ret; -vfp_flush_hwstate (thread); thread->vfpstate.hard = new_vfp; +vfp_flush_hwstate (thread);return 0 ; }
arch/mips/include/asm/processor.h +1 -1
@@ -51,7 +51,7 @@ extern unsigned int vced_count, vcei_count;* User space process size: 2GB. This is hardcoded into a few places, * so don't change it unless you know what you are doing. */ -#define TASK_SIZE 0x7fff8000UL +#define TASK_SIZE 0x80000000UL#endif #ifdef __KERNEL__
arch/parisc/kernel/unaligned.c +9 -1
@@ -666,7 +666,7 @@ void handle_unaligned(struct pt_regs *regs)break ; } -if (modify &&R1 (regs->iir)) +if (ret ==0 && modify &&R1 (regs->iir)) regs->gr[R1 (regs->iir)] = newbase;
@@ -677,6 +677,14 @@ void handle_unaligned(struct pt_regs *regs)if (ret) { +/* +* The unaligned handler failed. +* If we were called by __get_user() or __put_user() jump +* to it's exception fixup handler instead of crashing. +*/ +if (!user_mode (regs) &&fixup_exception (regs)) +return ; +printk (KERN_CRIT "Unaligned handler failed, ret = %d\n" , ret);die_if_kernel ("Unaligned data reference" , regs,28 );
arch/powerpc/include/asm/reg.h +3 -3
@@ -680,7 +680,7 @@#define MMCR0_FCWAIT 0x00000002UL/* freeze counter in WAIT state */ #define MMCR0_FCHV 0x00000001UL/* freeze conditions in hypervisor mode */ #define SPRN_MMCR1 798 -#define SPRN_MMCR2 769 +#define SPRN_MMCR2 785#define SPRN_MMCRA 0x312#define MMCRA_SDSYNC 0x80000000UL/* SDAR synced with SIAR */ #define MMCRA_SDAR_DCACHE_MISS 0x40000000UL
@@ -715,13 +715,13 @@#define SPRN_PMC6 792#define SPRN_PMC7 793#define SPRN_PMC8 794 -#define SPRN_SIAR 780 -#define SPRN_SDAR 781#define SPRN_SIER 784#define SIER_SIPR 0x2000000/* Sampled MSR_PR */ #define SIER_SIHV 0x1000000/* Sampled MSR_HV */ #define SIER_SIAR_VALID 0x0400000/* SIAR contents valid */ #define SIER_SDAR_VALID 0x0200000/* SDAR contents valid */ +#define SPRN_SIAR 796 +#define SPRN_SDAR 797#define SPRN_TACR 888#define SPRN_TCSCR 889#define SPRN_CSIGR 890
arch/powerpc/platforms/pseries/eeh_pseries.c +36 -15
65 lines not on this page · raw message
arch/x86/kvm/x86.c +5 -0
@@ -3029,6 +3029,11 @@ static int kvm_vcpu_ioctl_x86_set_debugregs(struct kvm_vcpu *vcpu,if (dbgregs->flags)return -EINVAL ; +if (dbgregs->dr6 & ~0xffffffffull ) +return -EINVAL ; +if (dbgregs->dr7 & ~0xffffffffull ) +return -EINVAL ; +memcpy (vcpu->arch.db, dbgregs->db,sizeof (vcpu->arch.db)); vcpu->arch.dr6 = dbgregs->dr6;kvm_update_dr6 (vcpu);
drivers/crypto/ccp/ccp-crypto-aes-xts.c +12 -5
@@ -123,6 +123,7 @@ static int ccp_aes_xts_crypt(struct ablkcipher_request *req,struct ccp_ctx *ctx =crypto_tfm_ctx (req->base.tfm);struct ccp_aes_req_ctx *rctx =ablkcipher_request_ctx (req);unsigned int unit; +u32 unit_size;int ret;if (!ctx->u.aes.key_len)
@@ -134,11 +135,17 @@ static int ccp_aes_xts_crypt(struct ablkcipher_request *req,if (!req->info)return -EINVAL ; -for (unit =0 ; unit <ARRAY_SIZE (unit_size_map); unit++) -if (!(req->nbytes & (unit_size_map[unit].size -1 ))) -break ; + unit_size =CCP_XTS_AES_UNIT_SIZE__LAST ; +if (req->nbytes <= unit_size_map[0 ].size) { +for (unit =0 ; unit <ARRAY_SIZE (unit_size_map); unit++) { +if (!(req->nbytes & (unit_size_map[unit].size -1 ))) { + unit_size = unit_size_map[unit].value; +break ; + } + } + } -if ((unit_size_map[unit].value ==CCP_XTS_AES_UNIT_SIZE__LAST ) || +if ((unit_size ==CCP_XTS_AES_UNIT_SIZE__LAST ) || (ctx->u.aes.key_len !=AES_KEYSIZE_128 )) {/* Use the fallback to process the request for any * unsupported unit sizes or key sizes
@@ -159,7 +166,7 @@ static int ccp_aes_xts_crypt(struct ablkcipher_request *req, rctx->cmd.engine =CCP_ENGINE_XTS_AES_128 ; rctx->cmd.u.xts.action = (encrypt) ?CCP_AES_ACTION_ENCRYPT :CCP_AES_ACTION_DECRYPT ; - rctx->cmd.u.xts.unit_size = unit_size_map[unit].value; + rctx->cmd.u.xts.unit_size = unit_size; rctx->cmd.u.xts.key = &ctx->u.aes.key_sg; rctx->cmd.u.xts.key_len = ctx->u.aes.key_len; rctx->cmd.u.xts.iv = &rctx->iv_sg;
drivers/net/ethernet/sfc/ef10.c +16 -0
@@ -451,6 +451,17 @@ fail: return rc; } +static void efx_ef10_forget_old_piobufs (struct efx_nic *efx) +{ +struct efx_channel *channel; +struct efx_tx_queue *tx_queue; + +/* All our existing PIO buffers went away */ +efx_for_each_channel (channel, efx) +efx_for_each_channel_tx_queue (tx_queue, channel) + tx_queue->piobuf =NULL ; +} +#else /* !EFX_USE_PIO */ static int efx_ef10_alloc_piobufs (struct efx_nic *efx,unsigned int n)
@@ -467,6 +478,10 @@ static void efx_ef10_free_piobufs(struct efx_nic *efx) { } +static void efx_ef10_forget_old_piobufs (struct efx_nic *efx) +{ +} +#endif /* EFX_USE_PIO */ static void efx_ef10_remove (struct efx_nic *efx)
@@ -698,6 +713,7 @@ static void efx_ef10_reset_mc_allocations(struct efx_nic *efx) nic_data->must_realloc_vis = true; nic_data->must_restore_filters = true; nic_data->must_restore_piobufs = true; +efx_ef10_forget_old_piobufs (efx); nic_data->rx_rss_context =EFX_EF10_RSS_CONTEXT_INVALID ; }
fs/dcache.c +2 -2
@@ -1500,7 +1500,7 @@ struct dentry *d_alloc(struct dentry * parent, const struct qstr *name)struct dentry *dentry =__d_alloc (parent->d_sb, name);if (!dentry)return NULL ; - + dentry->d_flags |=DCACHE_RCUACCESS ;spin_lock (&parent->d_lock);/* * don't need child lock because it is not subject
@@ -2352,7 +2352,6 @@ static void __d_rehash(struct dentry * entry, struct hlist_bl_head *b) {BUG_ON (!d_unhashed (entry));hlist_bl_lock (b); - entry->d_flags |=DCACHE_RCUACCESS ;hlist_bl_add_head_rcu (&entry->d_hash, b);hlist_bl_unlock (b); }
@@ -2536,6 +2535,7 @@ static void __d_move(struct dentry * dentry, struct dentry * target)/* ... and switch the parents */ if (IS_ROOT (dentry)) { + dentry->d_flags |=DCACHE_RCUACCESS ; dentry->d_parent = target->d_parent; target->d_parent = target;INIT_LIST_HEAD (&target->d_child);
fs/ecryptfs/kthread.c +11 -2
@@ -25,6 +25,7 @@#include <linux/slab.h> #include <linux/wait.h> #include <linux/mount.h> +#include <linux/file.h> #include "ecryptfs_kernel.h" struct ecryptfs_open_req {
@@ -147,7 +148,7 @@ int ecryptfs_privileged_open(struct file **lower_file, flags |=IS_RDONLY (lower_dentry->d_inode) ?O_RDONLY :O_RDWR ; (*lower_file) =dentry_open (&req.path, flags, cred);if (!IS_ERR (*lower_file)) - goto out; + goto have_file;if ((flags &O_ACCMODE ) ==O_RDONLY ) { rc =PTR_ERR ((*lower_file)); goto out;
@@ -165,8 +166,16 @@ int ecryptfs_privileged_open(struct file **lower_file,mutex_unlock (&ecryptfs_kthread_ctl.mux);wake_up (&ecryptfs_kthread_ctl.wait);wait_for_completion (&req.done); -if (IS_ERR (*lower_file)) +if (IS_ERR (*lower_file)) { rc =PTR_ERR (*lower_file); + goto out; + } +have_file: +if ((*lower_file)->f_op->mmap ==NULL ) { +fput (*lower_file); + *lower_file =NULL ; + rc = -EMEDIUMTYPE ; + } out:return rc; }
fs/pipe.c +45 -2
89 lines not on this page · raw message
fs/xfs/xfs_inode.c +1 -1
@@ -3098,7 +3098,7 @@ xfs_iflush(*/ error =xfs_imap_to_bp (mp,NULL , &ip->i_imap, &dip, &bp,XBF_TRYLOCK ,0 ); -if (error == -EAGAIN ) { +if (error ==EAGAIN ) {xfs_ifunlock (ip);return error; }
include/linux/netfilter/x_tables.h +11 -1
@@ -239,11 +239,18 @@ void xt_unregister_match(struct xt_match *target);int xt_register_matches (struct xt_match *match,unsigned int n);void xt_unregister_matches (struct xt_match *match,unsigned int n); +int xt_check_entry_offsets (const void *base,const char *elems, +unsigned int target_offset, +unsigned int next_offset); +int xt_check_match (struct xt_mtchk_param *,unsigned int size,u_int8_t proto,bool inv_proto);int xt_check_target (struct xt_tgchk_param *,unsigned int size,u_int8_t proto,bool inv_proto); +void *xt_copy_counters_from_user (const void __user *user,unsigned int len, +struct xt_counters_info *info,bool compat); + struct xt_table *xt_register_table(struct net *net, const struct xt_table *table, struct xt_table_info *bootstrap,
@@ -421,7 +428,7 @@ void xt_compat_init_offsets(u_int8_t af, unsigned int number);int xt_compat_calc_jump (u_int8_t af,unsigned int offset);int xt_compat_match_offset (const struct xt_match *match); -int xt_compat_match_from_user (struct xt_entry_match *m,void **dstptr, +void xt_compat_match_from_user (struct xt_entry_match *m,void **dstptr,unsigned int *size);int xt_compat_match_to_user (const struct xt_entry_match *m,void __user **dstptr,unsigned int *size);
@@ -431,6 +438,9 @@ void xt_compat_target_from_user(struct xt_entry_target *t, void **dstptr, unsigned int *size);int xt_compat_target_to_user (const struct xt_entry_target *t,void __user **dstptr,unsigned int *size); +int xt_compat_check_entry_offsets (const void *base,const char *elems, +unsigned int target_offset, +unsigned int next_offset);#endif /* CONFIG_COMPAT */ #endif /* _X_TABLES_H */
include/linux/pipe_fs_i.h +4 -0
@@ -42,6 +42,7 @@ struct pipe_buffer {* @fasync_readers: reader side fasync * @fasync_writers: writer side fasync * @bufs: the circular array of pipe buffers +* @user: the user who created this pipe **/ struct pipe_inode_info {struct mutex mutex;
@@ -57,6 +58,7 @@ struct pipe_inode_info {struct fasync_struct *fasync_readers;struct fasync_struct *fasync_writers;struct pipe_buffer *bufs; +struct user_struct *user; };/*
@@ -140,6 +142,8 @@ void pipe_unlock(struct pipe_inode_info *);void pipe_double_lock (struct pipe_inode_info *,struct pipe_inode_info *);extern unsigned int pipe_max_size, pipe_min_size; +extern unsigned long pipe_user_pages_hard; +extern unsigned long pipe_user_pages_soft;int pipe_proc_fn (struct ctl_table *,int ,void __user *,size_t *,loff_t *);
include/linux/sched.h +1 -0
@@ -756,6 +756,7 @@ struct user_struct {#endif unsigned long locked_shm;/* How many pages of mlocked shm ? */ unsigned long unix_inflight;/* How many files in flight in unix sockets */ +atomic_long_t pipe_bufs;/* how many pages are allocated in pipe buffers */ #ifdef CONFIG_KEYS struct key *uid_keyring;/* UID specific keyring */
kernel/sysctl.c +14 -0
@@ -1668,6 +1668,20 @@ static struct ctl_table fs_table[] = { .proc_handler = &pipe_proc_fn, .extra1 = &pipe_min_size, }, + { + .procname = "pipe-user-pages-hard", + .data = &pipe_user_pages_hard, + .maxlen = sizeof(pipe_user_pages_hard), + .mode = 0644, + .proc_handler = proc_doulongvec_minmax, + }, + { + .procname = "pipe-user-pages-soft", + .data = &pipe_user_pages_soft, + .maxlen = sizeof(pipe_user_pages_soft), + .mode = 0644, + .proc_handler = proc_doulongvec_minmax, + }, { } };
net/ipv4/netfilter/arp_tables.c +112 -216
558 lines not on this page · raw message
net/ipv4/netfilter/ip_tables.c +112 -249
614 lines not on this page · raw message
net/ipv6/netfilter/ip6_tables.c +105 -250
600 lines not on this page · raw message
net/ipv6/tcp_ipv6.c +3 -1
@@ -1783,7 +1783,9 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i) destp =ntohs (inet->inet_dport); srcp =ntohs (inet->inet_sport); -if (icsk->icsk_pending ==ICSK_TIME_RETRANS ) { +if (icsk->icsk_pending ==ICSK_TIME_RETRANS || + icsk->icsk_pending ==ICSK_TIME_EARLY_RETRANS || + icsk->icsk_pending ==ICSK_TIME_LOSS_PROBE ) { timer_active =1 ; timer_expires = icsk->icsk_timeout; }else if (icsk->icsk_pending ==ICSK_TIME_PROBE0 ) {
net/netfilter/x_tables.c +242 -3
297 lines not on this page · raw message
net/netlink/af_netlink.c +5 -2
@@ -2651,6 +2651,7 @@ static int netlink_dump(struct sock *sk)struct netlink_callback *cb;struct sk_buff *skb =NULL ;struct nlmsghdr *nlh; +struct module *module;int len, err = -ENOBUFS ;int alloc_size;
@@ -2700,9 +2701,11 @@ static int netlink_dump(struct sock *sk) cb->done (cb); nlk->cb_running = false; + module = cb->module; + skb = cb->skb;mutex_unlock (nlk->cb_mutex); -module_put (cb->module); -consume_skb (cb->skb); +module_put (module); +consume_skb (skb);return 0 ; errout_skb:
net/wireless/wext-core.c +23 -2
@@ -954,8 +954,29 @@ static int wireless_process_ioctl(struct net *net, struct ifreq *ifr,return private (dev, iwr, cmd, info, handler); }/* Old driver API : call driver ioctl handler */ -if (dev->netdev_ops->ndo_do_ioctl) -return dev->netdev_ops->ndo_do_ioctl (dev, ifr, cmd); +if (dev->netdev_ops->ndo_do_ioctl) { +#ifdef CONFIG_COMPAT +if (info->flags &IW_REQUEST_FLAG_COMPAT ) { +int ret =0 ; +struct iwreq iwr_lcl; +struct compat_iw_point *iwp_compat = (void *) &iwr->u.data; + +memcpy (&iwr_lcl, iwr,sizeof (struct iwreq )); + iwr_lcl.u.data.pointer =compat_ptr (iwp_compat->pointer); + iwr_lcl.u.data.length = iwp_compat->length; + iwr_lcl.u.data.flags = iwp_compat->flags; + + ret = dev->netdev_ops->ndo_do_ioctl (dev, (void *) &iwr_lcl, cmd); + + iwp_compat->pointer =ptr_to_compat (iwr_lcl.u.data.pointer); + iwp_compat->length = iwr_lcl.u.data.length; + iwp_compat->flags = iwr_lcl.u.data.flags; + +return ret; + } else +#endif +return dev->netdev_ops->ndo_do_ioctl (dev, ifr, cmd); + }return -EOPNOTSUPP ; }