ocfs2: cache the mount context for dentry lock callbacks
NIST has received this entry but not started reviewing it.
In the Linux kernel, the following vulnerability has been resolved: ocfs2: cache the mount context for dentry lock callbacks ocfs2_drop_dentry_lock() drops the inode reference before releasing the DENTRY lock. This lets inode eviction release the local inode and open locks before a remote unlink can proceed past the DENTRY lock. A DLM callback can still arrive before the DENTRY lock has been dropped. ocfs2_get_dentry_osb() obtains the mount context through dl_inode->i_sb, which can access a freed inode when the downconvert thread drops the last inode reference in its post-unlock callback: Downconvert thread DLM callback thread ------------------ ------------------- ocfs2_process_blocked_lock() ocfs2_dentry_post_unlock() ocfs2_dentry_lock_put() ocfs2_drop_dentry_lock() iput(dl->dl_inode) [inode reclaimed after RCU] ocfs2_blocking_ast() ocfs2_get_dentry_osb() dl->dl_inode->i_sb ocfs2_simple_drop_lockres() Store the mount context in the DENTRY lock resource's l_priv field and use the default mount-context lookup. Recover the containing dentry lock with container_of(), as already done for refcount locks, and remove ocfs2_get_dentry_osb(). ocfs2_dismount_volume() shuts down the DLM before freeing the mount context, so callbacks can use it without accessing the inode. Preserve the existing iput-before-unlock order to avoid delaying local inode and open lock release until after the DENTRY lock is released.
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 8ed6b23709b346f7bfc1edab47003a205a6a9f69, before f0a9113dd9bcf06d6d4053ca6debf5ff8b29447b; from 8ed6b23709b346f7bfc1edab47003a205a6a9f69, before 86dd70951750f393b38e11eae558e30ec83c2d06; from 8ed6b23709b346f7bfc1edab47003a205a6a9f69, before e95883b44156336508eda86e908bfa02634887f1; from 8ed6b23709b346f7bfc1edab47003a205a6a9f69, before 2bb821de615273c256725cc390c748ad5efc5e8b; from 8ed6b23709b346f7bfc1edab47003a205a6a9f69, before a392e0231b9d823f2e62e21fef68ad6145119dca; from 8ed6b23709b346f7bfc1edab47003a205a6a9f69, before ee8997a4521964631d6cc0e511a186f69ce84dbd; and 4 more | f0a9113dd9bcf06d6d4053ca6debf5ff8b29447b; 86dd70951750f393b38e11eae558e30ec83c2d06; e95883b44156336508eda86e908bfa02634887f1; 2bb821de615273c256725cc390c748ad5efc5e8b |
| Linux Linux | Software | 3.15 | 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.