CVE-2022-50668
Description
In the Linux kernel, the following vulnerability has been resolved:
ext4: fix deadlock due to mbcache entry corruption
When manipulating xattr blocks, we can deadlock infinitely looping inside ext4_xattr_block_set() where we constantly keep finding xattr block for reuse in mbcache but we are unable to reuse it because its reference count is too big. This happens because cache entry for the xattr block is marked as reusable (e_reusable set) although its reference count is too big. When this inconsistency happens, this inconsistent state is kept indefinitely and so ext4_xattr_block_set() keeps retrying indefinitely.
The inconsistent state is caused by non-atomic update of e_reusable bit. e_reusable is part of a bitfield and e_reusable update can race with update of e_referenced bit in the same bitfield resulting in loss of one of the updates. Fix the problem by using atomic bitops instead.
This bug has been around for many years, but it became *much* easier to hit after commit 65f8b80053a1 ("ext4: fix race when reusing xattr blocks").
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A deadlock in ext4 caused by non-atomic update of mbcache entry's e_reusable bit leads to infinite loop in xattr block reuse.
Vulnerability
In the Linux kernel's ext4 filesystem, a deadlock can occur due to corruption of mbcache entries when manipulating xattr blocks. The root cause is a non-atomic update of the e_reusable bit in the cache entry's bitfield, which can race with updates to e_referenced, causing inconsistencies. This leads to an infinite loop in ext4_xattr_block_set() where the system repeatedly finds a candidate xattr block in the mbcache but cannot reuse it because its reference count is too high, while the entry is incorrectly marked as reusable.
Exploitation
An attacker would need local access to a system with the ext4 filesystem and the ability to trigger xattr operations (e.g., setting extended attributes) on files. The vulnerability is triggered through normal filesystem operations involving extended attributes. The commit 65f8b80053a1 ("ext4: fix race when reusing xattr blocks") made the bug much easier to hit, but the underlying issue existed for many years. No authentication beyond local user access is required.
Impact
Successful exploitation leads to a deadlock, effectively causing a denial of service (DoS) as the filesystem thread hangs indefinitely, potentially affecting the entire system's availability. There is no indication of data corruption or privilege escalation from the description.
Mitigation
The vulnerability is fixed by using atomic bitops for the e_reusable update. The fix has been backported to stable kernels via commits referenced in the advisory. Users should update their Linux kernel to a patched version. No workaround is mentioned.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
7efaa0ca678f5af53065276371be16a0c2f105bc0b2fda4b4127b80cefb94cc1538c693d2a44e84a9b776Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
7- git.kernel.org/stable/c/127b80cefb941a81255c72f11081123f3a705369nvd
- git.kernel.org/stable/c/1be16a0c2f10186df505e28b0cc92d7f3366e2a8nvd
- git.kernel.org/stable/c/5bc0b2fda4b47c86278f7c6d30c211f425bf51cfnvd
- git.kernel.org/stable/c/a44e84a9b7764c72896f7241a0ec9ac7e7ef38ddnvd
- git.kernel.org/stable/c/af53065276376750dfac35a7248af18806404c5dnvd
- git.kernel.org/stable/c/cc1538c693d25e282bed8c54b65c914a04023a78nvd
- git.kernel.org/stable/c/efaa0ca678f56d47316a08030b2515678cebbc50nvd
News mentions
0No linked articles in our index yet.