linux/fs/overlayfs
Maxim Patlasov 5eaee47bcd ovl: verify upper dentry in ovl_remove_and_whiteout()
[ Upstream commit cfc9fde0b0 ]

The upper dentry may become stale before we call ovl_lock_rename_workdir.
For example, someone could (mistakenly or maliciously) manually unlink(2)
it directly from upperdir.

To ensure it is not stale, let's lookup it after ovl_lock_rename_workdir
and and check if it matches the upper dentry.

Essentially, it is the same problem and similar solution as in
commit 11f3710417 ("ovl: verify upper dentry before unlink and rename").

Signed-off-by: Maxim Patlasov <mpatlasov@virtuozzo.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
History 2016-08-07 21:59:02 -04:00
..
copy_up.c ovl: use a minimal buffer in ovl_copy_xattr 2016-02-02 13:53:09 -05:00
dir.c ovl: verify upper dentry in ovl_remove_and_whiteout() 2016-08-07 21:59:02 -04:00
inode.c ovl: Copy up underlying inode's ->i_mode to overlay inode 2016-08-07 21:44:56 -04:00
Kconfig ovl: rename filesystem type to "overlay" 2014-11-20 16:39:59 +01:00
Makefile ovl: rename filesystem type to "overlay" 2014-11-20 16:39:59 +01:00
overlayfs.h ovl: Copy up underlying inode's ->i_mode to overlay inode 2016-08-07 21:44:56 -04:00
readdir.c ovl: check dentry positiveness in ovl_cleanup_whiteouts() 2016-02-02 13:56:03 -05:00
super.c ovl: root: copy attr 2016-02-02 13:53:43 -05:00