From nobody Sun Feb 8 14:12:39 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4f88t44VmBz6RlPw for ; Sun, 08 Feb 2026 14:12:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f88t43QCFz3RHJ for ; Sun, 08 Feb 2026 14:12:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770559964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aDadkuKknijmRy2fxy6yO3uKh5jvmIhZ7LffdkGVVeo=; b=HeklaF8SEShoF63eB7OXjw6QDjvLrmIimmqrgerekx7WqV1aGwM0Fes39W0bXcPvKrz7MR iw1y67q9HvBk/bG/AzBk7jCsZkCW2NchrnnP0+Ephm0HCsgmRD3DQU1qoOYITHdwQJhZ53 CGRfNdoLUYKo5Keep3yo6asRInmpXtKwp6VRA4TgJZErmwhNu84lo0aFEGVow5BDwktuLs /OAcNa72OpwdnZ5GNActr8tkmAXmNk04l8TTjj+szSufayZjWP+xuVOaOLxBfMzCYjSuXo tnsewOoSTalRlNAion2BYtCNYgkMFEuQQxpPJm1axSuwoXLpYhpC6MKnO+urRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1770559964; a=rsa-sha256; cv=none; b=r7AHEufIfB/vbhkCB35Ci6nfjlRqouB9y7dYV7mEgJDLRnykizlc6fHhqjRwjvLFsfah9y h4Sccj8wVcCLPV40ADgOs6zUBMEALjBWslJnkrlK8lBp/EKoTeThldSPxKMgGGJD75aCGN a4yZLR4LaQS/rJaBs0jLstpca1IbGgTuqvrhw0WL3CnadmMP+qXw4z1J1I2Oyr/ZDM+4Tm j+qNxGgv67gMyyMvQF7yoBjLLh5r2qqsN0xp4P7BTKouaLt1PYutaa8WSeDNgnMcXmgN2a Uo53eKVbP68lCNjple5OFHR+Yr/JSTPSoWGL/EuS/ZBr4OshP6ZGGAH0FMrTug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770559964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aDadkuKknijmRy2fxy6yO3uKh5jvmIhZ7LffdkGVVeo=; b=LtpSUJdF4gOwfXqgwa/nOI9G5pBs797FFS2ANY9aWNEhj3//PlMwrd5Glo81uFXzilTABd tSIt+rNeYpQ48T3chCWbSi6j9jPvXesB5n30YU59pliPjHssNaHkMsJPJPe8kESJxdX2p+ f7qAwSdQk8wPkIrUCkWa3tmD3JBa1n6XBZxu4tb0sjEh0HMY5WXxP6/5xYWSx4P98jozNO TFW5oRbIDNCk1bI+XQH0UcIgMBJo/S/v5nBg3qH9ArOmNp38cS6XCMsy92DwAqsmG34EuQ 0bhmcIwEMvIIvWkJPtiJSs9Bm2t3seE+bX5uRvb6hv0gvbFo1ffNKVRIAnrwfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4f88t42s01zrKQ for ; Sun, 08 Feb 2026 14:12:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3dd74 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 08 Feb 2026 14:12:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider Subject: git: b043ee53a643 - stable/14 - symlink.7: add a new section "mount options" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b043ee53a64381f818ec3098bbe8659fda30462c Auto-Submitted: auto-generated Date: Sun, 08 Feb 2026 14:12:39 +0000 Message-Id: <698899d7.3dd74.182db5b0@gitrepo.freebsd.org> The branch stable/14 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=b043ee53a64381f818ec3098bbe8659fda30462c commit b043ee53a64381f818ec3098bbe8659fda30462c Author: Wolfram Schneider AuthorDate: 2026-01-19 10:47:53 +0000 Commit: Wolfram Schneider CommitDate: 2026-02-08 14:12:10 +0000 symlink.7: add a new section "mount options" Add a new section "mount options" to explain the mount option nosymfollow in more details. Differential Revision: https://reviews.freebsd.org/D54530 (cherry picked from commit a2c87d4f88e1bfe3b7007fa7148ebc7d37fc54cc) --- bin/ln/symlink.7 | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/bin/ln/symlink.7 b/bin/ln/symlink.7 index 28d9908f2053..db251e1d2985 100644 --- a/bin/ln/symlink.7 +++ b/bin/ln/symlink.7 @@ -72,13 +72,15 @@ or a loop is detected. links that may be followed, and an error results if this limit is exceeded.) .Pp -There are three separate areas that need to be discussed. +There are four separate areas that need to be discussed. They are as follows: .Pp .Bl -enum -compact -offset indent .It Symbolic links used as file name arguments for system calls. .It +Mount options to ignore symbolic links. +.It Symbolic links specified as command line arguments to utilities that are not traversing a file tree. .It @@ -178,6 +180,20 @@ The system call was added later when the limitations of the new .Xr chown 2 became apparent. +.Ss Mount options +.Fx +has a +.Xr mount 8 +option nosymfollow. When this option is enabled, the kernel +does not follow symlinks on the mounted file system and return EACCES. +You can still create or remove symlinks, or read the value of a symbolic link. +.Pp +This option is intended to be used when mounting file systems from +untrusted external storage systems or public writable /tmp file systems +to prevent symlink-based privilege escalation and sandbox escape attacks. +.Pp +The mount option nosymfollow first appeared in +.Fx 3.0 .Ss Commands not traversing a file tree. The second area is symbolic links, specified as command line file name arguments, to commands which are not traversing a file tree. @@ -478,4 +494,5 @@ whether specified on the command line or encountered in the tree walk. .Xr unlink 2 , .Xr fts 3 , .Xr remove 3 , -.Xr chown 8 +.Xr chown 8 , +.Xr mount 8