CVE-2024-47669: nilfs2: fix state management in error path of log writing function
In the Linux kernel, the following vulnerability has been resolved:
nilfs2: fix state management in error path of log writing function
After commit a694291a6211 ("nilfs2: separate wait function from nilfssegctorwrite") was applied, the log writing function nilfssegctordoconstruct() was able to issue I/O requests continuously even if user data blocks were split into multiple logs across segments, but two potential flaws were introduced in its error handling.
First, if nilfssegctorbeginconstruction() fails while creating the second or subsequent logs, the log writing function returns without calling nilfssegctorabortconstruction(), so the writeback flag set on pages/folios will remain uncleared. This causes page cache operations to hang waiting for the writeback flag. For example, truncateinodepagesfinal(), which is called via nilfsevictinode() when an inode is evicted from memory, will hang.
Second, the NILFSICOLLECTED flag set on normal inodes remain uncleared. As a result, if the next log write involves checkpoint creation, that's fine, but if a partial log write is performed that does not, inodes with NILFSICOLLECTED set are erroneously removed from the "scdirtyfiles" list, and their data and b-tree blocks may not be written to the device, corrupting the block mapping.
Fix these issues by uniformly calling nilfssegctorabortconstruction() on failure of each step in the loop in nilfssegctordoconstruct(), having it clean up logs and segment usages according to progress, and correcting the conditions for calling nilfsredirtyinodes() to ensure that the NILFSICOLLECTED flag is cleared.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1
Event History
Frequently Asked Questions
What is the severity of CVE-2024-47669?
CVE-2024-47669 has a severity rating that indicates a potential risk in the Linux kernel's nilfs2 log writing function.
How do I fix CVE-2024-47669?
To mitigate CVE-2024-47669, upgrade to the patched versions of the Linux kernel such as 6.1.123-1, 6.1.119-1, or any later stable release.
Which versions of the Linux kernel are affected by CVE-2024-47669?
CVE-2024-47669 affects Linux kernel versions between 2.6.33 and 6.11-rc6, along with specific Debian packages.
What is the impact of CVE-2024-47669 on systems using nilfs2?
The impact of CVE-2024-47669 on systems using nilfs2 can lead to improper state management during log writing, which may affect data integrity.
Is CVE-2024-47669 specific to a certain distribution of Linux?
Although CVE-2024-47669 is primarily associated with the Linux kernel, the vulnerability has implications across various distributions that utilize affected kernel versions.