CVE-2022-50668
ext4: fix deadlock due to mbcache entry corruption
Check your servers for CVE-2022-50668
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-50668 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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").
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.87%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 59.7% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 6048c64b26097a0ffbd966866b599f990e674e9b, before efaa0ca678f56d47316a08030b2515678cebbc50 affected from 6048c64b26097a0ffbd966866b599f990e674e9b, before af53065276376750dfac35a7248af18806404c5d affected from 6048c64b26097a0ffbd966866b599f990e674e9b, before 1be16a0c2f10186df505e28b0cc92d7f3366e2a8 affected from 6048c64b26097a0ffbd966866b599f990e674e9b, before 5bc0b2fda4b47c86278f7c6d30c211f425bf51cf affected from 6048c64b26097a0ffbd966866b599f990e674e9b, before 127b80cefb941a81255c72f11081123f3a705369 affected from 6048c64b26097a0ffbd966866b599f990e674e9b, before cc1538c693d25e282bed8c54b65c914a04023a78 affected from 6048c64b26097a0ffbd966866b599f990e674e9b, before a44e84a9b7764c72896f7241a0ec9ac7e7ef38dd
Other versions: unaffected
|
| Linux |
affected 4.6 unaffected before 4.6 unaffected from 4.19.270 up to and including 4.19.* unaffected from 5.4.229 up to and including 5.4.* unaffected from 5.10.163 up to and including 5.10.* unaffected from 5.15.87 up to and including 5.15.* unaffected from 6.0.18 up to and including 6.0.* unaffected from 6.1.4 up to and including 6.1.* unaffected 6.2 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2022-50668 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-50668
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2022-50668
trivy image --scanners vuln IMAGE | grep CVE-2022-50668
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/efaa0ca678f56d47316a08030b2515678cebbc50 git.kernel.org
- https://git.kernel.org/stable/c/af53065276376750dfac35a7248af18806404c5d git.kernel.org
- https://git.kernel.org/stable/c/1be16a0c2f10186df505e28b0cc92d7f3366e2a8 git.kernel.org
- https://git.kernel.org/stable/c/5bc0b2fda4b47c86278f7c6d30c211f425bf51cf git.kernel.org
- https://git.kernel.org/stable/c/127b80cefb941a81255c72f11081123f3a705369 git.kernel.org
- https://git.kernel.org/stable/c/cc1538c693d25e282bed8c54b65c914a04023a78 git.kernel.org
- https://git.kernel.org/stable/c/a44e84a9b7764c72896f7241a0ec9ac7e7ef38dd git.kernel.org
Source: the record CVE-2022-50668 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse