f2fs: fix to avoid potential panic during recovery
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
bc1fb291f36dd1d9d667241d9fe30b835dbb8ee8| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
During f2fs recovery, enabling FAULT_BLOCK can cause a block reservation failure that triggers a kernel panic. With a fault injection rate of 1 and only FAULT_BLOCK enabled, block reservation can instead loop indefinitely. The description does not establish an attacker path, authentication requirement, or user-interaction requirement.
Engineers running Linux kernels with f2fs should check their versions against the vendor advisory; affected versions were not provided.