From nobody Tue Nov 17 01:09:31 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 4jT68C2Mybz71Psn for ; Tue, 17 Nov 2026 01:09:31 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jT68C1dqjz3C9Y for ; Tue, 17 Nov 2026 01:09:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794877771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kFnbB+LH+A1Ej3BXI4Z2g8VX9s7qA0Fadwkt55h4LOs=; b=Ttz7++ioJ2RV/WiLRtgNBOElHj/SxKspAW+rA0vXe13Y6ISGByMFxx6aFIjgWOVQhrNy8v 6+9wF08eCT0cKaaKDjAR208/D5j40d8TMBmvVNdbJYmY4dIbVxCdTUFS+sCb7bEUQe4cvm RuoQT10k3Jc4BHYOKMtpXZYmD+F9kyKalmIguY/V2ZCszfuviCyqpkb3+HE4BJ/U40oAui 2c3FBVvxZQKqP2/7SJ9ppu2zHARw8/hNaieG3U3nSwHS0Zl+Awl25hpmwY4trndXCEK+vf dAVPVUiJYld4Zqk4AS/0Gp2qALFtpbTF+H/v5DLVoymam6mRlWzvfKcSJn/JJA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794877771; b=FCNQ3fRLmjpK7fOiY1YU6o2s8oBqrkqnEDEgvH0ugqp0CsZW8ZHUkMheOw+IBHZwAsMxV3 IuHlhDl4F+bfDcF6BuvNZN9jvYP71OuZ4Qg47NpcosR15VizprJMDx6JLAhlrwiqbkKP/8 OqWEGOUpXfwVt15g7/48CL2CM2ETzUBrzYo2k1YGkpCJG6igwb3mlgGqyzUheIFoiVLYyc X2HAvDCRbNQ7LhIp6f3QO0R8kwy0vcLxUCLoFPyyiqKQ87PFLY/KiURpRGanjiMC/LPNQS 6JZoFqz8OOI5KdHiPlEXFdhGScdj26qFMG8bOv6jJ7d0T+mbttHpZ7LO6ys+zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794877771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kFnbB+LH+A1Ej3BXI4Z2g8VX9s7qA0Fadwkt55h4LOs=; b=p3t3igrATbFWEEmWfuBW3I4vU0qyRhNXQ+BR3/c/2Zyy3nV3ZlPsToIES+CMNtRlVVJ7qF WiW4VTezYXu9R1sf+bhRcWoq37vHcHcy2fM5Nmu+4sTDFh9rt7601H3EJMMSakuRpvkTt/ 3VJjd7/qLc2NHlVEUfPbZsT92Cm2QKhxicUhnEKJhK0ZQzq/Dxxjdu4FQicQSipjWPt/em RihN0dQypu5M3CqfmGe+aPAwmIPrmKwNyxBCZVvOPiEAZ1rC5a+gXvyjoO6olEKTbmGuMn jq9nprI12Lr/GD1izXTw/4msapEJn+gpjWwX26LcHVD93FLMm8eLBtLWbhRZKA== 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 4jT68C1JkzzHlD for ; Tue, 17 Nov 2026 01:09:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f65f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 17 Nov 2026 01:09:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ricardo Branco From: Konstantin Belousov Subject: git: 515f5d89aa2c - stable/15 - namei: Preserve ABI root for absolute symlinks before fallback List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 515f5d89aa2c6ce5cd93d4f56621f4ea49072417 Auto-Submitted: auto-generated Date: Tue, 17 Nov 2026 01:09:31 +0000 Message-Id: <6afba94b.1f65f.380a786@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=515f5d89aa2c6ce5cd93d4f56621f4ea49072417 commit 515f5d89aa2c6ce5cd93d4f56621f4ea49072417 Author: Ricardo Branco AuthorDate: 2026-04-26 16:44:39 +0000 Commit: Konstantin Belousov CommitDate: 2026-11-17 00:24:56 +0000 namei: Preserve ABI root for absolute symlinks before fallback (cherry picked from commit 459ac3044b516af698d7342431bdbcf784fdf7a4) --- sys/kern/vfs_lookup.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 6f06fc8268fc..1ed8af81dde2 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -778,13 +778,17 @@ restart: cnp->cn_nameptr = cnp->cn_pnbuf; if (*(cnp->cn_nameptr) == '/') { /* - * Reset the lookup to start from the real root without - * origin path name reloading. + * For ABI-root lookups, preserve the ABI root while + * following absolute symlinks during the first lookup. + * + * Only force the real root after the ABI lookup has + * already failed and namei() has restarted in the + * native namespace. Otherwise absolute symlinks inside + * /compat/linux, including the ELF interpreter symlink, + * incorrectly escape to the native root (PR 289739). */ - if (__predict_false(ndp->ni_rootdir != pwd->pwd_rdir)) { - cnp->cn_flags |= ISRESTARTED; + if ((cnp->cn_flags & ISRESTARTED) != 0) ndp->ni_rootdir = pwd->pwd_rdir; - } vrele(dp); error = namei_handle_root(ndp, &dp); if (error != 0)