Files
android_kernel_fxtec_sm6115/fs
Sahitya Tummala d3fc4a2330 configfs: Fix use-after-free when accessing sd->s_dentry
In the vfs_statx() context, during path lookup, the dentry gets
added to sd->s_dentry via configfs_attach_attr(). In the end,
vfs_statx() kills the dentry by calling path_put(), which invokes
configfs_d_iput(). Ideally, this dentry must be removed from
sd->s_dentry but it doesn't if the sd->s_count >= 3. As a result,
sd->s_dentry is holding reference to a stale dentry pointer whose
memory is already freed up. This results in use-after-free issue,
when this stale sd->s_dentry is accessed later in
configfs_readdir() path.

This issue can be easily reproduced, by running the LTP test case -
sh fs_racer_file_list.sh /config

Change-Id: I5ac8556837bbdf2e5d0540516efb106ec53d7536
Fixes: 76ae281f63 ('configfs: fix race between dentry put and lookup')
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2019-01-10 02:07:26 -08:00
..
2018-08-21 23:54:17 -04:00
2018-12-05 19:32:11 +01:00
2018-12-06 03:08:31 -08:00
2018-12-06 03:08:31 -08:00
2018-08-17 16:20:28 -07:00
2018-12-06 09:32:46 +01:00
2018-08-17 16:20:27 -07:00
2018-06-05 19:23:26 +02:00
2018-08-28 17:10:42 +05:30
2018-12-06 03:08:31 -08:00
2018-12-06 10:34:09 +01:00