CVE-2024-50229
nilfs2: fix potential deadlock with newly created symlinks
Reported by linux · Published November 9, 2024
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-headers | Amazon Linux | 6.1.119-129.201.amzn2023 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 21fc61c73c3903c4c312d0802da01ec2b323d174, 21fc61c73c3903c4c312d0802da01ec2b323d174, 21fc61c73c3903c4c312d0802da01ec2b323d174 |
| Linux | Linux | 4.5, 0, 4.19.323 |
| amazon:2023 | kernel-headers | 0 |
| linux | linux_kernel | 4.5, 4.4.116, 4.5 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | kernel | 0 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2023 | kernel-modules-extra | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | bpftool | 0 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | kernel-livepatch-6.1.119-129.201 | 0 |
| Linux | Linux | 21fc61c73c3903c4c312d0802da01ec2b323d174, 076e4ab3279eb3ddb206de44d04df7aeb2428e09, 4.5 |
| amazon:2023 | kernel-modules-extra-common | 0 |
Timeline
- Nov 9, 2024 Coalition ESS Score (8 in total, the first dated here)
- Nov 9, 2024 CVE Published
- Nov 10, 2024 EPSS Score (30 in total, the first dated here)
- Jan 6, 2025 CVE Updated
- Jan 2, 2026 Security Advisory (146 in total, the first dated here)
- Apr 29, 2026 Distribution Patch (129 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-50229
vulnetix vdb fixes CVE-2024-50229
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-50229/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart