From nobody Fri Aug 09 14:49:16 2024 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 4WgRd86yxyz5S9QN; Fri, 09 Aug 2024 14:49: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 4WgRd86RQMz4gm1; Fri, 9 Aug 2024 14:49:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723214956; 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=GOqO6K1HZFOOiNbCByQbKcRaG/5tP0qJ9YicdR9mBD8=; b=WoTCwdpSIZkqoAnZeyEQfxv7ZM8h5amPYHTz3Hc+rEeX/Eede4JBQQZfl2zEkcCt5jJTZp ZU3yp/QtqDxG12hUkvWIFY6fyMp8d7iTc3mEawsvb9QQ7eafMaGruUZrVaQ2t6O37qsjKL LIP6AgAiLKEFvCgZJjIpgMrmPxsoRsSzrijKIukddsOPZM545DPHztSeXSSlvrBXvGdK0a wRH90IxUA1Tggh1kVy4y3Vq3xU5mD+MAe1hTdzld8GU29IM9z9Ht9nacc5QFbljBKE1y0R IugoHeXKDieHVh9EdCk1BBLC/8juqsGG2qg2T+2celZPV2JTXkLDOm3RnWc9LA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723214956; a=rsa-sha256; cv=none; b=SDDQX8748MUWnxIPylDNSioRFYAHJkVOIJPP9gONNvGxwmGcfSkltfgtq8qb4kIZmisBdM n62kWoxPADMs+1+wCD70gJKf2nFog1HVq9K26x4SB0QTxKIfq18GvK6TdsWR85T9Phpf/n pIG9FYoqNsCaRPO/rrbj1nbQr3Q0pqtIHQVYBzkXIEfgKvIzkFCXnQtA0+7KBSfxf6weH7 AG2MQrT3E48R5V+ScrNjE4fhS+yfKmACLVp7p9F1krI+/6hISiWyGt78plysSWk7qhlbYR rC9TCHU/hqQ4ABKw8aTIlvK69ycQoL/fzShF0E/It2hfruHsPLd+HlFMbuMEow== 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=1723214956; 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=GOqO6K1HZFOOiNbCByQbKcRaG/5tP0qJ9YicdR9mBD8=; b=CUYmL/tA/lLTBqIiss15k5OWmAOwGMWaxl0XJVp3XANcHGHT+ULESoe8tU3f2qdBd5b2Vn +9CMT+ys/SWZhffEZw+CnHnccxh64cEhC1a5EYH61U2/4J2XFtzGJ585q6t9MfjaND/hX0 KNrUFtevu7sgiW/aDSC14mBCtYR3v4PLdu3rxSpVF+ugDeu3YEA9zHNQGB06YW68/jXERy brSa2liB0zv+6ZL2x3jNjuwiD/1gRTz18ZjVQiF7FHPpvB9WPFXbo29j+OIahfMXTIovFT E/BF190EnUSgAnbY+F7YgivAFAPDvQfzjTOr1NzVVr2M9+402LnM2HTUzeEIdA== 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 4WgRd85lm2zKt7; Fri, 9 Aug 2024 14:49:16 +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 479EnGnk013714; Fri, 9 Aug 2024 14:49:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 479EnG2i013711; Fri, 9 Aug 2024 14:49:16 GMT (envelope-from git) Date: Fri, 9 Aug 2024 14:49:16 GMT Message-Id: <202408091449.479EnG2i013711@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 6ee6c7b14664 - main - acl_copyin: avoid returning uninitialized memory 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ee6c7b146643170602091e8c330314e4ef47b42 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6ee6c7b146643170602091e8c330314e4ef47b42 commit 6ee6c7b146643170602091e8c330314e4ef47b42 Author: Pierre Pronchery AuthorDate: 2024-07-25 12:44:17 +0000 Commit: Ed Maste CommitDate: 2024-08-09 14:40:59 +0000 acl_copyin: avoid returning uninitialized memory acl_copyin did not validate the return value of acl_copy_oldacl_into_acl which could lead to uninitialized acl structure memory reads. Reported by: Synacktiv Reviewed by: markj, emaste Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46125 --- sys/kern/vfs_acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_acl.c b/sys/kern/vfs_acl.c index 20a58be02948..fde05478d41c 100644 --- a/sys/kern/vfs_acl.c +++ b/sys/kern/vfs_acl.c @@ -145,7 +145,7 @@ acl_copyin(const void *user_acl, struct acl *kernel_acl, acl_type_t type) error = copyin(user_acl, &old, sizeof(old)); if (error != 0) break; - acl_copy_oldacl_into_acl(&old, kernel_acl); + error = acl_copy_oldacl_into_acl(&old, kernel_acl); break; default: