CVE-2024-50229
nilfs2: fix potential deadlock with newly created symlinks
Check your servers for CVE-2024-50229
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-50229 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.21%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 11.3% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 1 Oct 2025):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-667 Improper Locking
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 21fc61c73c3903c4c312d0802da01ec2b323d174, before cc38c596e648575ce58bfc31623a6506eda4b94a affected from 21fc61c73c3903c4c312d0802da01ec2b323d174, before a1686db1e59f8fc016c4c9361e2119dd206f479a affected from 21fc61c73c3903c4c312d0802da01ec2b323d174, before c72e0df0b56c1166736dc8eb62070ebb12591447 affected from 21fc61c73c3903c4c312d0802da01ec2b323d174, before 69548bb663fcb63f9ee0301be808a36b9d78dac3 affected from 21fc61c73c3903c4c312d0802da01ec2b323d174, before 58c7f44c7b9e5ac7e3b1e5da2572ed7767a12f38 affected from 21fc61c73c3903c4c312d0802da01ec2b323d174, before 1246d86e7bbde265761932c6e2dce28c69cdcb91 affected from 21fc61c73c3903c4c312d0802da01ec2b323d174, before 9aa5d43ac4cace8fb9bd964ff6c23f599dc3cd24 affected from 21fc61c73c3903c4c312d0802da01ec2b323d174, before b3a033e3ecd3471248d474ef263aadc0059e516a affected 076e4ab3279eb3ddb206de44d04df7aeb2428e09 affected from 4.4.116, before 4.5
Other versions: unaffected
|
| Linux |
affected 4.5 unaffected before 4.5 unaffected from 4.19.323 up to and including 4.19.* unaffected from 5.4.285 up to and including 5.4.* unaffected from 5.10.229 up to and including 5.10.* unaffected from 5.15.171 up to and including 5.15.* unaffected from 6.1.116 up to and including 6.1.* unaffected from 6.6.60 up to and including 6.6.* unaffected from 6.11.7 up to and including 6.11.* unaffected 6.12 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-50229 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-50229
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2024-50229
trivy image --scanners vuln IMAGE | grep CVE-2024-50229
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/cc38c596e648575ce58bfc31623a6506eda4b94a git.kernel.org
- https://git.kernel.org/stable/c/a1686db1e59f8fc016c4c9361e2119dd206f479a git.kernel.org
- https://git.kernel.org/stable/c/c72e0df0b56c1166736dc8eb62070ebb12591447 git.kernel.org
- https://git.kernel.org/stable/c/69548bb663fcb63f9ee0301be808a36b9d78dac3 git.kernel.org
- https://git.kernel.org/stable/c/58c7f44c7b9e5ac7e3b1e5da2572ed7767a12f38 git.kernel.org
- https://git.kernel.org/stable/c/1246d86e7bbde265761932c6e2dce28c69cdcb91 git.kernel.org
- https://git.kernel.org/stable/c/9aa5d43ac4cace8fb9bd964ff6c23f599dc3cd24 git.kernel.org
- https://git.kernel.org/stable/c/b3a033e3ecd3471248d474ef263aadc0059e516a git.kernel.org
- https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html lists.debian.org
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html lists.debian.org
Source: the record CVE-2024-50229 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse