]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Jul 2021 11:52:35 +0000 (13:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Jul 2021 11:52:35 +0000 (13:52 +0200)
added patches:
fuse-reject-internal-errno.patch

queue-4.9/fuse-reject-internal-errno.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/fuse-reject-internal-errno.patch b/queue-4.9/fuse-reject-internal-errno.patch
new file mode 100644 (file)
index 0000000..c4114d0
--- /dev/null
@@ -0,0 +1,32 @@
+From 49221cf86d18bb66fe95d3338cb33bd4b9880ca5 Mon Sep 17 00:00:00 2001
+From: Miklos Szeredi <mszeredi@redhat.com>
+Date: Tue, 22 Jun 2021 09:15:35 +0200
+Subject: fuse: reject internal errno
+
+From: Miklos Szeredi <mszeredi@redhat.com>
+
+commit 49221cf86d18bb66fe95d3338cb33bd4b9880ca5 upstream.
+
+Don't allow userspace to report errors that could be kernel-internal.
+
+Reported-by: Anatoly Trosinenko <anatoly.trosinenko@gmail.com>
+Fixes: 334f485df85a ("[PATCH] FUSE - device functions")
+Cc: <stable@vger.kernel.org> # v2.6.14
+Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/fuse/dev.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/fuse/dev.c
++++ b/fs/fuse/dev.c
+@@ -1883,7 +1883,7 @@ static ssize_t fuse_dev_do_write(struct
+       }
+       err = -EINVAL;
+-      if (oh.error <= -1000 || oh.error > 0)
++      if (oh.error <= -512 || oh.error > 0)
+               goto err_finish;
+       spin_lock(&fpq->lock);
index 92266834175fac41c8e28f3a2a7ffaf13a868068..38e2188d6fbe36553d4980957ae71d66326f0040 100644 (file)
@@ -155,3 +155,4 @@ bluetooth-fix-the-hci-to-mgmt-status-conversion-tabl.patch
 bluetooth-shutdown-controller-after-workqueues-are-f.patch
 bluetooth-btusb-fix-bt-fiwmare-downloading-failure-i.patch
 sctp-add-size-validation-when-walking-chunks.patch
+fuse-reject-internal-errno.patch