From: Greg Kroah-Hartman Date: Thu, 15 Jul 2021 11:52:35 +0000 (+0200) Subject: 4.9-stable patches X-Git-Tag: v5.4.133~55 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d383a5f09e86c0764d8e5834d3b30ca918df5dba;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: fuse-reject-internal-errno.patch --- diff --git a/queue-4.9/fuse-reject-internal-errno.patch b/queue-4.9/fuse-reject-internal-errno.patch new file mode 100644 index 00000000000..c4114d0f36e --- /dev/null +++ b/queue-4.9/fuse-reject-internal-errno.patch @@ -0,0 +1,32 @@ +From 49221cf86d18bb66fe95d3338cb33bd4b9880ca5 Mon Sep 17 00:00:00 2001 +From: Miklos Szeredi +Date: Tue, 22 Jun 2021 09:15:35 +0200 +Subject: fuse: reject internal errno + +From: Miklos Szeredi + +commit 49221cf86d18bb66fe95d3338cb33bd4b9880ca5 upstream. + +Don't allow userspace to report errors that could be kernel-internal. + +Reported-by: Anatoly Trosinenko +Fixes: 334f485df85a ("[PATCH] FUSE - device functions") +Cc: # v2.6.14 +Signed-off-by: Miklos Szeredi +Signed-off-by: Greg Kroah-Hartman + +--- + 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); diff --git a/queue-4.9/series b/queue-4.9/series index 92266834175..38e2188d6fb 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -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