diff --git a/debian/changelog b/debian/changelog index 662950dfc..d42bd42a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +linux (3.14.8-1) UNRELEASED; urgency=medium + + * New upstream stable update: + https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.14.8 + - Target/iscsi,iser: Avoid accepting transport connections during stop + stage + - iser-target: Fix multi network portal shutdown regression + + -- Ben Hutchings Tue, 17 Jun 2014 16:44:33 +0100 + linux (3.14.7-1) unstable; urgency=medium * New upstream stable update: diff --git a/debian/patches/bugfix/all/PCI-MSI-Fix-memory-leak-in-free_msi_irqs.patch b/debian/patches/bugfix/all/PCI-MSI-Fix-memory-leak-in-free_msi_irqs.patch deleted file mode 100644 index c3a90d88b..000000000 --- a/debian/patches/bugfix/all/PCI-MSI-Fix-memory-leak-in-free_msi_irqs.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Alexei Starovoitov -Date: Wed, 4 Jun 2014 15:49:50 -0700 -Subject: PCI/MSI: Fix memory leak in free_msi_irqs() -Origin: https://git.kernel.org/linus/b701c0b1fe819a2083fc6ec5332e0e4492b9516d - -free_msi_irqs() is leaking memory, since list_for_each_entry(entry, -&dev->msi_list, list) {...} is never executed, because dev->msi_list is -made empty by the loop just above this one. - -Fix it by relying on zero termination of attribute array like -populate_msi_sysfs() does. - -Fixes: 1c51b50c2995 ("PCI/MSI: Export MSI mode using attributes, not kobjects") -Signed-off-by: Alexei Starovoitov -Signed-off-by: Bjorn Helgaas -Acked-by: Neil Horman -Acked-by: Greg Kroah-Hartman -CC: stable@vger.kernel.org # v3.14+ ---- - drivers/pci/msi.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/pci/msi.c -+++ b/drivers/pci/msi.c -@@ -414,7 +414,7 @@ static void free_msi_irqs(struct pci_dev - if (dev->msi_irq_groups) { - sysfs_remove_groups(&dev->dev.kobj, dev->msi_irq_groups); - msi_attrs = dev->msi_irq_groups[0]->attrs; -- list_for_each_entry(entry, &dev->msi_list, list) { -+ while (msi_attrs[count]) { - dev_attr = container_of(msi_attrs[count], - struct device_attribute, attr); - kfree(dev_attr->attr.name); diff --git a/debian/patches/bugfix/all/auditsc-audit_krule-mask-accesses-need-bounds-checki.patch b/debian/patches/bugfix/all/auditsc-audit_krule-mask-accesses-need-bounds-checki.patch deleted file mode 100644 index b5c10893c..000000000 --- a/debian/patches/bugfix/all/auditsc-audit_krule-mask-accesses-need-bounds-checki.patch +++ /dev/null @@ -1,80 +0,0 @@ -From: Andy Lutomirski -Date: Wed, 28 May 2014 23:09:58 -0400 -Subject: auditsc: audit_krule mask accesses need bounds checking -Origin: https://git.kernel.org/linus/a3c54931199565930d6d84f4c3456f6440aefd41 - -Fixes an easy DoS and possible information disclosure. - -This does nothing about the broken state of x32 auditing. - -eparis: If the admin has enabled auditd and has specifically loaded -audit rules. This bug has been around since before git. Wow... - -Cc: stable@vger.kernel.org -Signed-off-by: Andy Lutomirski -Signed-off-by: Eric Paris -Signed-off-by: Linus Torvalds ---- - kernel/auditsc.c | 27 ++++++++++++++++++--------- - 1 file changed, 18 insertions(+), 9 deletions(-) - ---- a/kernel/auditsc.c -+++ b/kernel/auditsc.c -@@ -720,6 +720,22 @@ static enum audit_state audit_filter_tas - return AUDIT_BUILD_CONTEXT; - } - -+static int audit_in_mask(const struct audit_krule *rule, unsigned long val) -+{ -+ int word, bit; -+ -+ if (val > 0xffffffff) -+ return false; -+ -+ word = AUDIT_WORD(val); -+ if (word >= AUDIT_BITMASK_SIZE) -+ return false; -+ -+ bit = AUDIT_BIT(val); -+ -+ return rule->mask[word] & bit; -+} -+ - /* At syscall entry and exit time, this filter is called if the - * audit_state is not low enough that auditing cannot take place, but is - * also not high enough that we already know we have to write an audit -@@ -737,11 +753,8 @@ static enum audit_state audit_filter_sys - - rcu_read_lock(); - if (!list_empty(list)) { -- int word = AUDIT_WORD(ctx->major); -- int bit = AUDIT_BIT(ctx->major); -- - list_for_each_entry_rcu(e, list, list) { -- if ((e->rule.mask[word] & bit) == bit && -+ if (audit_in_mask(&e->rule, ctx->major) && - audit_filter_rules(tsk, &e->rule, ctx, NULL, - &state, false)) { - rcu_read_unlock(); -@@ -761,20 +774,16 @@ static enum audit_state audit_filter_sys - static int audit_filter_inode_name(struct task_struct *tsk, - struct audit_names *n, - struct audit_context *ctx) { -- int word, bit; - int h = audit_hash_ino((u32)n->ino); - struct list_head *list = &audit_inode_hash[h]; - struct audit_entry *e; - enum audit_state state; - -- word = AUDIT_WORD(ctx->major); -- bit = AUDIT_BIT(ctx->major); -- - if (list_empty(list)) - return 0; - - list_for_each_entry_rcu(e, list, list) { -- if ((e->rule.mask[word] & bit) == bit && -+ if (audit_in_mask(&e->rule, ctx->major) && - audit_filter_rules(tsk, &e->rule, ctx, n, &state, false)) { - ctx->current_state = state; - return 1; diff --git a/debian/patches/bugfix/all/fs-userns-change-inode_capable-to-capable_wrt_inode_uidgid.patch b/debian/patches/bugfix/all/fs-userns-change-inode_capable-to-capable_wrt_inode_uidgid.patch deleted file mode 100644 index 2a6460a42..000000000 --- a/debian/patches/bugfix/all/fs-userns-change-inode_capable-to-capable_wrt_inode_uidgid.patch +++ /dev/null @@ -1,191 +0,0 @@ -From: Andy Lutomirski -Date: Tue, 10 Jun 2014 12:45:42 -0700 -Subject: fs,userns: Change inode_capable to capable_wrt_inode_uidgid -Origin: https://git.kernel.org/linus/23adbe12ef7d3d4195e80800ab36b37bee28cd03 - -The kernel has no concept of capabilities with respect to inodes; inodes -exist independently of namespaces. For example, inode_capable(inode, -CAP_LINUX_IMMUTABLE) would be nonsense. - -This patch changes inode_capable to check for uid and gid mappings and -renames it to capable_wrt_inode_uidgid, which should make it more -obvious what it does. - -Fixes CVE-2014-4014. - -Cc: Theodore Ts'o -Cc: Serge Hallyn -Cc: "Eric W. Biederman" -Cc: Dave Chinner -Cc: stable@vger.kernel.org -Signed-off-by: Andy Lutomirski -Signed-off-by: Linus Torvalds ---- - fs/attr.c | 8 ++++---- - fs/inode.c | 10 +++++++--- - fs/namei.c | 11 ++++++----- - fs/xfs/xfs_ioctl.c | 2 +- - include/linux/capability.h | 2 +- - kernel/capability.c | 20 ++++++++------------ - 6 files changed, 27 insertions(+), 26 deletions(-) - ---- a/fs/attr.c -+++ b/fs/attr.c -@@ -50,14 +50,14 @@ int inode_change_ok(const struct inode * - if ((ia_valid & ATTR_UID) && - (!uid_eq(current_fsuid(), inode->i_uid) || - !uid_eq(attr->ia_uid, inode->i_uid)) && -- !inode_capable(inode, CAP_CHOWN)) -+ !capable_wrt_inode_uidgid(inode, CAP_CHOWN)) - return -EPERM; - - /* Make sure caller can chgrp. */ - if ((ia_valid & ATTR_GID) && - (!uid_eq(current_fsuid(), inode->i_uid) || - (!in_group_p(attr->ia_gid) && !gid_eq(attr->ia_gid, inode->i_gid))) && -- !inode_capable(inode, CAP_CHOWN)) -+ !capable_wrt_inode_uidgid(inode, CAP_CHOWN)) - return -EPERM; - - /* Make sure a caller can chmod. */ -@@ -67,7 +67,7 @@ int inode_change_ok(const struct inode * - /* Also check the setgid bit! */ - if (!in_group_p((ia_valid & ATTR_GID) ? attr->ia_gid : - inode->i_gid) && -- !inode_capable(inode, CAP_FSETID)) -+ !capable_wrt_inode_uidgid(inode, CAP_FSETID)) - attr->ia_mode &= ~S_ISGID; - } - -@@ -160,7 +160,7 @@ void setattr_copy(struct inode *inode, c - umode_t mode = attr->ia_mode; - - if (!in_group_p(inode->i_gid) && -- !inode_capable(inode, CAP_FSETID)) -+ !capable_wrt_inode_uidgid(inode, CAP_FSETID)) - mode &= ~S_ISGID; - inode->i_mode = mode; - } ---- a/fs/inode.c -+++ b/fs/inode.c -@@ -1842,14 +1842,18 @@ EXPORT_SYMBOL(inode_init_owner); - * inode_owner_or_capable - check current task permissions to inode - * @inode: inode being checked - * -- * Return true if current either has CAP_FOWNER to the inode, or -- * owns the file. -+ * Return true if current either has CAP_FOWNER in a namespace with the -+ * inode owner uid mapped, or owns the file. - */ - bool inode_owner_or_capable(const struct inode *inode) - { -+ struct user_namespace *ns; -+ - if (uid_eq(current_fsuid(), inode->i_uid)) - return true; -- if (inode_capable(inode, CAP_FOWNER)) -+ -+ ns = current_user_ns(); -+ if (ns_capable(ns, CAP_FOWNER) && kuid_has_mapping(ns, inode->i_uid)) - return true; - return false; - } ---- a/fs/namei.c -+++ b/fs/namei.c -@@ -332,10 +332,11 @@ int generic_permission(struct inode *ino - - if (S_ISDIR(inode->i_mode)) { - /* DACs are overridable for directories */ -- if (inode_capable(inode, CAP_DAC_OVERRIDE)) -+ if (capable_wrt_inode_uidgid(inode, CAP_DAC_OVERRIDE)) - return 0; - if (!(mask & MAY_WRITE)) -- if (inode_capable(inode, CAP_DAC_READ_SEARCH)) -+ if (capable_wrt_inode_uidgid(inode, -+ CAP_DAC_READ_SEARCH)) - return 0; - return -EACCES; - } -@@ -345,7 +346,7 @@ int generic_permission(struct inode *ino - * at least one exec bit set. - */ - if (!(mask & MAY_EXEC) || (inode->i_mode & S_IXUGO)) -- if (inode_capable(inode, CAP_DAC_OVERRIDE)) -+ if (capable_wrt_inode_uidgid(inode, CAP_DAC_OVERRIDE)) - return 0; - - /* -@@ -353,7 +354,7 @@ int generic_permission(struct inode *ino - */ - mask &= MAY_READ | MAY_WRITE | MAY_EXEC; - if (mask == MAY_READ) -- if (inode_capable(inode, CAP_DAC_READ_SEARCH)) -+ if (capable_wrt_inode_uidgid(inode, CAP_DAC_READ_SEARCH)) - return 0; - - return -EACCES; -@@ -2370,7 +2371,7 @@ static inline int check_sticky(struct in - return 0; - if (uid_eq(dir->i_uid, fsuid)) - return 0; -- return !inode_capable(inode, CAP_FOWNER); -+ return !capable_wrt_inode_uidgid(inode, CAP_FOWNER); - } - - /* ---- a/fs/xfs/xfs_ioctl.c -+++ b/fs/xfs/xfs_ioctl.c -@@ -1241,7 +1241,7 @@ xfs_ioctl_setattr( - * cleared upon successful return from chown() - */ - if ((ip->i_d.di_mode & (S_ISUID|S_ISGID)) && -- !inode_capable(VFS_I(ip), CAP_FSETID)) -+ !capable_wrt_inode_uidgid(VFS_I(ip), CAP_FSETID)) - ip->i_d.di_mode &= ~(S_ISUID|S_ISGID); - - /* ---- a/include/linux/capability.h -+++ b/include/linux/capability.h -@@ -210,7 +210,7 @@ extern bool has_ns_capability_noaudit(st - struct user_namespace *ns, int cap); - extern bool capable(int cap); - extern bool ns_capable(struct user_namespace *ns, int cap); --extern bool inode_capable(const struct inode *inode, int cap); -+extern bool capable_wrt_inode_uidgid(const struct inode *inode, int cap); - extern bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap); - - /* audit system wants to get cap info from files as well */ ---- a/kernel/capability.c -+++ b/kernel/capability.c -@@ -433,23 +433,19 @@ bool capable(int cap) - EXPORT_SYMBOL(capable); - - /** -- * inode_capable - Check superior capability over inode -+ * capable_wrt_inode_uidgid - Check nsown_capable and uid and gid mapped - * @inode: The inode in question - * @cap: The capability in question - * -- * Return true if the current task has the given superior capability -- * targeted at it's own user namespace and that the given inode is owned -- * by the current user namespace or a child namespace. -- * -- * Currently we check to see if an inode is owned by the current -- * user namespace by seeing if the inode's owner maps into the -- * current user namespace. -- * -+ * Return true if the current task has the given capability targeted at -+ * its own user namespace and that the given inode's uid and gid are -+ * mapped into the current user namespace. - */ --bool inode_capable(const struct inode *inode, int cap) -+bool capable_wrt_inode_uidgid(const struct inode *inode, int cap) - { - struct user_namespace *ns = current_user_ns(); - -- return ns_capable(ns, cap) && kuid_has_mapping(ns, inode->i_uid); -+ return ns_capable(ns, cap) && kuid_has_mapping(ns, inode->i_uid) && -+ kgid_has_mapping(ns, inode->i_gid); - } --EXPORT_SYMBOL(inode_capable); -+EXPORT_SYMBOL(capable_wrt_inode_uidgid); diff --git a/debian/patches/bugfix/all/netfilter-ipv4-defrag-set-local_df-flag-on-defragmen.patch b/debian/patches/bugfix/all/netfilter-ipv4-defrag-set-local_df-flag-on-defragmen.patch deleted file mode 100644 index 01c56d74f..000000000 --- a/debian/patches/bugfix/all/netfilter-ipv4-defrag-set-local_df-flag-on-defragmen.patch +++ /dev/null @@ -1,53 +0,0 @@ -From: Florian Westphal -Date: Fri, 2 May 2014 15:32:16 +0200 -Subject: netfilter: ipv4: defrag: set local_df flag on defragmented skb -Origin: https://git.kernel.org/linus/895162b1101b3ea5db08ca6822ae9672717efec0 - -else we may fail to forward skb even if original fragments do fit -outgoing link mtu: - -1. remote sends 2k packets in two 1000 byte frags, DF set -2. we want to forward but only see '2k > mtu and DF set' -3. we then send icmp error saying that outgoing link is 1500 - -But original sender never sent a packet that would not fit -the outgoing link. - -Setting local_df makes outgoing path test size vs. -IPCB(skb)->frag_max_size, so we will still send the correct -error in case the largest original size did not fit -outgoing link mtu. - -Reported-by: Maxime Bizon -Suggested-by: Maxime Bizon -Fixes: 5f2d04f1f9 (ipv4: fix path MTU discovery with connection tracking) -Signed-off-by: Florian Westphal -Signed-off-by: Pablo Neira Ayuso ---- - net/ipv4/netfilter/nf_defrag_ipv4.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/net/ipv4/netfilter/nf_defrag_ipv4.c b/net/ipv4/netfilter/nf_defrag_ipv4.c -index 12e13bd..f40f321 100644 ---- a/net/ipv4/netfilter/nf_defrag_ipv4.c -+++ b/net/ipv4/netfilter/nf_defrag_ipv4.c -@@ -22,7 +22,6 @@ - #endif - #include - --/* Returns new sk_buff, or NULL */ - static int nf_ct_ipv4_gather_frags(struct sk_buff *skb, u_int32_t user) - { - int err; -@@ -33,8 +32,10 @@ static int nf_ct_ipv4_gather_frags(struct sk_buff *skb, u_int32_t user) - err = ip_defrag(skb, user); - local_bh_enable(); - -- if (!err) -+ if (!err) { - ip_send_check(ip_hdr(skb)); -+ skb->local_df = 1; -+ } - - return err; - } diff --git a/debian/patches/bugfix/mips/MIPS-asm-thread_info-Add-_TIF_SECCOMP-flag.patch b/debian/patches/bugfix/mips/MIPS-asm-thread_info-Add-_TIF_SECCOMP-flag.patch deleted file mode 100644 index 02428d02c..000000000 --- a/debian/patches/bugfix/mips/MIPS-asm-thread_info-Add-_TIF_SECCOMP-flag.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: Markos Chandras -Date: Wed, 22 Jan 2014 14:40:00 +0000 -Subject: MIPS: asm: thread_info: Add _TIF_SECCOMP flag -Origin: https://git.kernel.org/linus/137f7df8cead00688524c82360930845396b8a21 - -Add _TIF_SECCOMP flag to _TIF_WORK_SYSCALL_ENTRY to indicate -that the system call needs to be checked against a seccomp filter. - -Signed-off-by: Markos Chandras -Reviewed-by: Paul Burton -Reviewed-by: James Hogan -Cc: linux-mips@linux-mips.org -Patchwork: https://patchwork.linux-mips.org/patch/6405/ -Signed-off-by: Ralf Baechle ---- - arch/mips/include/asm/thread_info.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h -index 24846f9..e80ae50 100644 ---- a/arch/mips/include/asm/thread_info.h -+++ b/arch/mips/include/asm/thread_info.h -@@ -136,7 +136,8 @@ static inline struct thread_info *current_thread_info(void) - #define _TIF_SYSCALL_TRACEPOINT (1<