Ming Lei
f7db5e7660
sysfs: fix use after free in case of concurrent read/write and readdir
...
The inode->i_mutex isn't hold when updating filp->f_pos
in read()/write(), so the filp->f_pos might be read as
0 or 1 in readdir() when there is concurrent read()/write()
on this same file, then may cause use after free in readdir().
The bug can be reproduced with Li Zefan's test code on the
link:
https://patchwork.kernel.org/patch/2160771/
This patch fixes the use after free under this situation.
Cc: stable <stable@vger.kernel.org>
Reported-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 11:09:02 -07:00
..
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-29 11:13:25 -07:00
2013-03-03 19:36:31 -08:00
2013-03-21 17:59:22 -07:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-07 01:08:55 -08:00
2013-02-27 19:10:24 -08:00
2013-03-09 16:51:13 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-02-27 19:10:24 -08:00
2013-03-13 15:23:44 +01:00
2013-03-11 22:05:56 +01:00
2013-03-21 17:56:10 -07:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-12 18:55:21 -07:00
2013-02-27 19:10:24 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-13 15:47:50 -07:00
2013-03-11 07:09:48 -07:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-12 18:55:21 -07:00
2013-03-11 13:24:56 -04:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-02-28 18:02:55 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-26 14:23:45 -07:00
2013-02-13 06:15:14 -08:00
2013-03-22 16:55:15 -04:00
2013-03-03 19:36:31 -08:00
2013-02-27 19:10:24 -08:00
2013-03-03 19:36:31 -08:00
2013-03-07 01:08:55 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-28 13:43:46 -07:00
2013-02-21 09:38:18 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-11 22:05:56 +01:00
2013-02-26 20:16:07 -08:00
2013-03-11 22:05:57 +01:00
2013-03-03 19:36:31 -08:00
2013-03-11 07:09:48 -07:00
2013-04-03 11:09:02 -07:00
2013-03-12 18:55:21 -07:00
2013-03-03 19:36:31 -08:00
2013-03-11 07:09:48 -07:00
2013-03-03 19:36:31 -08:00
2013-03-19 15:17:40 -07:00
2013-02-27 19:10:24 -08:00
2013-02-26 02:46:11 -05:00
2013-02-22 23:31:31 -05:00
2013-02-26 20:16:07 -08:00
2013-03-03 12:06:09 -08:00
2013-02-22 23:31:31 -05:00
2013-03-03 19:36:31 -08:00
2013-02-28 12:52:24 -08:00
2013-02-28 12:52:24 -08:00
2013-02-22 23:31:31 -05:00
2013-03-12 11:05:45 -07:00
2013-02-27 19:10:11 -08:00
2013-03-26 18:25:57 -04:00
2013-02-22 23:31:36 -05:00
2013-02-27 19:10:11 -08:00
2013-02-22 23:31:31 -05:00
2013-03-01 19:48:30 -05:00
2013-02-19 08:42:45 +01:00
2013-03-03 19:36:31 -08:00
2013-03-01 23:51:07 -05:00
2013-02-28 13:21:44 -08:00
2013-02-27 19:10:24 -08:00
2013-03-21 13:11:11 -04:00
2013-02-22 23:31:31 -05:00
2013-02-22 23:31:31 -05:00
2013-03-08 09:03:07 -08:00
2013-03-27 07:50:08 -07:00
2013-03-03 13:23:03 -08:00
2013-03-12 08:29:17 -07:00
2013-03-27 07:50:05 -07:00
2013-03-27 07:50:05 -07:00
2013-03-27 09:24:02 -07:00
2013-02-22 23:31:31 -05:00
2013-02-07 20:51:08 +01:00
2013-03-03 13:23:03 -08:00
2013-03-21 13:11:11 -04:00
2013-02-26 02:46:08 -05:00
2013-02-27 19:10:24 -08:00
2013-02-22 23:31:31 -05:00
2013-03-02 09:35:13 -05:00