diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2021-06-22 09:15:35 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-20 16:16:03 +0200 |
commit | e7779b7470ef229b895c45e19d299cfa4902157b (patch) | |
tree | 04edcae4751f18e47f3ecbc6a407107091cb1ef9 /fs | |
parent | 3941cf9b4b28fb787f98bbdae953ae433c19900e (diff) | |
download | linux-stable-e7779b7470ef229b895c45e19d299cfa4902157b.tar.gz linux-stable-e7779b7470ef229b895c45e19d299cfa4902157b.tar.bz2 linux-stable-e7779b7470ef229b895c45e19d299cfa4902157b.zip |
fuse: reject internal errno
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fuse/dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 498a4fab4080..8b22f8705dd4 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -1896,7 +1896,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 err_finish; spin_lock(&fpq->lock); |