freebsd-nq/sys
Konstantin Belousov 76b1b5ce6d nullfs: protect against user creating inconsistent state
The VFS conventions is that VOP_LOOKUP() methods do not need to handle
ISDOTDOT lookups for VV_ROOT vnodes (since they cannot, after all).  Nullfs
bypasses VOP_LOOKUP() to lower filesystem, and there, due to user actions,
it is possible to get into situation where
- upper vnode does not have VV_ROOT set
- lower vnode is root
- ISDOTDOT is requested
User just needs to nullfs-mount non-root of some filesystem, and then move
some directory under mount, out of mount, using lower filesystem.

In this case, nullfs cannot do much, but we still should and can ensure
internal kernel structures are consistent.  Avoid ISDOTDOT lookup forwarding
when VV_ROOT is set on lower dvp, return somewhat arbitrary ENOENT.

PR:	253593
Reported by:	Gregor Koscak <elogin41@gmail.com>
Test by:	Patrick Sullivan <sulli00777@gmail.com>
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2021-04-02 15:40:25 +03:00
..
amd64 AMD-vi: Mixed format IVHD block should replace fixed format IVHD block 2021-04-01 15:31:24 +08:00
arm arm: add options GDB to std.armv6 and std.armv7 2021-03-30 12:04:24 -03:00
arm64 gdb: report specific stop reason for watchpoints 2021-03-30 11:36:41 -03:00
bsm Add aio_writev and aio_readv 2021-01-02 19:57:58 -07:00
cam cam: make sure to clear CCBs allocated on the stack 2021-03-30 19:15:43 +01:00
cddl Teach DTrace that unaligned accesses are OK on aarch64, not just x86. 2021-03-22 23:57:19 +00:00
compat LinuxKPI: treat firmware file names more lenient 2021-04-02 10:03:39 +00:00
conf gdb: allow setting/removing hardware watchpoints 2021-03-30 11:36:41 -03:00
contrib ACPICA: Fix build with options ACPI_DEBUG 2021-04-01 21:18:49 -04:00
crypto ossl: Don't encryt/decrypt too much data for chacha20. 2021-04-01 15:49:07 -07:00
ddb ddb: replace watchpoint set/clear functions 2021-03-29 12:05:44 -03:00
dev mlx5: remove dependency on ifnet specifics of linux/netdevice.h 2021-04-02 10:01:30 +00:00
dts dts: Bump the freebsd branding version to 5.10 2021-03-23 15:02:21 +01:00
fs nullfs: protect against user creating inconsistent state 2021-04-02 15:40:25 +03:00
gdb gdb: report specific stop reason for watchpoints 2021-03-30 11:36:41 -03:00
geom gmirror: Pre-allocate the timeout event structure 2021-03-11 15:45:15 -05:00
gnu Remove the old dts imported tree. 2021-01-15 20:09:55 +01:00
i386 x86: clear %db registers in new process 2021-03-31 02:07:35 +03:00
isa Move back the isa non-PNP driver deadline to FreeBSD 14. 2021-03-08 16:00:23 -07:00
kern cache: add high level overview 2021-04-02 05:11:05 +02:00
kgssapi opencrypto: Introduce crypto_dispatch_async() 2021-02-08 09:19:19 -05:00
libkern random(9): Restore historical [0,2^31-1] output range and related man 2021-03-24 16:14:58 +11:00
mips Clean up a couple of MD warts in vm_fault_populate(): 2021-03-30 18:15:55 -07:00
modules ndis: remove leftover sys/modules/ndis 2021-03-25 14:31:00 -04:00
net netmap: restore commit a56e6334d1 2021-04-02 10:45:47 +00:00
net80211 net80211: prefix get_random_bytes() with net80211_ 2021-03-24 22:16:09 +00:00
netgraph netgraph/ng_bridge: Add counters for the first link, too 2021-02-10 19:05:37 +01:00
netinet tcp: Shouldn't drain empty sbuf 2021-04-01 17:18:38 +02:00
netinet6 base: remove if_wg(4) and associated utilities, manpage 2021-03-17 09:14:48 -05:00
netipsec Revert "SO_RERROR indicates that receive buffer overflows should be handled as errors." 2021-02-08 22:32:32 +00:00
netpfil pf: remove obsolete reference to ndis(4) in a comment 2021-03-25 14:44:30 -04:00
netsmb
nfs Fix panic when using BOOTP to resolve root path. 2021-03-28 14:02:40 -05:00
nfsclient nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nfsserver nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nlm
ofed LinuxKPI/OFED: (re)move inetdevice.h implementation 2021-03-30 14:40:46 +00:00
opencrypto ktls: Fix non-inplace TLS 1.3 encryption. 2021-03-10 11:07:40 -08:00
powerpc powernv: Include NUMA locality information in the CPU topology 2021-04-01 10:25:57 -04:00
riscv ddb: replace watchpoint set/clear functions 2021-03-29 12:05:44 -03:00
rpc nfs-over-tls: handle res.gid.gid_val correctly for memory allocation 2021-01-12 13:59:52 -08:00
security Add a comment on why the call to mac_vnode_relabel() might be in the wrong 2021-02-27 16:25:26 +00:00
sys vfs: add vfs_smr_quiesce 2021-04-02 05:11:05 +02:00
teken loader: implement framebuffer console 2021-01-02 21:41:36 +02:00
tests Add IPv4 fib lookup performance tests with uniform keys. 2021-03-30 14:32:28 +01:00
tools syscalls.master: Add a new syscall type: RESERVED 2021-01-26 18:27:44 +00:00
ufs softdep_unmount: assert that no dandling dependencies are left 2021-03-12 13:31:08 +02:00
vm Clean up a couple of MD warts in vm_fault_populate(): 2021-03-30 18:15:55 -07:00
x86 gdb: allow setting/removing hardware watchpoints 2021-03-30 11:36:41 -03:00
xdr
xen xen: move x86-specific xen_vector_callback_enabled to sys/x86 2021-03-15 14:20:21 +01:00
Makefile