Skip to content

Commit 60b730a

Browse files
author
Darrick J. Wong
committed
xfs: fix uninitialized variable access
If the end position of a GETFSMAP query overlaps an allocated space and we're using the free space info to generate fsmap info, the akeys information gets fed into the fsmap formatter with bad results. Zero-init the space. Reported-by: [email protected] Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 571dc9a commit 60b730a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/xfs/xfs_fsmap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,7 @@ xfs_getfsmap_datadev_bnobt(
761761
{
762762
struct xfs_alloc_rec_incore akeys[2];
763763

764+
memset(akeys, 0, sizeof(akeys));
764765
info->missing_owner = XFS_FMR_OWN_UNKNOWN;
765766
return __xfs_getfsmap_datadev(tp, keys, info,
766767
xfs_getfsmap_datadev_bnobt_query, &akeys[0]);

0 commit comments

Comments
 (0)