CVE-2023-53838: f2fs: synchronize atomic write aborts
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
f2fs: synchronize atomic write aborts
To fix a race condition between atomic write aborts, I use the inode lock and make COW inode to be re-usable thoroughout the whole atomic file inode lifetime.
The Linux kernel CVE team has assigned CVE-2023-53838 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.19 with commit 3db1de0e582c358dd013f3703cd55b5fe4076436 and fixed in 6.1.18 with commit 102b82708c1523b36d421cb8687746906069bc17 Issue introduced in 5.19 with commit 3db1de0e582c358dd013f3703cd55b5fe4076436 and fixed in 6.2.5 with commit b7724360714642099cec907f54f42e55f5325453 Issue introduced in 5.19 with commit 3db1de0e582c358dd013f3703cd55b5fe4076436 and fixed in 6.3 with commit a46bebd502fe1a3bd1d22f64cedd93e7e7702693 Issue introduced in 5.18.18 with commit 6db52f1944417c2601182a591a704e2f119c5215
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-2023-53838
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/f2fs/file.c fs/f2fs/inode.c fs/f2fs/segment.c fs/f2fs/super.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/102b82708c1523b36d421cb8687746906069bc17 https://git.kernel.org/stable/c/b7724360714642099cec907f54f42e55f5325453 https://git.kernel.org/stable/c/a46bebd502fe1a3bd1d22f64cedd93e7e7702693