diff options
author | Brian Foster <bfoster@redhat.com> | 2015-11-10 00:10:33 +0100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-11-10 00:10:33 +0100 |
commit | 848ccfc8fe0e8ae572ed0d8a9a2c3a0cda3bce3b (patch) | |
tree | b333bc5711885b779cfbad33f1858e5095b10135 /fs/xfs/xfs_dquot_item.c | |
parent | xfs: Fix error path in xfs_get_acl (diff) | |
download | linux-848ccfc8fe0e8ae572ed0d8a9a2c3a0cda3bce3b.tar.xz linux-848ccfc8fe0e8ae572ed0d8a9a2c3a0cda3bce3b.zip |
xfs: fix log recovery op header validation assert
Commit 89cebc84 ("xfs: validate transaction header length on log
recovery") added additional validation of the on-disk op header length
to protect from buffer overflow during log recovery. It accounts for the
fact that the transaction header can be split across multiple op
headers. It added an assert for when this occurs that verifies the
length of the second part of a split transaction header is less than a
full transaction header. In other words, it expects that the first op
header of a split transaction header includes at least some portion of
the transaction header.
This expectation is not always valid as a zero-length op header can
exist for the first op header of a split transaction header (see
xlog_recover_add_to_trans() for details). This means that the second op
header can have a valid, full length transaction header and thus the
full header is copied in xlog_recover_add_to_cont_trans(). Fix the
assert in xlog_recover_add_to_cont_trans() to handle this case correctly
and require that the op header length is less than or equal to a full
transaction header.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_dquot_item.c')
0 files changed, 0 insertions, 0 deletions