{"id":"CVE-2024-50229","aliases":["CVE-2024-50229"],"related":[],"kind":"vulnerability","state":"published","title":"nilfs2: fix potential deadlock with newly created symlinks","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: fix potential deadlock with newly created symlinks\n\nSyzbot reported that page_symlink(), called by nilfs_symlink(), triggers\nmemory reclamation involving the filesystem layer, which can result in\ncircular lock dependencies among the reader/writer semaphore\nnilfs->ns_segctor_sem, s_writers percpu_rwsem (intwrite) and the\nfs_reclaim pseudo lock.\n\nThis is because after commit 21fc61c73c39 (\"don't put symlink bodies in\npagecache into highmem\"), the gfp flags of the page cache for symbolic\nlinks are overwritten to GFP_KERNEL via inode_nohighmem().\n\nThis is not a problem for symlinks read from the backing device, because\nthe __GFP_FS flag is dropped after inode_nohighmem() is called.  However,\nwhen a new symlink is created with nilfs_symlink(), the gfp flags remain\noverwritten to GFP_KERNEL.  Then, memory allocation called from\npage_symlink() etc.  triggers memory reclamation including the FS layer,\nwhich may call nilfs_evict_inode() or nilfs_dirty_inode().  And these can\ncause a deadlock if they are called while nilfs->ns_segctor_sem is held:\n\nFix this issue by dropping the __GFP_FS flag from the page cache GFP flags\nof newly created symlinks in the same way that nilfs_new_inode() and\n__nilfs_read_inode() do, as a workaround until we adopt nofs allocation\nscope consistently or improve the locking constraints.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: fix potential deadlock with newly created symlinks\n\nSyzbot reported that page_symlink(), called by nilfs_symlink(), triggers\nmemory reclamation involving the filesystem layer, which can result in\ncircular lock dependencies among the reader/writer semaphore\nnilfs->ns_segctor_sem, s_writers percpu_rwsem (intwrite) and the\nfs_reclaim pseudo lock.\n\nThis is because after commit 21fc61c73c39 (\"don't put symlink bodies in\npagecache into highmem\"), the gfp flags of the page cache for symbolic\nlinks are overwritten to GFP_KERNEL via inode_nohighmem().\n\nThis is not a problem for symlinks read from the backing device, because\nthe __GFP_FS flag is dropped after inode_nohighmem() is called.  However,\nwhen a new symlink is created with nilfs_symlink(), the gfp flags remain\noverwritten to GFP_KERNEL.  Then, memory allocation called from\npage_symlink() etc.  triggers memory reclamation including the FS layer,\nwhich may call nilfs_evict_inode() or nilfs_dirty_inode().  And these can\ncause a deadlock if they are called while nilfs->ns_segctor_sem is held:\n\nFix this issue by dropping the __GFP_FS flag from the page cache GFP flags\nof newly created symlinks in the same way that nilfs_new_inode() and\n__nilfs_read_inode() do, as a workaround until we adopt nofs allocation\nscope consistently or improve the locking constraints.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: nilfs2: arregla un potencial bloqueo con enlaces simbólicos recién creados Syzbot informó que page_symlink(), llamado por nilfs_symlink(), activa la recuperación de memoria que involucra la capa del sistema de archivos, lo que puede resultar en dependencias de bloqueo circular entre el semáforo de lectura/escritura nilfs-&gt;ns_segctor_sem, s_writers percpu_rwsem (intwrite) y el pseudobloqueo fs_reclaim. Esto se debe a que después de el commit 21fc61c73c39 (\"no poner cuerpos de enlaces simbólicos en pagecache en highmem\"), las banderas gfp de la caché de páginas para enlaces simbólicos se sobrescriben a GFP_KERNEL a través de inode_nohighmem(). Esto no es un problema para los enlaces simbólicos leídos desde el dispositivo de respaldo, porque la bandera __GFP_FS se descarta después de que se llama a inode_nohighmem(). Sin embargo, cuando se crea un nuevo enlace simbólico con nilfs_symlink(), los indicadores gfp permanecen sobrescritos en GFP_KERNEL. Luego, la asignación de memoria llamada desde page_symlink(), etc., activa la recuperación de memoria, incluida la capa FS, que puede llamar a nilfs_evict_inode() o nilfs_dirty_inode(). Y estos pueden causar un bloqueo si se los llama mientras se mantiene nilfs-&gt;ns_segctor_sem: solucione este problema eliminando el indicador __GFP_FS de los indicadores GFP de la caché de páginas de los enlaces simbólicos recién creados de la misma manera que lo hacen nilfs_new_inode() y __nilfs_read_inode(), como workaround hasta que adoptemos el alcance de asignación de nofs de manera consistente o mejoremos las restricciones de bloqueo.","source":"nvd"}],"published":"2024-11-09T10:14:39.756Z","modified":"2026-06-17T08:03:55.650Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-667"],"affected":[{"ranges":[{"type":"git","introduced":"21fc61c73c3903c4c312d0802da01ec2b323d174","fixed":"cc38c596e648575ce58bfc31623a6506eda4b94a","status":"affected"},{"type":"git","introduced":"21fc61c73c3903c4c312d0802da01ec2b323d174","fixed":"a1686db1e59f8fc016c4c9361e2119dd206f479a","status":"affected"},{"type":"git","introduced":"21fc61c73c3903c4c312d0802da01ec2b323d174","fixed":"c72e0df0b56c1166736dc8eb62070ebb12591447","status":"affected"},{"type":"git","introduced":"21fc61c73c3903c4c312d0802da01ec2b323d174","fixed":"69548bb663fcb63f9ee0301be808a36b9d78dac3","status":"affected"},{"type":"git","introduced":"21fc61c73c3903c4c312d0802da01ec2b323d174","fixed":"58c7f44c7b9e5ac7e3b1e5da2572ed7767a12f38","status":"affected"},{"type":"git","introduced":"21fc61c73c3903c4c312d0802da01ec2b323d174","fixed":"1246d86e7bbde265761932c6e2dce28c69cdcb91","status":"affected"},{"type":"git","introduced":"21fc61c73c3903c4c312d0802da01ec2b323d174","fixed":"9aa5d43ac4cace8fb9bd964ff6c23f599dc3cd24","status":"affected"},{"type":"git","introduced":"21fc61c73c3903c4c312d0802da01ec2b323d174","fixed":"b3a033e3ecd3471248d474ef263aadc0059e516a","status":"affected"},{"type":"git","version":"076e4ab3279eb3ddb206de44d04df7aeb2428e09","status":"affected"},{"type":"semver","introduced":"4.4.116","fixed":"4.5","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.5","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.5","status":"unaffected"},{"type":"semver","introduced":"4.19.323","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.285","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.229","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.171","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.116","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.60","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.11.7","lastAffected":"6.11.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.12","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.5","fixed":"4.19.323"},{"status":"affected","introduced":"4.20","fixed":"5.4.285"},{"status":"affected","introduced":"5.5","fixed":"5.10.229"},{"status":"affected","introduced":"5.11","fixed":"5.15.171"},{"status":"affected","introduced":"5.16","fixed":"6.1.116"},{"status":"affected","introduced":"6.2","fixed":"6.6.60"},{"status":"affected","introduced":"6.7","fixed":"6.11.7"},{"status":"affected","version":"4.4.116"},{"status":"affected","version":"6.12"},{"status":"affected","version":"6.12"},{"status":"affected","version":"6.12"},{"status":"affected","version":"6.12"},{"status":"affected","version":"6.12"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/cc38c596e648575ce58bfc31623a6506eda4b94a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a1686db1e59f8fc016c4c9361e2119dd206f479a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c72e0df0b56c1166736dc8eb62070ebb12591447","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/69548bb663fcb63f9ee0301be808a36b9d78dac3","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/58c7f44c7b9e5ac7e3b1e5da2572ed7767a12f38","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1246d86e7bbde265761932c6e2dce28c69cdcb91","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9aa5d43ac4cace8fb9bd964ff6c23f599dc3cd24","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b3a033e3ecd3471248d474ef263aadc0059e516a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-10-01T20:16:47.687Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-50229","url":"https://www.cve.org/CVERecord?id=CVE-2024-50229","licence":"CVE Terms of Use","modified":"2026-05-23T15:54:47.926Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-50229","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-50229","licence":"Public domain","modified":"2026-06-17T08:03:55.650Z"}],"updatedAt":"2026-11-25T22:58:47.969Z","epss":{"score":0.0024,"percentile":0.09045,"date":"2026-11-30T12:00:22.000Z"}}