bugfix for read_extent_tree_block
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ext4: avoid recheck extent for EXT4_EX_FORCE_CACHEfs/ | +10 | 1 reply | |
| 2/2 | ext4: check magic even the extent block bh is verifiedfs/ | +8 | 5 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Jan Kara |
|---|---|
| 1/2 | R-b |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] bugfix for read_extent_tree_block
Our stress testcase with io error can trigger later OOB:
[59898.282466] BUG: KASAN: slab-out-of-bounds in ext4_find_extent+0x2e4/0x480
...
[59898.287162] Call Trace:
[59898.287575] dump_stack+0x8b/0xb9
[59898.288070] print_address_description+0x73/0x280
[59898.289903] ext4_find_extent+0x2e4/0x480
[59898.290553] ext4_ext_map_blocks+0x125/0x1470
[59898.295481] ext4_map_blocks+0x5ee/0x940
[59898.315984] ext4_mpage_readpages+0x63c/0xdb0
[59898.320231] read_pages+0xe6/0x370
[59898.321589] __do_page_cache_readahead+0x233/0x2a0
[59898.321594] ondemand_readahead+0x157/0x450
[59898.321598] generic_file_read_iter+0xcb2/0x1550
[59898.328828] __vfs_read+0x233/0x360
[59898.328840] vfs_read+0xa5/0x190
[59898.330126] ksys_read+0xa5/0x150
[59898.331405] do_syscall_64+0x6d/0x1f0
[59898.331418] entry_SYSCALL_64_after_hwframe+0x44/0xa9It seem that a xattr block with verified confuse read_extent_tree_block.
The detail of the patch show us how to fix it.
yangerkun (2):
ext4: avoid recheck extent for EXT4_EX_FORCE_CACHE
ext4: check magic even the extent block bh is verified
fs/ext4/extents.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-)
Signature · 1 line
2.31.1