diff options
| author | Theodore Ts'o <tytso@mit.edu> | 2018-06-15 12:28:16 -0400 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2018-12-02 00:09:28 +0100 |
| commit | accff7bee27e0e501e7bd40aa6f9971df4dc66a5 (patch) | |
| tree | 557b39cc8b535f8c539142deeba2a3e61da43992 /kernel | |
| parent | 20299d720b47531d732a73c37a71ac0eb66e3596 (diff) | |
ext4: clear i_data in ext4_inode_info when removing inline data
commit 6e8ab72a812396996035a37e5ca4b3b99b5d214b upstream.
When converting from an inode from storing the data in-line to a data
block, ext4_destroy_inline_data_nolock() was only clearing the on-disk
copy of the i_blocks[] array. It was not clearing copy of the
i_blocks[] in ext4_inode_info, in i_data[], which is the copy actually
used by ext4_map_blocks().
This didn't matter much if we are using extents, since the extents
header would be invalid and thus the extents could would re-initialize
the extents tree. But if we are using indirect blocks, the previous
contents of the i_blocks array will be treated as block numbers, with
potentially catastrophic results to the file system integrity and/or
user data.
This gets worse if the file system is using a 1k block size and
s_first_data is zero, but even without this, the file system can get
quite badly corrupted.
This addresses CVE-2018-10881.
https://bugzilla.kernel.org/show_bug.cgi?id=200015
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
