# CVE-2022-50668: ext4: fix deadlock due to mbcache entry corruption

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.93% (percentile 59, 2026-11-26)
- **Published:** 2025-12-09T01:29:19.526Z
- **Modified:** 2026-08-05T08:59:19.230Z

## Who should check

- Anyone running Linux \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< efaa0ca678f56d47316a08030b2515678cebbc50; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< af53065276376750dfac35a7248af18806404c5d; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< 1be16a0c2f10186df505e28b0cc92d7f3366e2a8; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< 5bc0b2fda4b47c86278f7c6d30c211f425bf51cf; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< 127b80cefb941a81255c72f11081123f3a705369; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< cc1538c693d25e282bed8c54b65c914a04023a78; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< a44e84a9b7764c72896f7241a0ec9ac7e7ef38dd
- Anyone running Linux 4.6

## 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").

## Affected and fixed versions

- Linux: \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< efaa0ca678f56d47316a08030b2515678cebbc50; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< af53065276376750dfac35a7248af18806404c5d; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< 1be16a0c2f10186df505e28b0cc92d7f3366e2a8; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< 5bc0b2fda4b47c86278f7c6d30c211f425bf51cf; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< 127b80cefb941a81255c72f11081123f3a705369; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< cc1538c693d25e282bed8c54b65c914a04023a78; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< a44e84a9b7764c72896f7241a0ec9ac7e7ef38dd (cvelist)
- Linux: 4.6 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50668. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50668.md
Affected: Linux >= 6048c64b26097a0ffbd966866b599f990e674e9b, < efaa0ca678f56d47316a08030b2515678cebbc50; >= 6048c64b26097a0ffbd966866b599f990e674e9b, < af53065276376750dfac35a7248af18806404c5d; >= 6048c64b26097a0ffbd966866b599f990e674e9b, < 1be16a0c2f10186df505e28b0cc92d7f3366e2a8; >= 6048c64b26097a0ffbd9668…
Fixed in: Linux 1be16a0c2f10186df505e28b0cc92d7f3366e2a8, Linux 5bc0b2fda4b47c86278f7c6d30c211f425bf51cf, Linux 127b80cefb941a81255c72f11081123f3a705369

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50668 being exploited?

There is no confirmed exploitation: CVE-2022-50668 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.93% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50668?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2022-50668?

Linux \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< efaa0ca678f56d47316a08030b2515678cebbc50; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< af53065276376750dfac35a7248af18806404c5d; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< 1be16a0c2f10186df505e28b0cc92d7f3366e2a8; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< 5bc0b2fda4b47c86278f7c6d30c211f425bf51cf; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< 127b80cefb941a81255c72f11081123f3a705369; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< cc1538c693d25e282bed8c54b65c914a04023a78; \>= 6048c64b26097a0ffbd966866b599f990e674e9b, \< a44e84a9b7764c72896f7241a0ec9ac7e7ef38dd; Linux 4.6.

### Is there a fix for CVE-2022-50668?

Yes. Fixed in Linux 1be16a0c2f10186df505e28b0cc92d7f3366e2a8, Linux 5bc0b2fda4b47c86278f7c6d30c211f425bf51cf, Linux 127b80cefb941a81255c72f11081123f3a705369. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-50668?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/efaa0ca678f56d47316a08030b2515678cebbc50>
- other: <https://git.kernel.org/stable/c/af53065276376750dfac35a7248af18806404c5d>
- other: <https://git.kernel.org/stable/c/1be16a0c2f10186df505e28b0cc92d7f3366e2a8>
- other: <https://git.kernel.org/stable/c/5bc0b2fda4b47c86278f7c6d30c211f425bf51cf>
- other: <https://git.kernel.org/stable/c/127b80cefb941a81255c72f11081123f3a705369>
- other: <https://git.kernel.org/stable/c/cc1538c693d25e282bed8c54b65c914a04023a78>
- other: <https://git.kernel.org/stable/c/a44e84a9b7764c72896f7241a0ec9ac7e7ef38dd>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50668>

HTML: <https://flawdb.com/CVE-2022-50668> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50668>
