android_kernel_motorola_sm6375/fs/sysfs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
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 <[email protected]>
Reported-by: Li Zefan <[email protected]>
Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-03 11:09:02 -07:00
..
bin.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
dir.c sysfs: fix use after free in case of concurrent read/write and readdir 2013-04-03 11:09:02 -07:00
file.c Revert "sysfs: Convert print_symbol to %pSR" 2013-01-17 13:09:57 -08:00
group.c sysfs: Functions for adding/removing symlinks to/from attribute groups 2013-01-25 21:51:13 +01:00
inode.c avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
Kconfig
Makefile
mount.c userns: Restrict when proc and sysfs can be mounted 2013-03-27 07:50:08 -07:00
symlink.c sysfs: Functions for adding/removing symlinks to/from attribute groups 2013-01-25 21:51:13 +01:00
sysfs.h sysfs: Functions for adding/removing symlinks to/from attribute groups 2013-01-25 21:51:13 +01:00