]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: Check if agno is inside the filesystem
authorLukas Czerner <lczerner@redhat.com>
Tue, 28 Jun 2011 14:26:04 +0000 (14:26 +0000)
committerAlex Elder <aelder@sgi.com>
Mon, 25 Jul 2011 20:43:18 +0000 (15:43 -0500)
commit1ae311d527daa6963d487202df62baccc8a9a468
tree5ab5fb29e517b5411b2c9a261fe6367b551b393a
parent2fb5b620d7723c3d0646860172399c9a182151b1
xfs_repair: Check if agno is inside the filesystem

When getting an inode tree pointer from an array inode_tree_ptrs, we
should check if agno, which is used as a pointer to the array, lives
within the file system, because if it is not, we can end up touching
uninitialized memory. This may happen if we have corrupted directory
entry.

This commit fixes it by passing xfs_mount to affected functions and
checking if agno really is inside the file system.

This solves Red Hat bug #694706

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
12 files changed:
repair/dino_chunks.c
repair/dinode.c
repair/dir.c
repair/dir2.c
repair/incore.h
repair/incore_ino.c
repair/phase2.c
repair/phase3.c
repair/phase4.c
repair/phase5.c
repair/phase6.c
repair/scan.c