From nobody Mon Jan 19 10:53:06 2026 X-Original-To: dev-commits-src-main@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 4dvnNy2Jy7z6NZh4 for ; Mon, 19 Jan 2026 10:53:06 +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 4dvnNy1L0Rz44CK for ; Mon, 19 Jan 2026 10:53:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768819986; 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=dY+0orwSn5Hq2vikt6GBuZcxKA9HY1vJ2z5d929+tXNx56AgZNJxmkK1k/bDvEfIzfasCs Unk310GitU0KIbIyHze3c7Gj0yhL7ECoG3sB3R9CNl+d7rqXO1URUPOKyCh3nbZV/ge4Lf jNy4lEypxmj4YGgmIdCdi9O0KByNP6STiEqvCEvVTBm7RGmWaybWfvFMNgwn0/zniaEf4S 9HwmMDH8GpefEb3UdC4ERQMDCkAy5yuEDduJFRvIyB/FNyf0cIs+kL6Qutfq8Vf2K4fNMI 4sgQEtKSRogYOuUVRJ4GOa8uC5o428yyFiNZSuw8F6xmgqVB0DNcdWfIrIjEnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768819986; 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=x8gFauieJCXImcdkfRULuodFHmBReGvG5ZGv7raeM7uZUvI64TN/O5ayVIJDbzVyLbv0Bi uC5D+KF6Pj/zvfTiXneREFUeRliQ/RKTacapuJyWc/zQCG9Bo8cjfX4m0oKJpwTn9Z1li2 1HWOiTKcZ9SzBQC7A4sr4O793Ep9VmwYCzt/Rj8cBTkAFxlfFrDllYaDr3rV++psCJVdJO cvKIbQgwbboqgQuQzrjuBlayvdBwq1FHovMf7FvuHMeWjqqcHVjpY9bRhanxbQpKf+em9i EfYkC6AgmoQM2gsyY5DrX9mOww7JwVvWvSLCuC/F3wCVl+Ipo1Cd4leupY74vw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768819986; a=rsa-sha256; cv=none; b=yqw/kHAD4xeOxF0iz2UFjLjPG4EUYlSFZpUuSzRiqRHADzanpiYuXOKuUEjD+iOdfgtXAF svCKl1kx+UwjGQ2MQtqhLaRzLnR92S3u49xAY7Xm+4ibzvW/wvvtN4jwtRovs94hxmVDFk SHh2MvYGURuRovDJlJxWjIaXWKVPUFMO95ZueoYY9GR3qAK2UGmnfvrd0he7Er3vP6ZiNx FSAtVloJLx0SOAUpS1Uou9Gan1SgCdxQwPl/qiqU/7E4XkL/wRwS9hxp99BXuHp+nnD9Sd JcvmOLCeSqUY94t1sEO5wF0U6MtnPK5osyMJZgG/tp1gqNGgSTD9R2BLwrhrBA== 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 4dvnNy0r2BzCmC 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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