From: Greg Kroah-Hartman Date: Thu, 15 Jul 2021 11:52:36 +0000 (+0200) Subject: 4.14-stable patches X-Git-Tag: v5.4.133~54 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=72d6103fda08ace065020e319c7e3d7a80fa8a8d;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: fuse-reject-internal-errno.patch --- diff --git a/queue-4.14/fuse-reject-internal-errno.patch b/queue-4.14/fuse-reject-internal-errno.patch new file mode 100644 index 00000000000..15d3b866da9 --- /dev/null +++ b/queue-4.14/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 +@@ -1889,7 +1889,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.14/series b/queue-4.14/series index 3e8eedb3131..d49059a0589 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -202,3 +202,4 @@ sctp-validate-from_addr_param-return.patch sctp-add-size-validation-when-walking-chunks.patch fscrypt-don-t-ignore-minor_hash-when-hash-is-0.patch bdi-do-not-use-freezable-workqueue.patch +fuse-reject-internal-errno.patch