{"id":"CVE-2024-47669","summary":"nilfs2: fix state management in error path of log writing function","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: fix state management in error path of log writing function\n\nAfter commit a694291a6211 (\"nilfs2: separate wait function from\nnilfs_segctor_write\") was applied, the log writing function\nnilfs_segctor_do_construct() was able to issue I/O requests continuously\neven if user data blocks were split into multiple logs across segments,\nbut two potential flaws were introduced in its error handling.\n\nFirst, if nilfs_segctor_begin_construction() fails while creating the\nsecond or subsequent logs, the log writing function returns without\ncalling nilfs_segctor_abort_construction(), so the writeback flag set on\npages/folios will remain uncleared.  This causes page cache operations to\nhang waiting for the writeback flag.  For example,\ntruncate_inode_pages_final(), which is called via nilfs_evict_inode() when\nan inode is evicted from memory, will hang.\n\nSecond, the NILFS_I_COLLECTED flag set on normal inodes remain uncleared. \nAs a result, if the next log write involves checkpoint creation, that's\nfine, but if a partial log write is performed that does not, inodes with\nNILFS_I_COLLECTED set are erroneously removed from the \"sc_dirty_files\"\nlist, and their data and b-tree blocks may not be written to the device,\ncorrupting the block mapping.\n\nFix these issues by uniformly calling nilfs_segctor_abort_construction()\non failure of each step in the loop in nilfs_segctor_do_construct(),\nhaving it clean up logs and segment usages according to progress, and\ncorrecting the conditions for calling nilfs_redirty_inodes() to ensure\nthat the NILFS_I_COLLECTED flag is cleared.","modified":"2026-03-20T12:38:01.257843Z","published":"2024-10-09T14:14:01.139Z","related":["SUSE-SU-2024:3984-1","SUSE-SU-2024:3986-1","SUSE-SU-2024:4315-1","SUSE-SU-2024:4318-1","SUSE-SU-2024:4364-1","SUSE-SU-2024:4376-1","SUSE-SU-2024:4387-1","SUSE-SU-2025:20163-1","SUSE-SU-2025:20164-1","SUSE-SU-2025:20246-1","SUSE-SU-2025:20247-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/47xxx/CVE-2024-47669.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/036441e8438b29111fa75008f0ce305fb4e83c0a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/0a1a961bde4351dc047ffdeb2f1311ca16a700cc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/30562eff4a6dd35c4b5be9699ef61ad9f5f20a06"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3e349d7191f0688fc9808ef24fd4e4b4ef5ca876"},{"type":"WEB","url":"https://git.kernel.org/stable/c/40a2757de2c376ef8a08d9ee9c81e77f3c750adf"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6576dd6695f2afca3f4954029ac4a64f82ba60ab"},{"type":"WEB","url":"https://git.kernel.org/stable/c/74866c16ea2183f52925fa5d76061a1fe7f7737b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/efdde00d4a1ef10bb71e09ebc67823a3d3ad725b"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/47xxx/CVE-2024-47669.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47669"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"a694291a6211537189c6080f77f63cdabfc9b63e"},{"fixed":"40a2757de2c376ef8a08d9ee9c81e77f3c750adf"},{"fixed":"036441e8438b29111fa75008f0ce305fb4e83c0a"},{"fixed":"efdde00d4a1ef10bb71e09ebc67823a3d3ad725b"},{"fixed":"3e349d7191f0688fc9808ef24fd4e4b4ef5ca876"},{"fixed":"30562eff4a6dd35c4b5be9699ef61ad9f5f20a06"},{"fixed":"0a1a961bde4351dc047ffdeb2f1311ca16a700cc"},{"fixed":"74866c16ea2183f52925fa5d76061a1fe7f7737b"},{"fixed":"6576dd6695f2afca3f4954029ac4a64f82ba60ab"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-47669.json"}}],"schema_version":"1.7.5"}