linux/fs/overlayfs
Maxim Patlasov cfc9fde0b0 ovl: verify upper dentry in ovl_remove_and_whiteout()
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>
2016-07-22 10:54:20 +02:00
..
copy_up.c ovl: override creds with the ones from the superblock mounter 2016-05-27 08:55:26 +02:00
dir.c ovl: verify upper dentry in ovl_remove_and_whiteout() 2016-07-22 10:54:20 +02:00
inode.c ovl: Copy up underlying inode's ->i_mode to overlay inode 2016-07-04 16:49:48 +02: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-07-04 16:49:48 +02:00
readdir.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-05-27 17:14:05 -07:00
super.c ovl: warn instead of error if d_type is not supported 2016-07-03 09:39:31 +02:00