From nobody Sun Feb 8 14:12:00 2026 X-Original-To: dev-commits-src-branches@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 4f88sF1Z4pz6RlXG for ; Sun, 08 Feb 2026 14:12:01 +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 4f88sD55grz3Qh2 for ; Sun, 08 Feb 2026 14:12:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770559920; 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=WmRAaa+KauXsB/uZonxhZlpOMUpVsmW1+p47mYAPwaA=; b=CSG/noaxHoVBXggDZZRJbGbAFSkAMGu492kg2/BZK8Xtg34FoQ7GKVDgiHI7+dF9qhvn3W H5CEdciVLqZSUz7/o+cMOhfzTf7ATe4ZAEy1KfiDYRMtfgxztQJBb/yYQYLGTWT6YHE2W6 qtxmwQgy9e5GJ7/nhnx56WmJTkEPfA9iOdRXmeLnDB86VQWJn7n+4Q9Mvwdog7aDbaHkGY XCE06J21BvGUmYQQqR5VK87sOGsX5BH9JPmBvw52QfQrpx97J+iN6LWxTF5ktSfWwYsYFe KNiJGhIEIzzSYIvF5nqvkwd69T1d262KsU0k/ltIYYxocQkWE7ADWXR4c+c7cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1770559920; a=rsa-sha256; cv=none; b=Qk0Nuaheub3cEFGue2Q85+07MCe9/SZ4HQTKSWS8iMbJjRSEN20DEjIrj16qxOhQN9n0nZ xpeWuCqsaU1PkKWZ9UzNVvfrsqILvx3+ZHg5Odrxw3R+s4fF1B+bBeDy0mV2Txui+Ci8Qo 5s0xysFN3j7igCsoC+cAS7J5aLeGK692NhlljQehNUDllG32Zb4/P4ub0IV6UQj7n1W398 d7JZh9qsGkdrqN/XzBEUXvmt45NfdCOi/p0LdeDljJizJBVOF1njwy9F0i+3LR2pvmZ07K QU82jlAgtZSBoWFP5AplmRHRG42yWLt7H5Tj6rIMEbXI7q2OcICMIEcisZ4EaA== 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=1770559920; 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=WmRAaa+KauXsB/uZonxhZlpOMUpVsmW1+p47mYAPwaA=; b=k83Z/Xc48zN+jjy3HKFr+6VdPYvmGJXVZou5ZA2snk8pwR6SmwftU/VdSy+2f5ND0BMk9k aPAeYUxyrjoT9fEjk6Se9XHYM52tWotakbO/zqQzgR51apfP1RU2IRJQnkJiE96CU3LYen LE3U0xPwYyk2fOzpAssIzQ8p5KGmOGFmzhnjteYJuH/IBSeKFOSrPyM+Lceeho74YICdIe ICzIeyIB+xDJrmIcgnPBiVRzGOzeMEB8iQQ53K9R8iWt9/uCnsH5NZyzSjHdoohIhpz8hL k8a3cy0RQf+QcI4zu+ALK6sHpDcvK2E5K9xzZtpHHTBW+0x2BWpm+at9OyuwVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4f88sD4Sv5zr28 for ; Sun, 08 Feb 2026 14:12:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 403bb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 08 Feb 2026 14:12:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider Subject: git: b80d241546f1 - stable/15 - symlink.7: add a new section "mount options" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/15 X-Git-Reftype: branch X-Git-Commit: b80d241546f13a347dce8285d8272cb4faf60084 Auto-Submitted: auto-generated Date: Sun, 08 Feb 2026 14:12:00 +0000 Message-Id: <698899b0.403bb.7164ea57@gitrepo.freebsd.org> The branch stable/15 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=b80d241546f13a347dce8285d8272cb4faf60084 commit b80d241546f13a347dce8285d8272cb4faf60084 Author: Wolfram Schneider AuthorDate: 2026-01-19 10:47:53 +0000 Commit: Wolfram Schneider CommitDate: 2026-02-08 14:11:40 +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