mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
xfs: fix kernel memory exposure problems
commit bf9216f922 upstream.
Fix a memory exposure problems in inumbers where we allocate an array of
structures with holes, fail to zero the holes, then blindly copy the
kernel memory contents (junk and all) into userspace.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ca659e086f
commit
3890d83805
@@ -585,7 +585,7 @@ xfs_inumbers(
|
||||
return error;
|
||||
|
||||
bcount = MIN(left, (int)(PAGE_SIZE / sizeof(*buffer)));
|
||||
buffer = kmem_alloc(bcount * sizeof(*buffer), KM_SLEEP);
|
||||
buffer = kmem_zalloc(bcount * sizeof(*buffer), KM_SLEEP);
|
||||
do {
|
||||
struct xfs_inobt_rec_incore r;
|
||||
int stat;
|
||||
|
||||
Reference in New Issue
Block a user