mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
fuse: reject internal errno
commit49221cf86dupstream. Don't allow userspace to report errors that could be kernel-internal. Reported-by: Anatoly Trosinenko <anatoly.trosinenko@gmail.com> Fixes:334f485df8("[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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
bb7ee90ea5
commit
4eab2e2e98
@@ -1871,7 +1871,7 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud,
|
|||||||
}
|
}
|
||||||
|
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
if (oh.error <= -1000 || oh.error > 0)
|
if (oh.error <= -512 || oh.error > 0)
|
||||||
goto copy_finish;
|
goto copy_finish;
|
||||||
|
|
||||||
spin_lock(&fpq->lock);
|
spin_lock(&fpq->lock);
|
||||||
|
|||||||
Reference in New Issue
Block a user