From nobody Sun Aug 11 23:03:04 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 4WhtV06T0Sz5SQrp; Sun, 11 Aug 2024 23:03:04 +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 4WhtV05HP3z44GM; Sun, 11 Aug 2024 23:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723417384; 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=07Z/dAdKKlx1Ha3FjqbxuPKrJD8QQEENFLbQrgBZFCE=; b=vBRQmqUtWjx2HxyUwTWBVr8wK/zSD7Un549rokyfk72jfeGV3mEGdTnSLeTqCqKe/3NIOu JzKVY8C0LaABC1ZUN50p5ZxV+Hll2yHC5MGH4tI3dlCDQZhxQXOo3/FK+wn+/iVmwowClx X6oidCxducoht1ALTrTHhh5geBTkolXdHjuahkSM5XUB956MXdJ0MxTbtp/ax3ylGXJpen 1thQbInuBtD985l/oBtkhkN66nTDNidIsTI+urQgnpPUI/wF6RJvjOwV5m8ObJYcdR75g1 9jpAmlsBLP/KigJoLgJ5HmLX9CeHMvOz13cJwrGReDZu92GV2wf4G3vfIfYjUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723417384; a=rsa-sha256; cv=none; b=SEeeW9kbCIM7lIQ+7z36BBbOdsXeOq6Ym4BK06ePrQrOa0bOCk8A6C1H16Al7/GKmGJPik K2cZydx/FO1gJ3nKTcYKVFLWs0tNE4fEYeg3qJzCtQjuSg8yziktNcjxHAZc0M6lrf9Dnd zkJXH2gS5NgptaqZDxAH8MLnT95jT59Yy3uuTDnLN3YFMnG1C51ASEtp7dcLY7cXhUauYH Ka1kLxTErzVLLQKjJ8jfph0nAgPgQQDXKMXhO2jlalcZ927a9edD+OEX7u6ARPizB3B1A3 zILiWQnbbn6lFOsYZnFzLcURFJfPqLeyUcoXZF7G1yEEF761c7HhuEa52doT+Q== 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=1723417384; 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=07Z/dAdKKlx1Ha3FjqbxuPKrJD8QQEENFLbQrgBZFCE=; b=b3FSq2t60Pz/z9tqMAhX/skixvP5tRidMB6VK6bFedB0yy6OypvvgN4X8xHSfK5LZGaQcT WsV1S/h+FNEiGvlWzbVthYESeVRLTifsh1bfG7YRjTCfIaJw//FNUUFEgUHcRWwBOvKXHh F/sSJjvq4yab7JFWY6CsmMbNNEXzfN4U/04zrMdZBLrNfq7kMqXUoJqu7oKfI1XFZHYPi7 /qSWpRLzDfz3aE55CKWN4XJOzZ9qFWr9Bi0EHBLfXyiqaKNVh/UIFp7mRFJapID1U2NXoP Uj266O758BZvFkTopaAmi5x+86IM5/yj9BK7xwmshprWcWizewbTTtQ9mIoDmg== 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 4WhtV03wgBz13Mp; Sun, 11 Aug 2024 23:03:04 +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 47BN34lo032342; Sun, 11 Aug 2024 23:03:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47BN34rf032339; Sun, 11 Aug 2024 23:03:04 GMT (envelope-from git) Date: Sun, 11 Aug 2024 23:03:04 GMT Message-Id: <202408112303.47BN34rf032339@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: 6bf5c32ad8aa - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 6bf5c32ad8aa1f1602b3cefb0b5e5918db287335 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6bf5c32ad8aa1f1602b3cefb0b5e5918db287335 commit 6bf5c32ad8aa1f1602b3cefb0b5e5918db287335 Author: Pierre Pronchery AuthorDate: 2024-07-25 12:44:17 +0000 Commit: Ed Maste CommitDate: 2024-08-11 23:01:52 +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) --- 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 a0d6fe1f463a..fb1fc27867dd 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: