summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorChris Mason <mason@kernel.org>2026-10-07 10:47:10 +0000
committerAmir Goldstein <amir73il@gmail.com>2026-10-29 13:22:08 +0100
commit4f61ff2ebfb3d2967b83b6a4d456242244d5a61f (patch)
treef9926c319ed7d2f752ab41f2e5b4e727e3234d17 /scripts/Makefile.thinlto
parent0b691c3c59a58aa6a2fc3f87c10cc1e399f1d33f (diff)
downloadlinux-4f61ff2ebfb3d2967b83b6a4d456242244d5a61f.tar.gz
linux-4f61ff2ebfb3d2967b83b6a4d456242244d5a61f.zip
ovl: use the pinned upper dir in ovl_fix_origin()
Renames made directly on the upper filesystem during a lookup crash the kernel. A dentry that is passed to vfs_setxattr() must be pinned. ovl_fix_origin() passes upper->d_parent to ovl_set_impure() without a reference, and the lookup holds no lock of the upper directory. A rename on the upper filesystem changes d_parent, and only the child pins the new parent, so a second rename and an rmdir free it. With delays in ovl_fix_origin() and ovl_set_impure(), renaming the upper directory twice and removing the intermediate parent during the lookup of a merge directory without an origin xattr gave a KASAN use-after-free in vfs_setxattr(). Fix this by passing the upper dentry that the overlay parent holds. Fixes: 9678e6303057 ("ovl: fix inconsistent d_ino for legacy merge dir") Cc: stable@vger.kernel.org Signed-off-by: Chris Mason <mason@kernel.org> Signed-off-by: Josef Bacik <josef@toxicpanda.com> [amir: add helper ovl_set_impure_dir()] Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions