From nobody Sun Aug 11 23:04:22 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 4WhtWW0W5bz5SRVD; Sun, 11 Aug 2024 23:04:23 +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 4WhtWV63m6z455Z; Sun, 11 Aug 2024 23:04:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723417462; 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=dct+IiGgiCtcMAiRSvEJ0mhAFFC5NA+pYSU4z9iJasQ=; b=V5y+Y8H5eCaLlU8Hlb35LtH6h7aFQqW1iNvpX6cv0YU2tdaHuCh9k6TkrIywIHrUDYNT0g ISODHItXHGM9BBomwKxr2CxYPHReUKCGpse5jdEhoVVADjkHOMRElIikJWx01xBHo9VrUq HFIO5tXTJqOEUXT91sQKAC7P9m67RA6IPZUfsLYN7tiIyxCOH0Wj7MHhZnRUia4Gwquxt8 AxF6tzW650hTQfG7AtleYDi8O5BEZvC7runCYJGe9UF9+uNAJ+lfLC84wEpz9qe0G1woKv 4z5BT2ymr/qGWebhYoC/V8kSJiafF+qwIrA0mEE2uils+mCcQCBgR1GfxCIxYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723417462; a=rsa-sha256; cv=none; b=C7MxcE4rFEhPHKbG6tuX/uRxKlFI8iUKJJt48mOWh0YqQxk486i8XxDzmsGq7XfB/cPiyt ZKDxdWdYG37HzLpX/YRzmXZso2RS9E4Tw7XjUiJ1NcQbym29J5hdZyVy25A/o3np4UG8fh MAGlEzTnNecGJLUelbqJRB8hcMsAGJ/M38CnnRi7/aTLYlW2u1I3T13Poda+d0Yh4aEiN2 vQa0leEfrQMW+JePH3u7P2msAteeUE3S900F5W9fnR4umyDdZLssAp5xMfWMzlRP85j5/e OiZil7KbRg3Uz5R23CFXhOvXJEwKjMYjnrkYi4d3RRql1+VAfhKraIPi+nuGiA== 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=1723417462; 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=dct+IiGgiCtcMAiRSvEJ0mhAFFC5NA+pYSU4z9iJasQ=; b=IPSYm0Vs303TjrLRt0z3ap1UzugyoetaDzFoRJxcQr1c5Fkn0+JNvNVLW4trwY3gjyFczl fP++26CHPCsR7q0tHVaOh9NYe2COsAXQc4h/vyy/Byhxw+1kp0Iwq72GU0XDlitCAJiauS Dg1UzxvMRxNR+nS1pEBcK60lsMiZ9x+Vf7LnrGlLZRmaw55Psz/jWeZd4VtIfRSW2ux/Dy ninSuaPBFdjcOEu37sZEV1adsVzSxml3Vt0Ebd47Odcfug2/I5KQxHfFFMDXmP01B7AMh3 40jJi8mUKAyxe6sGUnrMz5oHCSXKWTDTBEFZs1jtDlzq4Fz6XDlKKoHFgENAzw== 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 4WhtWV5dwrz12x3; Sun, 11 Aug 2024 23:04:22 +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 47BN4M4H032711; Sun, 11 Aug 2024 23:04:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47BN4Mdm032708; Sun, 11 Aug 2024 23:04:22 GMT (envelope-from git) Date: Sun, 11 Aug 2024 23:04:22 GMT Message-Id: <202408112304.47BN4Mdm032708@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: 8f16d9f7dc8c - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 8f16d9f7dc8c119f8ba9ff27d4ce9c48d0b56d11 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8f16d9f7dc8c119f8ba9ff27d4ce9c48d0b56d11 commit 8f16d9f7dc8c119f8ba9ff27d4ce9c48d0b56d11 Author: Pierre Pronchery AuthorDate: 2024-07-25 12:44:17 +0000 Commit: Ed Maste CommitDate: 2024-08-11 23:03:43 +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) --- 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: