mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
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 6ee6c7b146)
This commit is contained in:
parent
cbbc8d6730
commit
6bf5c32ad8
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue