From nobody Fri Dec 19 09:19:13 2025 X-Original-To: dev-commits-src-branches@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 4dXhmy1rmDz6LBM2 for ; Fri, 19 Dec 2025 09:19:14 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXhmy00RHz44nJ for ; Fri, 19 Dec 2025 09:19:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766135954; 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=ZsxvHucCUAvyl9g/ScYzudek8KrB35X7i9wYz3P5FQI=; b=Ya5ndjOLK10/aNppGh9UMhvuggcBSD+SUMUP4kbAYcaAfMjh6w6D7ewPsAzF7GsQURPupn OsU9expA5fzij7An1ZpGoU74PoVv/0lcVN36DRylzV6AQYlMTd4LDzaJsAsq03iBxTZWSv mVJqG/DWfb5DKqo4OoEKvF1U8/OfmAgQqqWXtguegTsQSPcWPLKsiUF6dIcOVlgZ23QPpf sm/H5y0BGOMdWp28qVGpdYSTm+MRTc207foK9+dDd/surlvuz1xdUkyyBqANoOUUTP/R6p 2CF0evRA30yqmLtEPV0NmkDMj/wxdGloIT88MODee84PI6jMTsRd3l4b41MGjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766135954; 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=ZsxvHucCUAvyl9g/ScYzudek8KrB35X7i9wYz3P5FQI=; b=ep3uQnQDsU3rp57Vs50ofWS8AlEHcA67eD86/QAnzeOEjK1Lr4BuMjdsPZcnnFomeEgPAB PWc5o9YHqIHWjqpDBrA2ByZT5ZBiYhg1dDHIpU/zbmnBLcRQATz9rM4pG8m7K4Mvm5cvvk Wdjp2SVLyVxBlBNSgX+37Frx86obLyGz7JJV5tbDRX4YvPuuxWptcb2OyIfR+oNSsVL61P dA+7j2+4Uo+IEJ5/5cYYKZO+oDo34p6jW8vd2EmmqAdybICzVwCR75OyoRXu9aBJhd4ZdP amYwulPS1NuQ1g/gZLYibfbJQJlrNtRfIYFkmtcXlDIQjl9Rdjb73oqK0HJ30g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766135954; a=rsa-sha256; cv=none; b=cRscWuKm+UTDpxrOoWCn72b6R152qWTb/HHwSUiVeRMQc+ftoTdgnhxufOeAr1o+jpnP2y BBNwRpeFdjDlee6OhcChYV+R3erMdxAIx7PthAI0fU6+SL6pXvYuS4DhT0k6R+9fwr/1Af gEgBjezwl8bHWa64r+a+d1rmrcu61Kmr3T5jySi54w95nb/+Mgi3dOuqOSuLI4V6gN2Yvo cklgDsmlI//wLE+yRwVrsCh+0tJoVcgWThhqzofNt20ssmrU5L0VIiZIbU3eC4oZpDcYO1 P2s1/eJ4pjv3gblR4Ty0Nl/IF+4cDE+o/bikTPh5dsSKvVbIDSZgI1I7xuDt6A== 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 4dXhmx6gK2z1GYd for ; Fri, 19 Dec 2025 09:19:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ed10 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 09:19:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 67a2afe25ab8 - stable/14 - sys/rpc: UNIX auth: Do not log on bogus AUTH_SYS messages List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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: 67a2afe25ab8c4f93f82624d0f0a00cfa22f83bb Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 09:19:13 +0000 Message-Id: <69451891.3ed10.68037e29@gitrepo.freebsd.org> The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=67a2afe25ab8c4f93f82624d0f0a00cfa22f83bb commit 67a2afe25ab8c4f93f82624d0f0a00cfa22f83bb Author: Olivier Certner AuthorDate: 2025-10-14 12:54:55 +0000 Commit: Olivier Certner CommitDate: 2025-12-19 09:16:46 +0000 sys/rpc: UNIX auth: Do not log on bogus AUTH_SYS messages Remove the printf() stances added in commit d4cc791f3b2e ("sys/rpc: UNIX auth: Fix OOB reads on too short message"). Even if it can be helpful to know why an authentication message is rejected, printing explanatory messages on each request attempt is a remote log filler that could be triggered by accident, and the generic RPC code generally does not do that. These printf() calls should be restored only after some limiting or configuration mechanism is devised. MFC with: d4cc791f3b2e ("sys/rpc: UNIX auth: Fix OOB reads on too short message") Sponsored by: The FreeBSD Foundation (cherry picked from commit 2110ae0ef9d6ca8cf52b29fcaf926c4343f56826) --- sys/rpc/svc_auth_unix.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/sys/rpc/svc_auth_unix.c b/sys/rpc/svc_auth_unix.c index 6d2cb2359ffd..46e339019f88 100644 --- a/sys/rpc/svc_auth_unix.c +++ b/sys/rpc/svc_auth_unix.c @@ -45,7 +45,6 @@ static char *sccsid = "@(#)svc_auth_unix.c 2.3 88/08/01 4.0 RPCSRC"; */ #include -#include #include #include @@ -74,11 +73,8 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) const uint32_t min_len = 5 * BYTES_PER_XDR_UNIT; uint32_t str_len, supp_ngroups; - if (auth_len < min_len) { - (void)printf("AUTH_SYS: Too short credentials (%u)\n", - auth_len); + if (auth_len < min_len) goto badcred; - } time = IXDR_GET_UINT32(buf); str_len = IXDR_GET_UINT32(buf); if (str_len > AUTH_SYS_MAX_HOSTNAME) @@ -89,12 +85,8 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) * 'str_len' (and that it won't cause an overflow in additions * below) to protect access to the credentials part. */ - if (auth_len < min_len + str_len) { - (void)printf("AUTH_SYS: Inconsistent credentials and " - "host name lengths (%u, %u)\n", - auth_len, str_len); + if (auth_len < min_len + str_len) goto badcred; - } buf += str_len / sizeof (int32_t); xcr->cr_uid = IXDR_GET_UINT32(buf); xcr->cr_gid = IXDR_GET_UINT32(buf); @@ -112,14 +104,8 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) * read in total. */ if (auth_len < min_len + str_len + - supp_ngroups * BYTES_PER_XDR_UNIT) { - (void)printf("AUTH_SYS: Inconsistent lengths " - "(credentials %u, machine name %u, " - "supplementary groups %u)\n", - auth_len, str_len, - supp_ngroups * BYTES_PER_XDR_UNIT); + supp_ngroups * BYTES_PER_XDR_UNIT) goto badcred; - } /* * Note that 'xcr' is a 'struct xucred', which still has the