summaryrefslogtreecommitdiff
path: root/fs/fuse
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2021-06-22 10:15:35 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2021-06-22 10:15:35 +0300
commit49221cf86d18bb66fe95d3338cb33bd4b9880ca5 (patch)
tree17e792683ffb717fab3a048a3047510d958b6121 /fs/fuse
parent80ef08670d4c28a06a3de954bd350368780bcfef (diff)
downloadlinux-49221cf86d18bb66fe95d3338cb33bd4b9880ca5.tar.xz
fuse: reject internal errno
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>
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 6e63bcba2a40..b8d58aa08206 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1867,7 +1867,7 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud,
}
err = -EINVAL;
- if (oh.error <= -1000 || oh.error > 0)
+ if (oh.error <= -512 || oh.error > 0)
goto copy_finish;
spin_lock(&fpq->lock);