linux/fs/ext4
Sahitya Tummala 08fc98a4d6 ext4: fix use-after-free in dx_release()
The buffer_head (frames[0].bh) and it's corresping page can be
potentially free'd once brelse() is done inside the for loop
but before the for loop exits in dx_release(). It can be free'd
in another context, when the page cache is flushed via
drop_caches_sysctl_handler(). This results into below data abort
when accessing info->indirect_levels in dx_release().

Unable to handle kernel paging request at virtual address ffffffc17ac3e01e
Call trace:
 dx_release+0x70/0x90
 ext4_htree_fill_tree+0x2d4/0x300
 ext4_readdir+0x244/0x6f8
 iterate_dir+0xbc/0x160
 SyS_getdents64+0x94/0x174

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Cc: stable@kernel.org
2019-05-10 22:00:33 -04:00
..
acl.c ext4: compare old and new mode before setting update_mode flag 2018-12-10 00:22:38 -05:00
acl.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
balloc.c ext4: use ext4_warning() for sb_getblk failure 2018-08-01 12:02:31 -04:00
bitmap.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
block_validity.c ext4: cond_resched in work-heavy group loops 2019-04-25 12:58:01 -04:00
dir.c ext4: Support case-insensitive file name lookups 2019-04-25 14:12:08 -04:00
ext4.h ext4: Support case-insensitive file name lookups 2019-04-25 14:12:08 -04:00
ext4_extents.h ext4: adjust reserved cluster count when removing extents 2018-10-01 14:25:08 -04:00
ext4_jbd2.c ext4: shutdown should not prevent get_write_access 2018-02-18 22:07:36 -05:00
ext4_jbd2.h Miscellaneous ext4 bug fixes for 5.1. 2019-03-24 13:41:37 -07:00
extents.c ext4: zero out the unused memory region in the extent tree block 2019-05-10 19:28:06 -04:00
extents_status.c ext4: use BUG() instead of BUG_ON(1) 2019-04-07 12:24:43 -04:00
extents_status.h ext4: reduce reserved cluster count by number of allocated clusters 2018-10-01 14:24:08 -04:00
file.c ext4: fix data corruption caused by overlapping unaligned and aligned IO 2019-05-10 21:45:33 -04:00
fsmap.c ext4: make function ‘ext4_getfsmap_find_fixed_metadata’ static 2018-05-10 11:50:04 -04:00
fsmap.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
fsync.c Revert "ext4: use ext4_write_inode() when fsyncing w/o a journal" 2019-01-31 23:41:11 -05:00
hash.c ext4: Support case-insensitive file name lookups 2019-04-25 14:12:08 -04:00
ialloc.c ext4: Support case-insensitive file name lookups 2019-04-25 14:12:08 -04:00
indirect.c ext4: cleanup bh release code in ext4_ind_remove_space() 2019-03-23 11:56:01 -04:00
inline.c ext4: Support case-insensitive file name lookups 2019-04-25 14:12:08 -04:00
inode.c ext4: Support case-insensitive file name lookups 2019-04-25 14:12:08 -04:00
ioctl.c ext4: Support case-insensitive file name lookups 2019-04-25 14:12:08 -04:00
Kconfig A large number of bug fixes and cleanups. One new feature to allow 2019-03-12 15:03:21 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mballoc.c ext4: cond_resched in work-heavy group loops 2019-04-25 12:58:01 -04:00
mballoc.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
migrate.c ext4: clean up indentation issues, remove extraneous tabs 2018-12-04 00:16:44 -05:00
mmp.c ext4: don't mark mmp buffer head dirty 2018-09-15 17:11:25 -04:00
move_extent.c ext4: use IS_ENCRYPTED() to check encryption status 2019-01-23 23:56:43 -05:00
namei.c ext4: fix use-after-free in dx_release() 2019-05-10 22:00:33 -04:00
page-io.c A large number of bug fixes and cleanups. One new feature to allow 2019-03-12 15:03:21 -07:00
readpage.c ext4: fix prefetchw of NULL page 2019-04-07 11:54:27 -04:00
resize.c ext4: avoid drop reference to iloc.bh twice 2019-04-25 11:44:15 -04:00
super.c ext4: fix ext4_show_options for file systems w/o journal 2019-04-30 23:08:15 -04:00
symlink.c ext4: switch to fscrypt_get_symlink() 2018-01-11 22:10:40 -05:00
sysfs.c ext4: export /sys/fs/ext4/feature/casefold if Unicode support is present 2019-05-06 14:03:52 -04:00
truncate.h ext4: handle layout changes to pinned DAX mappings 2018-07-29 17:00:22 -04:00
xattr.c ext4: ignore e_value_offs for xattrs with value-in-ea-inode 2019-04-10 00:37:36 -04:00
xattr.h ext4: add extra checks to ext4_xattr_block_get() 2018-03-30 20:04:11 -04:00
xattr_security.c ext4: use XATTR_CREATE in ext4_initxattrs() 2018-05-10 11:52:14 -04:00
xattr_trusted.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xattr_user.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00