CVE-2024-50229
Linux Kernel Nilfs2 Symlink Deadlock Vulnerability
Description
In the Linux kernel, the following vulnerability has been resolved: nilfs2: fix potential deadlock with newly created symlinks Syzbot reported that page_symlink(), called by nilfs_symlink(), triggers memory reclamation involving the filesystem layer, which can result in circular lock dependencies among the reader/writer semaphore nilfs->ns_segctor_sem, s_writers percpu_rwsem (intwrite) and the fs_reclaim pseudo lock. This is because after commit 21fc61c73c39 ("don't put symlink bodies in pagecache into highmem"), the gfp flags of the page cache for symbolic links are overwritten to GFP_KERNEL via inode_nohighmem(). This is not a problem for symlinks read from the backing device, because the __GFP_FS flag is dropped after inode_nohighmem() is called. However, when a new symlink is created with nilfs_symlink(), the gfp flags remain overwritten to GFP_KERNEL. Then, memory allocation called from page_symlink() etc. triggers memory reclamation including the FS layer, which may call nilfs_evict_inode() or nilfs_dirty_inode(). And these can cause a deadlock if they are called while nilfs->ns_segctor_sem is held: Fix this issue by dropping the __GFP_FS flag from the page cache GFP flags of newly created symlinks in the same way that nilfs_new_inode() and __nilfs_read_inode() do, as a workaround until we adopt nofs allocation scope consistently or improve the locking constraints.
INFO
Published Date :
Nov. 9, 2024, 11:15 a.m.
Last Modified :
Nov. 13, 2024, 6:35 p.m.
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Remotely Exploitable :
No
Impact Score :
3.6
Exploitability Score :
1.8
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2024-50229
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2024-50229
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2024-50229
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Nov. 13, 2024
Action Type Old Value New Value Added CVSS V3.1 NIST AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Changed Reference Type https://git.kernel.org/stable/c/1246d86e7bbde265761932c6e2dce28c69cdcb91 No Types Assigned https://git.kernel.org/stable/c/1246d86e7bbde265761932c6e2dce28c69cdcb91 Patch Changed Reference Type https://git.kernel.org/stable/c/58c7f44c7b9e5ac7e3b1e5da2572ed7767a12f38 No Types Assigned https://git.kernel.org/stable/c/58c7f44c7b9e5ac7e3b1e5da2572ed7767a12f38 Patch Changed Reference Type https://git.kernel.org/stable/c/69548bb663fcb63f9ee0301be808a36b9d78dac3 No Types Assigned https://git.kernel.org/stable/c/69548bb663fcb63f9ee0301be808a36b9d78dac3 Patch Changed Reference Type https://git.kernel.org/stable/c/9aa5d43ac4cace8fb9bd964ff6c23f599dc3cd24 No Types Assigned https://git.kernel.org/stable/c/9aa5d43ac4cace8fb9bd964ff6c23f599dc3cd24 Patch Changed Reference Type https://git.kernel.org/stable/c/a1686db1e59f8fc016c4c9361e2119dd206f479a No Types Assigned https://git.kernel.org/stable/c/a1686db1e59f8fc016c4c9361e2119dd206f479a Patch Changed Reference Type https://git.kernel.org/stable/c/b3a033e3ecd3471248d474ef263aadc0059e516a No Types Assigned https://git.kernel.org/stable/c/b3a033e3ecd3471248d474ef263aadc0059e516a Patch Changed Reference Type https://git.kernel.org/stable/c/c72e0df0b56c1166736dc8eb62070ebb12591447 No Types Assigned https://git.kernel.org/stable/c/c72e0df0b56c1166736dc8eb62070ebb12591447 Patch Changed Reference Type https://git.kernel.org/stable/c/cc38c596e648575ce58bfc31623a6506eda4b94a No Types Assigned https://git.kernel.org/stable/c/cc38c596e648575ce58bfc31623a6506eda4b94a Patch Added CWE NIST CWE-667 Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:4.4.116:*:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.5 up to (excluding) 4.19.323 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.20 up to (excluding) 5.4.285 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.5 up to (excluding) 5.10.229 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.11 up to (excluding) 5.15.171 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.16 up to (excluding) 6.1.116 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.2 up to (excluding) 6.6.60 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.7 up to (excluding) 6.11.7 *cpe:2.3:o:linux:linux_kernel:6.12:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.12:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.12:rc3:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.12:rc4:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.12:rc5:*:*:*:*:*:* -
CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Nov. 09, 2024
Action Type Old Value New Value Added Description In the Linux kernel, the following vulnerability has been resolved: nilfs2: fix potential deadlock with newly created symlinks Syzbot reported that page_symlink(), called by nilfs_symlink(), triggers memory reclamation involving the filesystem layer, which can result in circular lock dependencies among the reader/writer semaphore nilfs->ns_segctor_sem, s_writers percpu_rwsem (intwrite) and the fs_reclaim pseudo lock. This is because after commit 21fc61c73c39 ("don't put symlink bodies in pagecache into highmem"), the gfp flags of the page cache for symbolic links are overwritten to GFP_KERNEL via inode_nohighmem(). This is not a problem for symlinks read from the backing device, because the __GFP_FS flag is dropped after inode_nohighmem() is called. However, when a new symlink is created with nilfs_symlink(), the gfp flags remain overwritten to GFP_KERNEL. Then, memory allocation called from page_symlink() etc. triggers memory reclamation including the FS layer, which may call nilfs_evict_inode() or nilfs_dirty_inode(). And these can cause a deadlock if they are called while nilfs->ns_segctor_sem is held: Fix this issue by dropping the __GFP_FS flag from the page cache GFP flags of newly created symlinks in the same way that nilfs_new_inode() and __nilfs_read_inode() do, as a workaround until we adopt nofs allocation scope consistently or improve the locking constraints. Added Reference kernel.org https://git.kernel.org/stable/c/cc38c596e648575ce58bfc31623a6506eda4b94a [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/a1686db1e59f8fc016c4c9361e2119dd206f479a [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/c72e0df0b56c1166736dc8eb62070ebb12591447 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/69548bb663fcb63f9ee0301be808a36b9d78dac3 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/58c7f44c7b9e5ac7e3b1e5da2572ed7767a12f38 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/1246d86e7bbde265761932c6e2dce28c69cdcb91 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/9aa5d43ac4cace8fb9bd964ff6c23f599dc3cd24 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/b3a033e3ecd3471248d474ef263aadc0059e516a [No types assigned]
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2024-50229
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2024-50229
weaknesses.