diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2017-03-15 00:24:25 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-03-15 00:24:25 -0700 |
commit | 630a04e79dd41ff746b545d4fc052e0abb836120 (patch) | |
tree | ef788a95dc530d80b012987a1dc60f9a3912abbe /fs/xfs/libxfs/xfs_inode_fork.h | |
parent | 2fcc319d2467a5f5b78f35f79fd6e22741a31b1e (diff) | |
download | linux-630a04e79dd41ff746b545d4fc052e0abb836120.tar.gz linux-630a04e79dd41ff746b545d4fc052e0abb836120.tar.bz2 linux-630a04e79dd41ff746b545d4fc052e0abb836120.zip |
xfs: verify inline directory data forks
When we're reading or writing the data fork of an inline directory,
check the contents to make sure we're not overflowing buffers or eating
garbage data. xfs/348 corrupts an inline symlink into an inline
directory, triggering a buffer overflow bug.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
---
v2: add more checks consistent with _dir2_sf_check and make the verifier
usable from anywhere.
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_fork.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_inode_fork.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_fork.h b/fs/xfs/libxfs/xfs_inode_fork.h index 7fb8365326d1..132dc59fdde6 100644 --- a/fs/xfs/libxfs/xfs_inode_fork.h +++ b/fs/xfs/libxfs/xfs_inode_fork.h @@ -140,7 +140,7 @@ typedef struct xfs_ifork { struct xfs_ifork *xfs_iext_state_to_fork(struct xfs_inode *ip, int state); int xfs_iformat_fork(struct xfs_inode *, struct xfs_dinode *); -void xfs_iflush_fork(struct xfs_inode *, struct xfs_dinode *, +int xfs_iflush_fork(struct xfs_inode *, struct xfs_dinode *, struct xfs_inode_log_item *, int); void xfs_idestroy_fork(struct xfs_inode *, int); void xfs_idata_realloc(struct xfs_inode *, int, int); |