mirror of
https://github.com/opnsense/src.git
synced 2026-02-21 00:40:33 -05:00
Fix an uninitialized data access (#16511)
zfs_acl_node_alloc allocates an uninitialized data buffer, but upstack zfs_acl_chmod only partially initializes it. KMSAN reported that this memory remained uninitialized at the point when it was read by lzjb_compress, which suggests a possible kernel memory disclosure bug. The full KMSAN warning may be found in the PR. https://github.com/openzfs/zfs/pull/16511 Signed-off-by: Alan Somers <asomers@gmail.com> Sponsored by: Axcient Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Tony Hutter <hutter2@llnl.gov>
This commit is contained in:
parent
25ec9a9034
commit
bc0d89bfc1
2 changed files with 2 additions and 2 deletions
|
|
@ -473,7 +473,7 @@ zfs_acl_node_alloc(size_t bytes)
|
|||
|
||||
aclnode = kmem_zalloc(sizeof (zfs_acl_node_t), KM_SLEEP);
|
||||
if (bytes) {
|
||||
aclnode->z_acldata = kmem_alloc(bytes, KM_SLEEP);
|
||||
aclnode->z_acldata = kmem_zalloc(bytes, KM_SLEEP);
|
||||
aclnode->z_allocdata = aclnode->z_acldata;
|
||||
aclnode->z_allocsize = bytes;
|
||||
aclnode->z_size = bytes;
|
||||
|
|
|
|||
|
|
@ -471,7 +471,7 @@ zfs_acl_node_alloc(size_t bytes)
|
|||
|
||||
aclnode = kmem_zalloc(sizeof (zfs_acl_node_t), KM_SLEEP);
|
||||
if (bytes) {
|
||||
aclnode->z_acldata = kmem_alloc(bytes, KM_SLEEP);
|
||||
aclnode->z_acldata = kmem_zalloc(bytes, KM_SLEEP);
|
||||
aclnode->z_allocdata = aclnode->z_acldata;
|
||||
aclnode->z_allocsize = bytes;
|
||||
aclnode->z_size = bytes;
|
||||
|
|
|
|||
Loading…
Reference in a new issue