# CVE-2024-50229: nilfs2: fix potential deadlock with newly created symlinks

- Priority: **Routine**
- Reason: Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-11-09 · Modified: 2026-05-23
- Aliases: UBUNTU-CVE-2024-50229, DEBIAN-CVE-2024-50229
- Record: https://cvemate.com/vulnerability/CVE-2024-50229 · JSON: https://cvemate.com/vulnerability/CVE-2024-50229/json

## Description

```text
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.
```

## Signals

- CVSS: 5.5 medium (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- EPSS: 0.207%, percentile 11.322%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 137)

- debian linux (Debian): \< 6.1.119-1 \| \< 6.11.7-1
- ubuntu linux (Ubuntu): \< 4.15.0-235.247 \| \< 5.4.0-208.228 \| \< 5.15.0-133.144 \| \< 6.8.0-56.58
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 4.15.0-1178.191 \| \< 5.4.0-1140.150 \| \< 5.15.0-1078.85 \| \< 6.8.0-1025.27
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1080.87~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): \< 5.4.0-1142.152~18.04.1
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1027.29~22.04.1
- ubuntu linux-aws-fips (Ubuntu): \< 4.15.0-2116.122 \| All versions (No fix recorded) \| \< 5.4.0-1140.151+fips1 \| \< 5.15.0-1078.85+fips1
- ubuntu linux-aws-hwe (Ubuntu): \< 4.15.0-1178.191~16.04.1
- ubuntu linux-azure (Ubuntu): \< 4.15.0-1186.201~14.04.1 \| \< 4.15.0-1186.201~16.04.1 \| All versions (No fix recorded) \| \< 5.4.0-1145.152 \| \< 5.15.0-1081.90 \| \< 6.8.0-1025.30
- ubuntu linux-azure-4.15 (Ubuntu): \< 4.15.0-1186.201
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 57)

- <https://git.kernel.org/stable/c/cc38c596e648575ce58bfc31623a6506eda4b94a>
- <https://git.kernel.org/stable/c/a1686db1e59f8fc016c4c9361e2119dd206f479a>
- <https://git.kernel.org/stable/c/c72e0df0b56c1166736dc8eb62070ebb12591447>
- <https://git.kernel.org/stable/c/69548bb663fcb63f9ee0301be808a36b9d78dac3>
- <https://git.kernel.org/stable/c/58c7f44c7b9e5ac7e3b1e5da2572ed7767a12f38>
- <https://git.kernel.org/stable/c/1246d86e7bbde265761932c6e2dce28c69cdcb91>
- <https://git.kernel.org/stable/c/9aa5d43ac4cace8fb9bd964ff6c23f599dc3cd24>
- <https://git.kernel.org/stable/c/b3a033e3ecd3471248d474ef263aadc0059e516a>
- <https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html>
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>
- <https://ubuntu.com/security/CVE-2024-50229>
- <https://www.cve.org/CVERecord?id=CVE-2024-50229>
- <https://git.kernel.org/linus/b3a033e3ecd3471248d474ef263aadc0059e516a>
- <https://ubuntu.com/security/notices/USN-7276-1>
- <https://ubuntu.com/security/notices/USN-7277-1>
- <https://ubuntu.com/security/notices/USN-7288-1>
- <https://ubuntu.com/security/notices/USN-7289-1>
- <https://ubuntu.com/security/notices/USN-7291-1>
- <https://ubuntu.com/security/notices/USN-7288-2>
- <https://ubuntu.com/security/notices/USN-7289-2>

---

Data as of 2026-12-05T04:22:23.278Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
