From nobody Tue Aug 13 16:44:43 2024 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 4Wjy0W2Gc7z5T20G; Tue, 13 Aug 2024 16:44:43 +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 4Wjy0W1Yjdz4RTK; Tue, 13 Aug 2024 16:44:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723567483; 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=GOfPAQzbTvHVRnFP7z9cK/rMk769s7amrHtLwFjb4QM=; b=F7N4FxlYL7lj8fIxPZfEDcmM1n4GN4GsQF82mHwMm6xQbNCZKC1MNc0DF9O2ww0FW0EhE8 QQIBp6LjbR1axsRspItiVJPReKhNtNcxkMtnhYX26UnF65Q1u5rOOqnasSFRz/7BbFnHUJ sr3VkCD6AYWngxi9mJlEe5qPqUR9dMyGfK9DP+5bpwZ1Szf7VsswmCHwsNBXvPCPmC9Xsj OMfF3p57p9opEloYXIWdCGpwVaM/odT+Kf+XTHIlod/vlkHq6AzfoaorUCMpvmMosyBsql xpZdB4JNA62lrJl3yFtiifjvKkin1REn9Y4ika7K40UtH9fwcqI3lJe2wtU7Hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723567483; a=rsa-sha256; cv=none; b=iMcyJwMbwAgvwek9CWQLBZQ7ly8trQTpTMGPGTS6hM2PzstAilqNTH8leLuur7LQAHP7st H1k8m6jsPes6s4XP9Ejh59Lsyf4mTrF0Vg+wgprUrM8vstIlP4fpeTdHeYz3/LYUXH6ceX UaSU5Qg7/dEgpxgGAJdGGECWPcOFg2PI0HvGwWggNyMFR0Dho8kypptqpUR8Kx5sXadgmp xTrI7yYGFV15g/4iexLF0SG+QobyDWJWtE72qopVQIUSr8f3aNeS41LIYbFw6OLc5NUBcQ na/27HQO+YOOrVItU6TrnHXo6X/kMlTBIYPKQ19w/MXorrxlmgIN270XiCkk3g== 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=1723567483; 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=GOfPAQzbTvHVRnFP7z9cK/rMk769s7amrHtLwFjb4QM=; b=LbvmfM+OgLBbdtblstATUVwPHp6I1XnK/veGrnKL2az4cIwZzduQEmPnHbOB62CP8LfUtF Q05ewgouQVUbqI/KC+GnNdvni3lIQGBlIASCe4TA5zqqKhMTeiIS1SrXlODRI09xmr0ZKL IVzJFuiWBRtJhOuWT4hoddC7XgQHkfK/P/NPywn6s33CdY12TIsa2WSBPtzSXc28F0TmrJ hnqiiZhfl7uoW3uaFtOdG1JVDcICLW7cNdptza4eYvCOK47VVHGH8LJOSPbShV47ajnvW8 FzHyB8IFJ/vwurc+1c4irKx7lI3iNFUWwIft6UVeRbkZUlwB/RLWSW1Z4FwTbg== 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 4Wjy0W1B0ZzJvM; Tue, 13 Aug 2024 16:44:43 +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 47DGihCk067568; Tue, 13 Aug 2024 16:44:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47DGihux067565; Tue, 13 Aug 2024 16:44:43 GMT (envelope-from git) Date: Tue, 13 Aug 2024 16:44:43 GMT Message-Id: <202408131644.47DGihux067565@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 1b30c5d3a515 - releng/13.4 - acl_copyin: avoid returning uninitialized memory 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.4 X-Git-Reftype: branch X-Git-Commit: 1b30c5d3a51580530fb8275cd96c2241adfbea1d Auto-Submitted: auto-generated The branch releng/13.4 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1b30c5d3a51580530fb8275cd96c2241adfbea1d commit 1b30c5d3a51580530fb8275cd96c2241adfbea1d Author: Pierre Pronchery AuthorDate: 2024-07-25 12:44:17 +0000 Commit: Ed Maste CommitDate: 2024-08-13 16:43:58 +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 (cherry picked from commit 6ee6c7b146643170602091e8c330314e4ef47b42) (cherry picked from commit 6bf5c32ad8aa1f1602b3cefb0b5e5918db287335) (cherry picked from commit 8f16d9f7dc8c119f8ba9ff27d4ce9c48d0b56d11) Approved by: re (cperciva) --- 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 f65f210abe97..ea250104aff4 100644 --- a/sys/kern/vfs_acl.c +++ b/sys/kern/vfs_acl.c @@ -146,7 +146,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: