Bug 199989
Summary: | use-after-free() detected by KASAN in ext4_find_extent() when mounting and writing to a crafted ext4 image | ||
---|---|---|---|
Product: | File System | Reporter: | Wen Xu (wen.xu) |
Component: | ext4 | Assignee: | fs_ext4 (fs_ext4) |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | tytso, wen.xu |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 4.17-rc4 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | The (compressed) crafted image which causes crash |
Description
Wen Xu
2018-06-08 13:03:43 UTC
This is a dup of #199417. With the patch: ext4: verify the depth of extent tree in ext4_find_extent() ... this reproducer no longer crashes: (note the invalid extent depth ext4_error complaint): root@kvm-xfstests:~# /vdb/poc/do-989 [ 61.103607] EXT4-fs (loop0): 1 truncate cleaned up [ 61.104790] EXT4-fs (loop0): recovery complete [ 61.107122] EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts: (null) [ 61.121704] EXT4-fs error (device loop0): ext4_xattr_inode_iget:390: comm poc-199989: error while reading EA inode 1528337011 err=-117 [ 61.125338] EXT4-fs error (device loop0): ext4_find_extent:874: inode #14: comm poc-199989: inode has invalid extent depth: 28535 [ 61.129157] EXT4-fs (loop0): Delayed block allocation failed for inode 14 at logical offset 0 with max blocks 33 with error 117 [ 61.132337] EXT4-fs (loop0): This should not happen!! Data will be lost [ 61.132337] [ 61.135080] EXT4-fs error (device loop0): ext4_xattr_inode_iget:390: comm poc-199989: error while reading EA inode 1528337011 err=-117 [ 61.157028] EXT4-fs error (device loop0): ext4_xattr_inode_iget:390: comm kworker/u4:0: error while reading EA inode 1528337011 err=-117 [ 61.160579] EXT4-fs error (device loop0): ext4_xattr_inode_iget:390: comm kworker/u4:0: error while reading EA inode 1528337011 err=-117 *** This bug has been marked as a duplicate of bug 199417 *** |