| From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2024-27032: f2fs: fix to avoid potential panic during recovery |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| f2fs: fix to avoid potential panic during recovery |
| |
| During recovery, if FAULT_BLOCK is on, it is possible that |
| f2fs_reserve_new_block() will return -ENOSPC during recovery, |
| then it may trigger panic. |
| |
| Also, if fault injection rate is 1 and only FAULT_BLOCK fault |
| type is on, it may encounter deadloop in loop of block reservation. |
| |
| Let's change as below to fix these issues: |
| - remove bug_on() to avoid panic. |
| - limit the loop count of block reservation to avoid potential |
| deadloop. |
| |
| The Linux kernel CVE team has assigned CVE-2024-27032 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 6.1.77 with commit b1020a546779139eec5d930e15ce534c1101b89c and fixed in 6.1.83 with commit fe4de493572a4263554903bf9c3afc5c196e15f0 |
| Issue introduced in 6.6.16 with commit 2a7b12d4705bc308cf18eae2b69ec8db34881cc3 and fixed in 6.6.23 with commit 8844b2f8a3f0c428b74672f9726f9950b1a7764c |
| Issue introduced in 6.7.4 with commit b29cc6e29b5e6037e1bcd2b2ac67b7d89acd194c and fixed in 6.7.11 with commit d034810d02a5af8eb74debe29877dcaf5f00fdd1 |
| Issue introduced in 6.8 with commit 956fa1ddc132e028f3b7d4cf17e6bfc8cb36c7fd and fixed in 6.8.2 with commit f26091a981318b5b7451d61f99bc073a6af8db67 |
| Issue introduced in 6.8 with commit 956fa1ddc132e028f3b7d4cf17e6bfc8cb36c7fd and fixed in 6.9 with commit 21ec68234826b1b54ab980a8df6e33c74cfbee58 |
| Issue introduced in 4.19.307 with commit bc1fb291f36dd1d9d667241d9fe30b835dbb8ee8 |
| Issue introduced in 5.4.269 with commit 9fceaf8182d453639cddb7f4a6877a1e1564de39 |
| Issue introduced in 5.10.210 with commit 80c69f576ff39d6ae8a6e2107da3dc03b533759c |
| Issue introduced in 5.15.149 with commit b4fb0807a1d60f8642a5fd62bd659cd6052eaf97 |
| |
| 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-2024-27032 |
| 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/f2fs.h |
| fs/f2fs/recovery.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/fe4de493572a4263554903bf9c3afc5c196e15f0 |
| https://git.kernel.org/stable/c/8844b2f8a3f0c428b74672f9726f9950b1a7764c |
| https://git.kernel.org/stable/c/d034810d02a5af8eb74debe29877dcaf5f00fdd1 |
| https://git.kernel.org/stable/c/f26091a981318b5b7451d61f99bc073a6af8db67 |
| https://git.kernel.org/stable/c/21ec68234826b1b54ab980a8df6e33c74cfbee58 |