From nobody Fri Jan 17 12:27:14 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 4YZJs028Qkz5kvZR; Fri, 17 Jan 2025 12:27:16 +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 4YZJrz0DCNz3Tqd; Fri, 17 Jan 2025 12:27:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737116835; 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=mV7uVmyLtIdWz0P2r+L05aFjU1hKU6Vecye/P1kAwEQ=; b=Bj0rEf9wQ9eAn2Pn0HuqUrdIhqqBEOMnBadQL4Kwv6T5Cu5zzf67p+AKfYaoo7XMwtx5a0 WDuuROdhFl0aNo/m28lpK21KoI3XcO0uUgkPbr1YEmFaZgS6jwvgrCDBdk8dBF8deE+nUC cQszPH5bIe/bwzo6BvuD4Uq0ypS/dw8XMX8V5NMvwF5x1NPz70OJz1hxWHbCT1zEmL/QAo kPoEy4R8f+xr1PWBvNuMmdLT1dvhtGMPiAKToyLIyf41oce9SJGXeNOcMqqVcI0aSv0/mU r8KlIhQCO+uHped2Ha8UOjbvzlJIl1hT32zCQ3G+3yXZJHvA5K3g0akejK5sDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737116835; 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=mV7uVmyLtIdWz0P2r+L05aFjU1hKU6Vecye/P1kAwEQ=; b=sA1FxleLaJa3LIuPnXCxKtietpsxAQdda3Axy4O77CYTrIZKKmCYuUVzlPFaT/8DTVR5+f la9aXr3XcVgv2FDUHPkZj54J1gSFjlb7E91fT29DB4N/sAAffvrr0BjYmYm/FU+5OvkpYO +oFhjamImSLhZwqMhHAL4sa6IK9u+FkFdjoxiwtiHmOj4c+XoMx0QyS+B+ENrw/cbMZ7MP CLBYdYisJNzKJX81XGqWSM6QytaHTnUNTIsBw44PSzsj4RgDyTDqmMfC2Kb9ekFYhOUq5f Af7r/wKhDE30iWpQ6/C5CXz59fvjitwuHbnOcXDg/Mi5t9SXGXxzaCvPOAfQiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737116835; a=rsa-sha256; cv=none; b=bjhP7ufIUa4j6ST2mPj3o8Im52DDTQJ0xJZW93HQOseuaz6d43YUSyhJ5vfuuFhthzllmF hY+9j2nT9++uPGuY8Pa/fw6JI57+8+Ao+UXilbLhx1QtawdS7EB+9eMHna34Yo2MwLC4vE MGtJn7xKeSMruSxRRXW3FIz9nMY7u+ImtDnhNHmgv8bkKB/5ydW7C9mGtM2O+u4BrnGDQe yG2Z1tSpSmnfI3C5sUFmJIkfWaccwA6CWlG6majQRbFRYrveHN7StQR37ZTJ5YzumGNyy9 IiR07vaXHyjDD/VVhrFZ6l+YnQE0kCCU/yCaEo23oHUTnaHNGT13dM+tEtquKA== 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 4YZJry6x6kz2m0; Fri, 17 Jan 2025 12:27:14 +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 50HCREN0052543; Fri, 17 Jan 2025 12:27:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50HCREoZ052540; Fri, 17 Jan 2025 12:27:14 GMT (envelope-from git) Date: Fri, 17 Jan 2025 12:27:14 GMT Message-Id: <202501171227.50HCREoZ052540@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: 46f0ef933d28 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 46f0ef933d288c151accc95cc4717cf6abada83d Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=46f0ef933d288c151accc95cc4717cf6abada83d commit 46f0ef933d288c151accc95cc4717cf6abada83d Author: Olivier Certner AuthorDate: 2024-10-08 09:39:08 +0000 Commit: Olivier Certner CommitDate: 2025-01-17 12:24:52 +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 8cee38c7ec2e..11e3ddc2c64c 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1339,7 +1339,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,