VDB

CVE-2024-50229

CVE-2024-50229 PUBLISHED CVSS 5.5 MEDIUM

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.

PackageEcosystemFixed in
kernel-headersAmazon Linux6.1.119-129.201.amzn2023

Risk scores

CVSS 3.1
5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Affected products

VendorProductVersions
LinuxLinux21fc61c73c3903c4c312d0802da01ec2b323d174, 21fc61c73c3903c4c312d0802da01ec2b323d174, 21fc61c73c3903c4c312d0802da01ec2b323d174
LinuxLinux4.5, 0, 4.19.323
amazon:2023kernel-headers0
linuxlinux_kernel4.5, 4.4.116, 4.5
amazon:2023kernel-libbpf-static0
amazon:2023kernel0
amazon:2023kernel-tools0
amazon:2023kernel-modules-extra0
amazon:2023kernel-libbpf-devel0
amazon:2023bpftool0
amazon:2023python3-perf0
amazon:2023perf0
amazon:2023kernel-libbpf0
amazon:2023kernel-devel0
amazon:2023kernel-tools-devel0
amazon:2023kernel-livepatch-6.1.119-129.2010
LinuxLinux21fc61c73c3903c4c312d0802da01ec2b323d174, 076e4ab3279eb3ddb206de44d04df7aeb2428e09, 4.5
amazon:2023kernel-modules-extra-common0

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

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›