ovl: use the pinned upper dir in ovl_fix_origin()

State
Published
Severity
7.8 High
Published
Nov 19, 2026
Updated
Nov 23, 2026
Reserved
Sep 25, 2026

Read the record on cve.org

Description

In the Linux kernel, the following vulnerability has been resolved:

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.

[amir: add helper ovl_set_impure_dir()]

ProductVersions
Linux Linux9678e630305724487f1fc101d6b83c383ff9cc90 to before 8ae1e7876107fbe7318ac5594b8bf2a887a9c578 Affected9678e630305724487f1fc101d6b83c383ff9cc90 to before 50ae0a83625d08b4be4f047c293cf1149fe7ea98 Affected9678e630305724487f1fc101d6b83c383ff9cc90 to before 17a540e65e567c8e4dd165a3ce5b592842ba5ab5 Affected9678e630305724487f1fc101d6b83c383ff9cc90 to before b219cdaea16b2f3e8e13a63662d462addd8a2cd0 Affected9678e630305724487f1fc101d6b83c383ff9cc90 to before 77c9b481faacf46b9d9282ffaa71afbac7acf819 Affected9678e630305724487f1fc101d6b83c383ff9cc90 to before 4f61ff2ebfb3d2967b83b6a4d456242244d5a61f Affected
Linux Linux4.16 Affectedbefore 4.16 Not Affected6.1.193 through 6.1.* Not Affected6.6.163 through 6.6.* Not Affected6.12.117 through 6.12.* Not Affected6.18.61 through 6.18.* Not Affected7.3.2 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.