From nobody Mon Jan 19 10:53:06 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 4dvnP33vNdz6NZnC for ; Mon, 19 Jan 2026 10:53:11 +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 4dvnP31Stmz442m for ; Mon, 19 Jan 2026 10:53:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768819991; 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=FoPGmwyd7TdxgacRuesTRclcz0oHLJ3ggoLLD0zVkpo=; b=VvcbVSjfaMiHyv8UsPgajJoT9SXM/fp890p5KNApa/49N49Hm5AaYh+74RNpPMCJ4E3ed4 PWVDuZeqR4vdymH5XMv2O10efY24R1YPQODswI/CJM/d3CnTkL7PW9u6f0xgGkQcN1PAjw IN8QzLuk+g+LYbtSYfUDtwgu6T2CYdooxaj3XFFE7K3q6ZB4pgWFt53yJZpzAOARbA3DqU cIiTXt5cHuyZQAUf2fqv/NhpBCcWni9gWgOsHf0LeCCswU9LpJpdIrX8niYDsgQwBXFx3S MVhwCkxtFD4ZGsxHQc1rD5/uN5dniWCVzPzOsdMk4Hn+zM6uP6nhCpgiRhQXeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768819991; 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=FoPGmwyd7TdxgacRuesTRclcz0oHLJ3ggoLLD0zVkpo=; b=pKeQbLWAeUCN/sBMRo2goMf4Im0lzfWviUv7rD0U1i6oNX0tQrPJUt6v8XerIqfZh2YSO7 VMjnGIpl+gN8pYJ/FmXAsSwCn7x9cNO2aKSqq/eESc4PfBAmcJCy42KIlLgX5fAThhNxgy pGgdMpFSLP/ZnnPMWUEKWoBrsidu3duTnlEwf0R2t3Q2sUXkX0amB3QPfZUedl1fgyurMD pIUbgLuw2L3yyVYjK6sJ/PpLWT/ChwsyBo+2xdNhYGkpB4jLMSJaME8oM1TfidmBkWyOi+ 5Pdq/C0WKoMezHYbotuWHM9NfyOHLTyccFewB3Xk1PyjOhiOCFVBv7rDJYbDtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768819991; a=rsa-sha256; cv=none; b=TL0iCDSSYmf6f0PWvxY0Obcmp6ciDXNDlw6JHOCCRJ0YkFQGIUuM9mVwOKCRH1rZRKbXuH xDbt0ksa3gO7nBGDiCTGT0Yf2f7NLmYB3zfaA0Uj10qGX8L/k//r/Gq+b27pu0rCtmRC6n aVB5alH0czODeh5fDYIvMAsZiqMfUtwbtzLfR9dPrtcaE7Z8i3fR22hXcaWUC1wQR76lI/ i21y+zaiPdW5GYC4SR8ButgXRNP1+BhMFySTUzYxr2JKxncKniwbD7bgYRmYzxQrljktAf Qe9BTIc4T1HIDC8ombKIuYf8i0eKkNIKSmaHXJRpaOKv96Lxzwp7Da956nbVqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dvnNy0rXnzCmD for ; Mon, 19 Jan 2026 10:53:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 340f9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 19 Jan 2026 10:53:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider Subject: git: a2c87d4f88e1 - main - 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/main X-Git-Reftype: branch X-Git-Commit: a2c87d4f88e1bfe3b7007fa7148ebc7d37fc54cc Auto-Submitted: auto-generated Date: Mon, 19 Jan 2026 10:53:06 +0000 Message-Id: <696e0d12.340f9.18aa526@gitrepo.freebsd.org> The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=a2c87d4f88e1bfe3b7007fa7148ebc7d37fc54cc commit a2c87d4f88e1bfe3b7007fa7148ebc7d37fc54cc Author: Wolfram Schneider AuthorDate: 2026-01-19 10:47:53 +0000 Commit: Wolfram Schneider CommitDate: 2026-01-19 10:47:53 +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 --- 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