From: Miklos Szeredi Date: Tue, 22 Jun 2021 07:15:35 +0000 (+0200) Subject: fuse: reject internal errno X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=49221cf86d18bb66fe95d3338cb33bd4b9880ca5;p=linux.git fuse: reject internal errno 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 --- diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 6e63bcba2a402..b8d58aa082062 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);