ovl: hold a reference on the parent in readdir
NIST has received this entry but not started reviewing it.
In the Linux kernel, the following vulnerability has been resolved: ovl: hold a reference on the parent in readdir Listing a directory on an overlay uses a freed dentry and crashes the kernel when a lookup moves the directory at the same time. Code that can sleep may only use d_parent without a reference while something stops a move of the dentry. ovl_iterate_real(), ovl_need_adjust_d_ino() and ovl_cache_update() use the d_parent of the listed directory and hold only the lock of that directory. When a lookup finds the directory under another parent after a change to a layer, d_splice_alias() moves it without that lock and drops its reference on the old parent. With a delay in ovl_iterate_real(), getdents64 on an overlay directory raced a rename in the lower layer and a lookup that moved its dentry, and after an rmdir of the old parent KASAN reported a use-after-free in security_inode_getattr(). Fix this by using dget_parent() in the three functions. [amir: fix comments in ovl_need_adjust_d_ino()]
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 b5efccbe0a12a9d5c65c1a60b4270837c7fdb900, before a23b702ca4799c0975424280c8124a091f818e22; from b5efccbe0a12a9d5c65c1a60b4270837c7fdb900, before 068d627b3dbc98389a71e382311382b122dfbc70; from b5efccbe0a12a9d5c65c1a60b4270837c7fdb900, before 7480571ee0444f281bb6f4f6702c87c107235bbc; from b5efccbe0a12a9d5c65c1a60b4270837c7fdb900, before c5bda25914a35bef4b9d01d047efefc8b828875e; from b5efccbe0a12a9d5c65c1a60b4270837c7fdb900, before 862804fc1d8e6d11652d01f84451a0c9396d10cd; from b5efccbe0a12a9d5c65c1a60b4270837c7fdb900, before 0759376aa01168edeec9319f9cc8e5e9b9388c5c; and 2 more | a23b702ca4799c0975424280c8124a091f818e22; 068d627b3dbc98389a71e382311382b122dfbc70; 7480571ee0444f281bb6f4f6702c87c107235bbc; c5bda25914a35bef4b9d01d047efefc8b828875e |
| Linux Linux | Software | 4.14 | 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 8 sources for this flaw, none tagged as a vendor patch.