diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2017-01-09 15:38:54 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-12 10:39:43 (GMT) |
commit | cd4bf1d416ef199223fa41eb8225f2a137c0be99 (patch) | |
tree | e24c615465a29f532cac0a5e574923245f16c4c4 /fs/hfs | |
parent | b88398de18331ed448739866bf9fe3743e7c1bbf (diff) | |
download | linux-cd4bf1d416ef199223fa41eb8225f2a137c0be99.tar.xz |
xfs: don't crash if reading a directory results in an unexpected hole
commit 96a3aefb8ffde23180130460b0b2407b328eb727 upstream.
In xfs_dir3_data_read, we can encounter the situation where err == 0 and
*bpp == NULL if the given bno offset happens to be a hole; this leads to
a crash if we try to set the buffer type after the _da_read_buf call.
Holes can happen due to corrupt or malicious entries in the bmbt data,
so be a little more careful when we're handling buffers.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/hfs')
0 files changed, 0 insertions, 0 deletions