From nobody Sun Sep 08 23:29:18 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 4X25lM1Zxcz5WTpx; Sun, 08 Sep 2024 23:29:19 +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 4X25lM0x23z4m45; Sun, 8 Sep 2024 23:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725838159; 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=G8OOqOlbdFlU0q1nHqfT/YtgGk/It2DxdPVTwFIcnIw=; b=ce7P4HVmyZbiWMsH8Jyp5wOJcby93Shp2VvzR7/xBznzQ2Ia7UTQ7wuhcDHDk+gmOH3ApB xse8ltG+rAM59QVVpiPdDMv+7zp7gKflLnj1KuAb00gs51+/Rx/NR/8IcZkleS24oQWYJs zcGlCgUUzx4r6M4T1LBIcBh7fKzRDufXeQEw/AhA1S4iDK2GW6Q0SfvliAJIAYiSB6MmUU 2Hi8VliTxeD7xWpRrA/bZLbrize7WDQb+GHc4KHIhk9BD0dgXbeGfecPDgIvMEU55zfZUL 3mUebOLdLj5fiOtbdVamKpmJ1FkONWZewEzIjBd/ltR/F0o9fm082lpMCdbs4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725838159; a=rsa-sha256; cv=none; b=KlVJxR1FGdg1JJBHUbvRLxfufbDV7DF378vsZ406WOdKq7XGskNuJ8bN7Lv7qa/PTrDb/o 0WNFTtT3e3rHJ9SYxlwm8Vq2+lqQKCLhXclVe4Y9s+0pDbXzoeSPFjD7U8gc9FejzdVPDz lfWYwffhZnnA6lA1GpAcuAJ1FQiUI9pjl7IxSs/JbPgpVoieNR7hUv7OlgELEGattObnQx ML9+4/FV38bipqXwVD9CsIEAy7vio1+HvyBL2/RDekQibRXSGOsivGyPCyk3+8NeYpIa9m 4V0xd4GD2bDynkDnBCUaCr6qQJDbusiKL+KQOEtJYu9UpVDlbMKmcFIDXtGJlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725838159; 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=G8OOqOlbdFlU0q1nHqfT/YtgGk/It2DxdPVTwFIcnIw=; b=DbOYKlbU5G5utCMw3VDZKElPoNAKmApiMt/CnNQuFNqZylNUDa4vZ7Bavq9tc2NO4BT1dB /AhYSjIohfDe/6ryKtg7g1M6GvmB9cvGi64W2juepa2BgTtkrK011dGQaM95kc5YI/h0Cf /uwMj9BxC7Ej4g7bnxH7pqHUW2NJ89tAgr1/xgW1LHtj36sCuPqGZ2YOe4/khspeCLuRUY d4eotMq3w6cI6Lo+bpZzI3vBCkINsLyYFB2a75Cs5tLsnqBnCy3Ha/5f19eR3jqzV1PFgp xx4IDJkS7elF8TBYdxAzgBg28GzFvQt+khZzV5rBB0tj2aMeJzgylmpEpiYWMQ== 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 4X25lM0Vl9zfwQ; Sun, 8 Sep 2024 23:29:19 +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 488NTIYn042470; Sun, 8 Sep 2024 23:29:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 488NTIxr042467; Sun, 8 Sep 2024 23:29:18 GMT (envelope-from git) Date: Sun, 8 Sep 2024 23:29:18 GMT Message-Id: <202409082329.488NTIxr042467@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 44328abfb7ac - main - nfscl: fix uninitialized memory in nfsv4_loadattr 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: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 44328abfb7aca8150b07b83ff502c9185677e3fb Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=44328abfb7aca8150b07b83ff502c9185677e3fb commit 44328abfb7aca8150b07b83ff502c9185677e3fb Author: Alan Somers AuthorDate: 2024-09-08 20:42:38 +0000 Commit: Alan Somers CommitDate: 2024-09-08 23:28:33 +0000 nfscl: fix uninitialized memory in nfsv4_loadattr When processing an RPC response that did not include any Owner attribute, nfsv4_loadattr would return na_uid and na_gid uninitialized. The uninitialized values could then make their way into the NFS attribute cache via nfscl_loadattrcache. PR: 281279 Reported by: KMSAN MFC after: 2 weeks Reviewed by: rmacklem Sponsored by: Axcient --- sys/fs/nfs/nfs_commonsubs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 47ab4958f9c5..90b30f462106 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -1322,6 +1322,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, * Just set default values to some of the important ones. */ if (nap != NULL) { + VATTR_NULL(&nap->na_vattr); nap->na_type = VREG; nap->na_mode = 0; nap->na_rdev = (NFSDEV_T)0;