]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Dec 2014 22:22:04 +0000 (14:22 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Dec 2014 22:22:04 +0000 (14:22 -0800)
added patches:
nfsd-fix-acl-null-pointer-deref.patch

queue-3.10/nfsd-fix-acl-null-pointer-deref.patch [new file with mode: 0644]
queue-3.10/series

diff --git a/queue-3.10/nfsd-fix-acl-null-pointer-deref.patch b/queue-3.10/nfsd-fix-acl-null-pointer-deref.patch
new file mode 100644 (file)
index 0000000..786546f
--- /dev/null
@@ -0,0 +1,38 @@
+From 5b6da64a7e447eadce0d3e201c0fd6f540f2ec93 Mon Sep 17 00:00:00 2001
+From: Sergio Gelato <Sergio.Gelato@astro.su.se>
+Date: Wed, 24 Sep 2014 08:47:24 +0200
+Subject: nfsd: Fix ACL null pointer deref
+
+BugLink: http://bugs.launchpad.net/bugs/1348670
+
+Fix regression introduced in pre-3.14 kernels by cherry-picking
+aa07c713ecfc0522916f3cd57ac628ea6127c0ec
+(NFSD: Call ->set_acl with a NULL ACL structure if no entries).
+
+The affected code was removed in 3.14 by commit
+4ac7249ea5a0ceef9f8269f63f33cc873c3fac61
+(nfsd: use get_acl and ->set_acl).
+The ->set_acl methods are already able to cope with a NULL argument.
+
+Signed-off-by: Sergio Gelato <Sergio.Gelato@astro.su.se>
+[bwh: Rewrite the subject]
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Moritz Mühlenhoff <muehlenhoff@univention.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/nfsd/vfs.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/fs/nfsd/vfs.c
++++ b/fs/nfsd/vfs.c
+@@ -508,6 +508,9 @@ set_nfsv4_acl_one(struct dentry *dentry,
+       char *buf = NULL;
+       int error = 0;
++      if (!pacl)
++              return vfs_setxattr(dentry, key, NULL, 0, 0);
++
+       buflen = posix_acl_xattr_size(pacl->a_count);
+       buf = kmalloc(buflen, GFP_KERNEL);
+       error = -ENOMEM;
index 261aabc6e394573e0b3b01c3f5ffb99d1034c4df..6655282f0cdc8d7e37e014d08812eb7e42a0f292 100644 (file)
@@ -42,3 +42,4 @@ nfsd-fix-slot-wake-up-race-in-the-nfsv4.1-callback-code.patch
 nfsd4-fix-leak-of-inode-reference-on-delegation-failure.patch
 bnx2fc-do-not-add-shared-skbs-to-the-fcoe_rx_list.patch
 powerpc-powernv-honor-the-generic-no_64bit_msi-flag.patch
+nfsd-fix-acl-null-pointer-deref.patch