Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfb2abd2 authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Greg Kroah-Hartman
Browse files

fuse: reject internal errno



commit 49221cf86d18bb66fe95d3338cb33bd4b9880ca5 upstream.

Don't allow userspace to report errors that could be kernel-internal.

Reported-by: default avatarAnatoly Trosinenko <anatoly.trosinenko@gmail.com>
Fixes: 334f485d ("[PATCH] FUSE - device functions")
Cc: <stable@vger.kernel.org> # v2.6.14
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c7da1d1e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1883,7 +1883,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);