From nobody Tue Nov 17 17:01:43 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 4jTWGv54P0z71QSS for ; Tue, 17 Nov 2026 17:01:43 +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 4jTWGv36QWz3Pjy for ; Tue, 17 Nov 2026 17:01:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794934903; 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=+9MgbzGAYVk6ZjhymLyWYMsTzpkhZF5Cg2M/dEo94DE=; b=iKuqURMc43pEoSOCLjgIo2VkHdZMwxgiEsAnA3cv4MWv1hD2MJ1xO03tfgOizn5+IisfLX 7yk8g8Z3d8hD1npK8vsnJeJzSu7C5s2NIHncnBjAQzblszvkGSEFzniye8TCSukNjgVGQ3 EzqG8WSnWpHLps6VkRMJ2Aa1fyoNqWZ8JKYIkoGoZZwygZAgBIAYd3cW99OJOAbfZBq495 KajTusxDFqirq3x0SKNtEhPr4JRQhNMMxEntIa7YbLrT7nlRPdCMTCKkd1G4/4dUFkSnQa uEwitKp63/ZyocawTOUp8le7yC7R4xcLntTMw9UcgyweXeKc6k/cZWeqtouHew== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794934903; b=IpRieegwHxkn+fIW+mKFlxBHcYHnGGMBznLIqFhIoM+LsEXSo4wtwhwaxvNHESNpNlEhPd 1aj3xbxs+sTK2fywaKKKhP09A9QUm8N5wfRoosIklj+WU9XrYneBQsvc6E45Yy4mZY3Jba HPKOByON1g+EWfJrBdihfG3v2LKgViqJZXCeox2XsbZatGYfT3QsbqU/U0DiTYIRWII2R3 mIUMzVAXnHu+YnQQfQb3lum6xhof4zQTEYeCM5BW3mdThAANGH0mZl49xeHoN1T3OVI8J7 tYJP682is4T0R7bade5igAeQ1lS80DLDLHTO7CvytKU3go7KqNGPyw/w/eDj6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794934903; 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=+9MgbzGAYVk6ZjhymLyWYMsTzpkhZF5Cg2M/dEo94DE=; b=DYpq0RaBbcdFeM7ZxaeDZahQY2tGYCQC0TKg4I2LwwaTI5Z3NKM8czGyo4XXW2LoaR8Aeh Rya6TxhZCDCNsQIzC5YEJRKMbl/bMoHbsCRK8FynyB8uS/XdOfi7AOzEyfGBYrCneWv2tk GN1gToDrJIGXl/36I7gUaeyc4IJ1WoFXmsWXAIynyBqP0iC6/t/TV0CQXCshGihfnT3fdv ezjNAdhsqmabPU94kesh0wfWYKkeRLFGBnfM9YAXdpcQmOOLS5gycAftwa+80ABO4GSHZt QFzcvbLY3ale0YFNv45XAeF439jrfrWTJEOmr0zndcS6KbHfCEWL+pmf0fW4xA== 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 4jTWGv2kn2zr7t for ; Tue, 17 Nov 2026 17:01:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e2f7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 17 Nov 2026 17:01:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Konstantin Belousov From: Mark Johnston Subject: git: f3e70613c052 - main - lookup: hold ni_rbeneath_dpp 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f3e70613c0522029b2bbe981a0e05c9932b15f24 Auto-Submitted: auto-generated Date: Tue, 17 Nov 2026 17:01:43 +0000 Message-Id: <6afc8877.1e2f7.27f2b33b@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f3e70613c0522029b2bbe981a0e05c9932b15f24 commit f3e70613c0522029b2bbe981a0e05c9932b15f24 Author: Konstantin Belousov AuthorDate: 2026-10-23 03:59:15 +0000 Commit: Mark Johnston CommitDate: 2026-11-17 16:57:00 +0000 lookup: hold ni_rbeneath_dpp The vnode is held to ensure the validity of the pointer. Approved by: so Security: FreeBSD-SA-26:81.vfs Reported by: pjd Sponsored by: The FreeBSD Foundation --- sys/kern/vfs_lookup.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 6fb1d33a0e37..abf306ac9102 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -261,6 +261,10 @@ nameicap_cleanup(struct nameidata *ndp, int error) vfs_rel(mp); ndp->ni_nctrack_mnt = NULL; } + if (ndp->ni_rbeneath_dpp != NULL) { + vdrop(ndp->ni_rbeneath_dpp); + ndp->ni_rbeneath_dpp = NULL; + } } /* @@ -422,8 +426,10 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, struct pwd **pwdp) NI_LCF_CAP_DOTDOT; } } - if (error == 0 && (ndp->ni_lcf & NI_LCF_STRICTREL) != 0) + if (error == 0 && (ndp->ni_lcf & NI_LCF_STRICTREL) != 0) { ndp->ni_rbeneath_dpp = *dpp; + vholdnz(*dpp); + } /* * If we are auditing the kernel pathname, save the user pathname.