]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jul 2017 14:07:53 +0000 (07:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jul 2017 14:07:53 +0000 (07:07 -0700)
added patches:
ovl-fix-random-return-value-on-mount.patch

queue-4.9/ovl-fix-random-return-value-on-mount.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/ovl-fix-random-return-value-on-mount.patch b/queue-4.9/ovl-fix-random-return-value-on-mount.patch
new file mode 100644 (file)
index 0000000..1f84440
--- /dev/null
@@ -0,0 +1,34 @@
+From 8fc646b44385ff0a9853f6590497e43049eeb311 Mon Sep 17 00:00:00 2001
+From: Amir Goldstein <amir73il@gmail.com>
+Date: Tue, 11 Jul 2017 15:58:35 +0300
+Subject: ovl: fix random return value on mount
+
+From: Amir Goldstein <amir73il@gmail.com>
+
+commit 8fc646b44385ff0a9853f6590497e43049eeb311 upstream.
+
+On failure to prepare_creds(), mount fails with a random
+return value, as err was last set to an integer cast of
+a valid lower mnt pointer or set to 0 if inodes index feature
+is enabled.
+
+Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
+Fixes: 3fe6e52f0626 ("ovl: override creds with the ones from ...")
+Signed-off-by: Amir Goldstein <amir73il@gmail.com>
+Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/overlayfs/super.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/fs/overlayfs/super.c
++++ b/fs/overlayfs/super.c
+@@ -1310,6 +1310,7 @@ static int ovl_fill_super(struct super_b
+       else
+               sb->s_d_op = &ovl_dentry_operations;
++      err = -ENOMEM;
+       ufs->creator_cred = cred = prepare_creds();
+       if (!cred)
+               goto out_put_lower_mnt;
index 25ae33b45394e6154c28f32a3bad88b7af11fb90..ab23bc4e4e0f352d8321e31b3fd464c4f56c41b8 100644 (file)
@@ -115,3 +115,4 @@ drm-mst-avoid-dereferencing-a-null-mstb-in-drm_dp_mst_handle_up_req.patch
 drm-mst-avoid-processing-partially-received-up-down-message-transactions.patch
 mlx5-avoid-that-mlx5_ib_sg_to_klms-overflows-the-klms-array.patch
 hfsplus-don-t-clear-sgid-when-inheriting-acls.patch
+ovl-fix-random-return-value-on-mount.patch