Skip to contentSkip to conversation

CVE-2022-50328: jbd2: fix potential use-after-free in jbd2_fc_wait_bufs

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 15, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

jbd2: fix potential use-after-free in jbd2_fc_wait_bufs

In 'jbd2_fc_wait_bufs' use 'bh' after put buffer head reference count which may lead to use-after-free.
So judge buffer if uptodate before put buffer head reference count.

The Linux kernel CVE team has assigned CVE-2022-50328 to this issue.

Affected and fixed versions
===========================

	Fixed in 5.10.150 with commit 1d4d16daec2a6689b6d3fbfc7d2078643adc6619
	Fixed in 5.15.75 with commit d11d2ded293976a1a0d9d9471827a44dc9e3c63f
	Fixed in 5.19.17 with commit 2e6d9f381c1ed844531a577783fc352de7a44c8a
	Fixed in 6.0.3 with commit effd9b3c029ecdd853a11933dcf857f5a7ca8c3d
	Fixed in 6.1 with commit 243d1a5d505d0b0460c9af0ad56ed4a56ef0bebd

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2022-50328

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
fs/jbd2/journal.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/1d4d16daec2a6689b6d3fbfc7d2078643adc6619
	https://git.kernel.org/stable/c/d11d2ded293976a1a0d9d9471827a44dc9e3c63f
	https://git.kernel.org/stable/c/2e6d9f381c1ed844531a577783fc352de7a44c8a
	https://git.kernel.org/stable/c/effd9b3c029ecdd853a11933dcf857f5a7ca8c3d
	https://git.kernel.org/stable/c/243d1a5d505d0b0460c9af0ad56ed4a56ef0bebd