]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_metadump: zap stale data in DIR2_LEAF1 dirs
authorEric Sandeen <sandeen@sandeen.net>
Thu, 9 Nov 2017 17:35:19 +0000 (11:35 -0600)
committerEric Sandeen <sandeen@redhat.com>
Thu, 9 Nov 2017 17:35:19 +0000 (11:35 -0600)
commita56173b5e7223b872db429609650e1c44b331a04
tree8a46b7a655ddef7b19cf9037c8a33d8a2acd405b
parent1f4bf4d40ec066ecfd9ad71a2147a3843bcf8f6b
xfs_metadump: zap stale data in DIR2_LEAF1 dirs

xfs_metadump attempts to zero out unused regions of metadata
blocks to prevent data leaks when sharing metadata images.

However, Stefan Ring reported a significant number of leaked
strings when dumping his 1T filesystem.  Based on a reduced
metadata set, I was able to identify "leaf" directories
(with XFS_DIR2_LEAF1_MAGIC magic) as the primary culprit;
the region between the end of the entries array and the start
of the bests array was not getting zeroed out.  This patch
seems to remedy that problem.

Reported-by: Stefan Ring <stefanrin@gmail.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/metadump.c