aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Szeredi <[email protected]>2021-06-22 09:15:35 +0200
committerMiklos Szeredi <[email protected]>2021-06-22 09:15:35 +0200
commit49221cf86d18bb66fe95d3338cb33bd4b9880ca5 (patch)
tree17e792683ffb717fab3a048a3047510d958b6121
parent80ef08670d4c28a06a3de954bd350368780bcfef (diff)
fuse: reject internal errno
Don't allow userspace to report errors that could be kernel-internal. Reported-by: Anatoly Trosinenko <[email protected]> Fixes: 334f485df85a ("[PATCH] FUSE - device functions") Cc: <[email protected]> # v2.6.14 Signed-off-by: Miklos Szeredi <[email protected]>
-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);