diff options
author | 2018-10-31 12:15:23 +0100 | |
---|---|---|
committer | 2018-10-31 12:15:23 +0100 | |
commit | 5e1275808630ea3b2c97c776f40e475017535f72 (patch) | |
tree | 0a7d5c43ac0b662ad2822627a6f2dbc371c21530 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | ovl: using posix_acl_xattr_size() to get size instead of posix_acl_to_xattr() (diff) | |
download | linux-dev-5e1275808630ea3b2c97c776f40e475017535f72.tar.xz linux-dev-5e1275808630ea3b2c97c776f40e475017535f72.zip |
ovl: check whiteout in ovl_create_over_whiteout()
Kaixuxia repors that it's possible to crash overlayfs by removing the
whiteout on the upper layer before creating a directory over it. This is a
reproducer:
mkdir lower upper work merge
touch lower/file
mount -t overlay overlay -olowerdir=lower,upperdir=upper,workdir=work merge
rm merge/file
ls -al merge/file
rm upper/file
ls -al merge/
mkdir merge/file
Before commencing with a vfs_rename(..., RENAME_EXCHANGE) verify that the
lookup of "upper" is positive and is a whiteout, and return ESTALE
otherwise.
Reported by: kaixuxia <xiakaixu1987@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: e9be9d5e76e3 ("overlay filesystem")
Cc: <stable@vger.kernel.org> # v3.18
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions