HomeFreeBSD

fusefs: validate servers' error values

Description

fusefs: validate servers' error values

Formerly fusefs would pass up the stack any error value returned by the
fuse server. However, some values aren't valid for userland, but have
special meanings within the kernel. One of these, EJUSTRETURN, could
cause a kernel page fault if the server returned it in response to
FUSE_LOOKUP. Fix by validating all errors returned by the server.

Also, fix a data lifetime bug in the FUSE_DESTROY test.

PR: 263220
Reported by: Robert Morris <rtm@lcs.mit.edu>
Sponsored by: Axcient
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D34931

(cherry picked from commit 155ac516c60f20573d15c54bafabfd0e52d21fa6)

Details

Provenance
asomersAuthored on Apr 15 2022, 7:04 PM
Reviewer
emaste
Differential Revision
D34931: fusefs: validate servers' error values
Parents
rG4d5fb17274aa: fusefs: fix two bugs regarding VOP_RECLAIM of the root inode
Branches
Unknown
Tags
Unknown