ovl: use the pinned upper dir in ovl_fix_origin()
NIST has received this entry but not started reviewing it.
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()]
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable, 2 products in all. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| Linux Linux | Software | from 9678e630305724487f1fc101d6b83c383ff9cc90, before 8ae1e7876107fbe7318ac5594b8bf2a887a9c578; from 9678e630305724487f1fc101d6b83c383ff9cc90, before 50ae0a83625d08b4be4f047c293cf1149fe7ea98; from 9678e630305724487f1fc101d6b83c383ff9cc90, before 17a540e65e567c8e4dd165a3ce5b592842ba5ab5; from 9678e630305724487f1fc101d6b83c383ff9cc90, before b219cdaea16b2f3e8e13a63662d462addd8a2cd0; from 9678e630305724487f1fc101d6b83c383ff9cc90, before 77c9b481faacf46b9d9282ffaa71afbac7acf819; from 9678e630305724487f1fc101d6b83c383ff9cc90, before 4f61ff2ebfb3d2967b83b6a4d456242244d5a61f | 8ae1e7876107fbe7318ac5594b8bf2a887a9c578; 50ae0a83625d08b4be4f047c293cf1149fe7ea98; 17a540e65e567c8e4dd165a3ce5b592842ba5ab5; b219cdaea16b2f3e8e13a63662d462addd8a2cd0 |
| Linux Linux | Software | 4.16 | not recorded |
The 7.8 severity score (high) from the company that reported it, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | On the machine | The attacker needs access to the computer itself, for example a login or a file they can get you to open. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Login needed | Low | The attacker needs an ordinary user account. |
| Someone has to act | None | Nobody has to click or open anything. It can happen on its own. |
| Reaches beyond the program | Unchanged | The damage stays inside the vulnerable program. |
| Data exposed | High | Total loss of confidentiality: the attacker can read all the data the program can reach. |
| Data changed | High | The attacker can change or delete anything the program can reach. |
| Service disrupted | High | The attacker can take the service down completely. |
| Ease of attack | 1.8 | A score for how easy it is to use the flaw. Higher is easier. |
| Damage | 5.9 | A score for how bad the harm is if it works. Higher is worse. |
NIST lists 6 sources for this flaw, none tagged as a vendor patch.