git: a893e8463ab2 - stable/14 - unmount(2): do not allow MNT_DEFERRED or MNT_RECURSE flags from userspace
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 16 Feb 2026 06:23:04 UTC
The branch stable/14 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=a893e8463ab2741204debd17901539708ec3a970
commit a893e8463ab2741204debd17901539708ec3a970
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-02-02 22:38:32 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-02-16 06:20:18 +0000
unmount(2): do not allow MNT_DEFERRED or MNT_RECURSE flags from userspace
(cherry picked from commit cd8d44173adc375b59a24b1363476c086a7c86b4)
---
sys/kern/vfs_mount.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 85d14a943d01..5ca7c43269ce 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -1733,6 +1733,8 @@ kern_unmount(struct thread *td, const char *path, int flags)
int error;
AUDIT_ARG_VALUE(flags);
+ if ((flags & (MNT_DEFERRED | MNT_RECURSE)) != 0)
+ return (EINVAL);
if (jailed(td->td_ucred) || usermount == 0) {
error = priv_check(td, PRIV_VFS_UNMOUNT);
if (error)