{"id":"CVE-2022-50668","summary":"ext4: fix deadlock due to mbcache entry corruption","details":"In the Linux kernel, the following vulnerability has been resolved:\n\next4: fix deadlock due to mbcache entry corruption\n\nWhen manipulating xattr blocks, we can deadlock infinitely looping\ninside ext4_xattr_block_set() where we constantly keep finding xattr\nblock for reuse in mbcache but we are unable to reuse it because its\nreference count is too big. This happens because cache entry for the\nxattr block is marked as reusable (e_reusable set) although its\nreference count is too big. When this inconsistency happens, this\ninconsistent state is kept indefinitely and so ext4_xattr_block_set()\nkeeps retrying indefinitely.\n\nThe inconsistent state is caused by non-atomic update of e_reusable bit.\ne_reusable is part of a bitfield and e_reusable update can race with\nupdate of e_referenced bit in the same bitfield resulting in loss of one\nof the updates. Fix the problem by using atomic bitops instead.\n\nThis bug has been around for many years, but it became *much* easier\nto hit after commit 65f8b80053a1 (\"ext4: fix race when reusing xattr\nblocks\").","modified":"2026-03-20T11:47:34.614964Z","published":"2025-12-09T01:29:19.526Z","related":["SUSE-SU-2026:0263-1","SUSE-SU-2026:0316-1","SUSE-SU-2026:0317-1","SUSE-SU-2026:0350-1","SUSE-SU-2026:0369-1","SUSE-SU-2026:0411-1","SUSE-SU-2026:0617-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50668.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/127b80cefb941a81255c72f11081123f3a705369"},{"type":"WEB","url":"https://git.kernel.org/stable/c/1be16a0c2f10186df505e28b0cc92d7f3366e2a8"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5bc0b2fda4b47c86278f7c6d30c211f425bf51cf"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a44e84a9b7764c72896f7241a0ec9ac7e7ef38dd"},{"type":"WEB","url":"https://git.kernel.org/stable/c/af53065276376750dfac35a7248af18806404c5d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/cc1538c693d25e282bed8c54b65c914a04023a78"},{"type":"WEB","url":"https://git.kernel.org/stable/c/efaa0ca678f56d47316a08030b2515678cebbc50"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50668.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50668"},{"type":"PACKAGE","url":"https://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"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"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"}}],"schema_version":"1.7.5"}