CVE-2022-50668

Source
https://cve.org/CVERecord?id=CVE-2022-50668
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50668.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50668
Downstream
Related
Published
2025-12-09T01:29:19.526Z
Modified
2026-03-20T11:47:34.614964Z
Summary
ext4: fix deadlock due to mbcache entry corruption
Details

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 ext4xattrblockset() 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 (ereusable set) although its reference count is too big. When this inconsistency happens, this inconsistent state is kept indefinitely and so ext4xattrblock_set() keeps retrying indefinitely.

The inconsistent state is caused by non-atomic update of ereusable bit. ereusable is part of a bitfield and ereusable update can race with update of ereferenced 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").

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50668.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
6048c64b26097a0ffbd966866b599f990e674e9b
Fixed
efaa0ca678f56d47316a08030b2515678cebbc50
Fixed
af53065276376750dfac35a7248af18806404c5d
Fixed
1be16a0c2f10186df505e28b0cc92d7f3366e2a8
Fixed
5bc0b2fda4b47c86278f7c6d30c211f425bf51cf
Fixed
127b80cefb941a81255c72f11081123f3a705369
Fixed
cc1538c693d25e282bed8c54b65c914a04023a78
Fixed
a44e84a9b7764c72896f7241a0ec9ac7e7ef38dd

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50668.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.6.0
Fixed
4.19.270
Type
ECOSYSTEM
Events
Introduced
4.20.0
Fixed
5.4.229
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.163
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.87
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.0.18
Type
ECOSYSTEM
Events
Introduced
6.1.0
Fixed
6.1.4

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50668.json"