CVE-2022-50839
Description
In the Linux kernel, the following vulnerability has been resolved:
jbd2: fix potential buffer head reference count leak
As in 'jbd2_fc_wait_bufs' if buffer isn't uptodate, will return -EIO without update 'journal->j_fc_off'. But 'jbd2_fc_release_bufs' will release buffer head from ‘j_fc_off - 1’ if 'bh' is NULL will terminal release which will lead to buffer head buffer head reference count leak. To solve above issue, update 'journal->j_fc_off' before return -EIO.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A buffer head reference count leak in the Linux kernel's jbd2 journaling layer can occur when a buffer is not uptodate, leading to a resource leak.
Vulnerability
Description
In the Linux kernel's jbd2 journaling subsystem, the function jbd2_fc_wait_bufs may return an -EIO error without updating the journal a buffer is not uptodate without updating the journal's j_fc_off field. This causes jbd2_fc_release_bufs to release buffer heads from an incorrect offset, leading to a reference count leak on the buffer head [1][2].
Exploitation
An attacker would need to trigger a journal I/O error that causes a buffer to be not uptodate during fast commit processing. This requires local access to the system and the ability to induce a storage error or mount a filesystem with journaling enabled. No special privileges beyond normal filesystem access are needed to trigger the code path.
Impact
A successful exploitation results in a buffer head reference count leak, which can lead to memory exhaustion over time and a denial of service condition. The leak the system becomes unstable or crashes. The vulnerability does not directly allow code execution or privilege escalation.
Mitigation
The fix updates journal->j_fc_off before returning -EIO in jbd2_fc_wait_bufs, ensuring that jbd2_fc_release_bufs correctly releases all buffer heads. The patch has been applied to the stable kernel tree [1][2]. Users should apply the latest kernel updates from their distribution.
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
1Patches
57a33dde572fce7385c868ee068ed9c76b2af9b073d737253e0d5fc7a6d80Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- git.kernel.org/stable/c/68ed9c76b2affd47177b92495446abb7262d0ef7nvd
- git.kernel.org/stable/c/7a33dde572fceb45d02d188e0213c47059401c93nvd
- git.kernel.org/stable/c/9b073d73725366d886b711b74e058c02f51e7a0envd
- git.kernel.org/stable/c/e0d5fc7a6d80ac2406c7dfc6bb625201d0250a8anvd
- git.kernel.org/stable/c/e7385c868ee038d6a0cb0e85c22d2741e7910fd5nvd
News mentions
0No linked articles in our index yet.