From nobody Mon Dec 16 14:45:28 2024 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 4YBjRF0WrFz5hWW4; Mon, 16 Dec 2024 14:45:29 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YBjRD4D7Yz4ctM; Mon, 16 Dec 2024 14:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734360328; 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=D3eM65N/Ur55LOpyYdE9VorZdShupPox0VnNUPWt1UA=; b=CMENu61BocDbeIIuBeT/ykrxzj1GDkbj7BGVNWq25F60SUtDYkL7poavwgeHVPJhgHTlwX U6E0mkQrRP+TaWlmbu9tUt61cIayJJvX+n5kzeZ9Cirr+s3ogu51Uz176gYExk1aGF2/E2 JX62tMSmAf+S5IRvLrMi9+LmHTuRNohPDOaHzGs54vhoAKMsc82RHM80IHN9B4+OwB+wnF zJRpYbwgfbTMXZsSmEGybqgS+nn3sF36PoLerz5X/Zg4ouDM6mSWHC9x420X/qmsj5DXF9 feO5phig3stmIhOqSd5Iyiz2jJYJzT1KadndbPfhuIFabu4wS/iKVqBZ479fTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734360328; 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=D3eM65N/Ur55LOpyYdE9VorZdShupPox0VnNUPWt1UA=; b=j8OFyW6FZz5j47+sb9qs4QWVi6eoZ6UcpRPS/t3ASL3FKGTGxakIbH2O3iLfA1v2M7JnSR l2SKIa5JUj0/F8UR9clZUYqckfBj9eNBNTDf2IYte4kbbSmFytZFYV7spNyJdCwMZOqbgG UyrQJtPK+iWQujOLxIkI2esl2K8aRlcdl6v15/ZS+aR2mt75tSTyHws8dzlYxh+Qz8Pj4J +trbzWfBa8AI7FVR03ngOMMz1yUJVFPfJWsEfdVS7T5bkdpafGxUZPRFNuu99Yw9RAuUs4 dp7nmzBwArlfJZOhEwRfkL0Rf3zcYuh9bYXPIrZoaiwnWeyO2Kmugdye1+FR4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734360328; a=rsa-sha256; cv=none; b=neaGRWq71X7Kbzsy5QTEOfsG/1Y2ea8k4NH0dW+XyuSbejTrMQVToV3hLwPK+vpThCXupy pBgfWAMQ6HaT5ny+dFWo6ZO8eWOFuWicvSwndvaMCVuMoKzb50RHiVxiZBP6KxKQBF/w2X TjHCY/OaOmiBjbB5jAAKkIS0E6JY55MG9oFDNAZlHQ/iHYlnnMc/jrHg/QuR+peDWDKKib 5a14MDGDwTrq8zn8GeBw+oRJMYgsyf1MD25zIVZFSJsbxHYp//wWGoJmucBhmeOfsfne70 0B/pb9MI1reYknWvQG84S4muCCRb5JyWRoTYbuvnM3gtRd2LJBjNBRJ98drXQA== 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 4YBjRD3nHbzxBB; Mon, 16 Dec 2024 14:45:28 +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 4BGEjSl8052062; Mon, 16 Dec 2024 14:45:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BGEjS0I052059; Mon, 16 Dec 2024 14:45:28 GMT (envelope-from git) Date: Mon, 16 Dec 2024 14:45:28 GMT Message-Id: <202412161445.4BGEjS0I052059@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 84337218786b - main - nmount(2), NFS: Accept 'ngroups_max + 1' groups in "export" credentials 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84337218786b13f0ebfa834d28de41dce02bc937 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=84337218786b13f0ebfa834d28de41dce02bc937 commit 84337218786b13f0ebfa834d28de41dce02bc937 Author: Olivier Certner AuthorDate: 2024-10-08 09:39:08 +0000 Commit: Olivier Certner CommitDate: 2024-12-16 14:42:30 +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 --- 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 f5ff8d54fadd..a09a3049d79c 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1497,7 +1497,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,