From nobody Thu Jan 16 18:08:25 2025 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 4YYrT572GZz5kktt; Thu, 16 Jan 2025 18:08:25 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YYrT53Sqtz3Rrt; Thu, 16 Jan 2025 18:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737050905; 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=5wFqvxJsurgCMGxUvWs464Ypc7esd5+73eePteIuqPc=; b=O3zH1MdNmNMiytNbS1NcKTtES36+MB+tA6nAJRa55pt+ozBxvh2ESWTX3RPpGpGPLiV5F8 iwHk1AzrOoKcrYMcdI3U999XMAyIaFlZGqaSOapjDdlyhLH2XAgHcqQjKhF3mqaXef/cEz ukkTpaNkvQlmopJ/IMp6mht7WA3dgGdgxhcAYQIoPHpH9/0mKvkrGexDOit3kytTYJWnnn ZT+wnki9gRdF6GkhYoPmtwks8lcHREZk8kmZDdEoahI8g0CDV5prRQn1+h4x7gP6Ai+Ev+ +6VCy/SwTO1nRXtsdvcZcDSbE+IV62+P7Xq3A1xDyAoWroEHTQwUGXnppm872A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737050905; 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=5wFqvxJsurgCMGxUvWs464Ypc7esd5+73eePteIuqPc=; b=gVxeQ2bHwaEf1bRyd/i2oeF2gSGUZuM+hlrr7Qrc4nRp57AVMV6dDSqBAxlF07kqARDkLz 9+LdOI1n6u2MiBfFw19cmuKRCOyJnS45lm7DodrUZ1Zo23YW/eb9Uf368galaTZEOVVc9s wE/+vosgnOObC7WF6YmCrZ8DteGpuNoBKvxP6Wam9Sr/OGLYg/b/hguDdL04+ecm9t06eg A30CareZNM7Yhc56UPE4sBlp4ttG+17/B1sDjtxaevWhoG1eh2XYyr7gsWu/NcNDL7Ramu 2//hNU/5VQrhi4GuaiVIwENAfD6e+EHaaMUSMF/4SEz4LqM5N08QjCAgUelaVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737050905; a=rsa-sha256; cv=none; b=ZG3z8q96V1fipi7ReHBhXav/WOfwn53hBuDsHynQoxK4bhAbl/NYCYBVbXh0W+0u6Kzhmo ukwKZTBX3BSNUUNV07mzofMbyT2OZO8QtPHwB7ENZRY/FV/TcW4CWvTPOCSMzXJROvyuax sF1gU+gt84PpGowBgzwkpgJsEq24ixs5QcRvuzdrL41mLNgageLARMi7PjBGDJofCfY6pY k34tfvcfaY6m62dZBmXnSrXnNilhVf6hEGxzyZsI8ebvN880XIKZSL0rSOkQz+Y0qnhwZ+ jgkzc+q3jRtfnSyZUOElZ2ld8FI7tRFqDhbGSo7mzcOneweceGHxKkBm5Sm0ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YYrT534VqzkN1; Thu, 16 Jan 2025 18:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50GI8P1a092284; Thu, 16 Jan 2025 18:08:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50GI8Pcv092281; Thu, 16 Jan 2025 18:08:25 GMT (envelope-from git) Date: Thu, 16 Jan 2025 18:08:25 GMT Message-Id: <202501161808.50GI8Pcv092281@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: d8b77cc05ab2 - stable/14 - nmount(2), NFS: Accept 'ngroups_max + 1' groups in "export" credentials 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d8b77cc05ab25500636d0d34f10a8a9091778914 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=d8b77cc05ab25500636d0d34f10a8a9091778914 commit d8b77cc05ab25500636d0d34f10a8a9091778914 Author: Olivier Certner AuthorDate: 2024-10-08 09:39:08 +0000 Commit: Olivier Certner CommitDate: 2025-01-16 18:06:58 +0000 nmount(2), NFS: Accept 'ngroups_max + 1' groups in "export" credentials There is no technical reason to limit that to NGROUPS_MAX, which is off by one and just our minimum maximum value. Reviewed by: rmacklem Approved by: markj (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47013 (cherry picked from commit 84337218786b13f0ebfa834d28de41dce02bc937) --- sys/kern/vfs_mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 206618b4ac6b..1990f3714ab6 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1498,7 +1498,7 @@ vfs_domount_update( bcopy(bufp, &export, len); grps = NULL; if (export.ex_ngroups > 0) { - if (export.ex_ngroups <= NGROUPS_MAX) { + if (export.ex_ngroups <= ngroups_max + 1) { grps = malloc(export.ex_ngroups * sizeof(gid_t), M_TEMP, M_WAITOK); export_error = copyin(export.ex_groups,