<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/fs/nullfs/null_vnops.c, branch stable/13</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=stable%2F13</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=stable%2F13'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2025-11-19T20:47:50Z</updated>
<entry>
<title>namei: Make stackable filesystems check harder for jail roots</title>
<updated>2025-11-19T20:47:50Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2025-05-23T12:52:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=592de68e328b4edf8acdb2a0b0b66a813747b440'/>
<id>urn:sha1:592de68e328b4edf8acdb2a0b0b66a813747b440</id>
<content type='text'>
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)
</content>
</entry>
<entry>
<title>nullfs lookup: cn_flags is 64bit</title>
<updated>2025-11-19T20:47:50Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2025-05-17T05:37:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=19b91b15530d1ed0453ce073fb15d1f790ff85e4'/>
<id>urn:sha1:19b91b15530d1ed0453ce073fb15d1f790ff85e4</id>
<content type='text'>
Reviewed by:	olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D50390

(cherry picked from commit 89549c2348170921cc4270ac95bfabfd78d42739)
</content>
</entry>
<entry>
<title>nullfs: do not allow bypass on copy_file_range()</title>
<updated>2023-12-05T00:44:13Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2023-11-18T09:23:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6c5e70a22c41bf3ebe3e9a68f1c9ac29775809fb'/>
<id>urn:sha1:6c5e70a22c41bf3ebe3e9a68f1c9ac29775809fb</id>
<content type='text'>
(cherry picked from commit 326836a1ebc6ce9b28c8f2bc1d177a444fba8ea6)
</content>
</entry>
<entry>
<title>VFS: add VOP_GETLOWVNODE()</title>
<updated>2023-12-05T00:44:13Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2023-11-18T08:55:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=62ed7f98a2db5018a5336398df37f60cb157ec6d'/>
<id>urn:sha1:62ed7f98a2db5018a5336398df37f60cb157ec6d</id>
<content type='text'>
(cherry picked from commit 4cbe4c48a7e574ec1bb919351d7a57d252b00b62)
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-23T17:43:20Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f8167e0404dab9ffeaca95853dd237ab7c587f82'/>
<id>urn:sha1:f8167e0404dab9ffeaca95853dd237ab7c587f82</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in current:
(cherry picked from commit 95ee2897e98f)
</content>
</entry>
<entry>
<title>nullfs(5): Fix a typo in a source code comment</title>
<updated>2022-08-10T12:23:45Z</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2022-08-07T12:04:53Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d03a300ad781bc3105468b4308974b3a53e1ecb9'/>
<id>urn:sha1:d03a300ad781bc3105468b4308974b3a53e1ecb9</id>
<content type='text'>
- s/examing/examining/

(cherry picked from commit 4c399b044fc66b02e37110ca5c1f4ce0e3beb9d1)
</content>
</entry>
<entry>
<title>null_vptocnp(): busy nullfs mp instead of refing it</title>
<updated>2022-06-21T12:43:38Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2022-06-10T11:35:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=60dc4909a8969be38ca2bc60e9f9c8eeb62c7624'/>
<id>urn:sha1:60dc4909a8969be38ca2bc60e9f9c8eeb62c7624</id>
<content type='text'>
(cherry picked from commit 7fd37611b92b5f365f33435bb725b335c2f10ba8)
</content>
</entry>
<entry>
<title>null_vput_pair(): release use reference on dvp earlier</title>
<updated>2021-08-14T10:21:59Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2021-03-07T21:08:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=94cb19f46114950586fc363b518550c171849291'/>
<id>urn:sha1:94cb19f46114950586fc363b518550c171849291</id>
<content type='text'>
(cherry picked from commit 16dea8341024b8ee8be619c27d4e63bd81bd9b6c)
</content>
</entry>
<entry>
<title>nullfs: provide custom null_rename bypass</title>
<updated>2021-08-03T09:52:36Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2021-07-24T15:05:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7f5a4aff9b4826c1b9852f949ef97fe7ecf3efb0'/>
<id>urn:sha1:7f5a4aff9b4826c1b9852f949ef97fe7ecf3efb0</id>
<content type='text'>
(cherry picked from commit 4eaf9609fe42878eccaaf5fe1873f792074a62e4)
</content>
</entry>
<entry>
<title>null_rename: some style</title>
<updated>2021-08-03T09:52:36Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2021-07-24T14:46:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5c52335fd1ccdd640134fe7b3dec7e8755e8d42c'/>
<id>urn:sha1:5c52335fd1ccdd640134fe7b3dec7e8755e8d42c</id>
<content type='text'>
(cherry picked from commit 26e72728ce12c8670894435fcef8055a0ecb6266)
</content>
</entry>
</feed>
