Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Aug 2024 16:44:43 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 1b30c5d3a515 - releng/13.4 - acl_copyin: avoid returning uninitialized memory
Message-ID:  <202408131644.47DGihux067565@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch releng/13.4 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=1b30c5d3a51580530fb8275cd96c2241adfbea1d

commit 1b30c5d3a51580530fb8275cd96c2241adfbea1d
Author:     Pierre Pronchery <pierre@freebsdfoundation.org>
AuthorDate: 2024-07-25 12:44:17 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408131644.47DGihux067565>