{"id":"CVE-2025-68736","aliases":["CVE-2025-68736"],"related":[],"kind":"vulnerability","state":"published","title":"landlock: Fix handling of disconnected directories","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nlandlock: Fix handling of disconnected directories\n\nDisconnected files or directories can appear when they are visible and\nopened from a bind mount, but have been renamed or moved from the source\nof the bind mount in a way that makes them inaccessible from the mount\npoint (i.e. out of scope).\n\nPreviously, access rights tied to files or directories opened through a\ndisconnected directory were collected by walking the related hierarchy\ndown to the root of the filesystem, without taking into account the\nmount point because it couldn't be found. This could lead to\ninconsistent access results, potential access right widening, and\nhard-to-debug renames, especially since such paths cannot be printed.\n\nFor a sandboxed task to create a disconnected directory, it needs to\nhave write access (i.e. FS_MAKE_REG, FS_REMOVE_FILE, and FS_REFER) to\nthe underlying source of the bind mount, and read access to the related\nmount point.   Because a sandboxed task cannot acquire more access\nrights than those defined by its Landlock domain, this could lead to\ninconsistent access rights due to missing permissions that should be\ninherited from the mount point hierarchy, while inheriting permissions\nfrom the filesystem hierarchy hidden by this mount point instead.\n\nLandlock now handles files and directories opened from disconnected\ndirectories by taking into account the filesystem hierarchy when the\nmount point is not found in the hierarchy walk, and also always taking\ninto account the mount point from which these disconnected directories\nwere opened.  This ensures that a rename is not allowed if it would\nwiden access rights [1].\n\nThe rationale is that, even if disconnected hierarchies might not be\nvisible or accessible to a sandboxed task, relying on the collected\naccess rights from them improves the guarantee that access rights will\nnot be widened during a rename because of the access right comparison\nbetween the source and the destination (see LANDLOCK_ACCESS_FS_REFER).\nIt may look like this would grant more access on disconnected files and\ndirectories, but the security policies are always enforced for all the\nevaluated hierarchies.  This new behavior should be less surprising to\nusers and safer from an access control perspective.\n\nRemove a wrong WARN_ON_ONCE() canary in collect_domain_accesses() and\nfix the related comment.\n\nBecause opened files have their access rights stored in the related file\nsecurity properties, there is no impact for disconnected or unlinked\nfiles.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nlandlock: Fix handling of disconnected directories\n\nDisconnected files or directories can appear when they are visible and\nopened from a bind mount, but have been renamed or moved from the source\nof the bind mount in a way that makes them inaccessible from the mount\npoint (i.e. out of scope).\n\nPreviously, access rights tied to files or directories opened through a\ndisconnected directory were collected by walking the related hierarchy\ndown to the root of the filesystem, without taking into account the\nmount point because it couldn't be found. This could lead to\ninconsistent access results, potential access right widening, and\nhard-to-debug renames, especially since such paths cannot be printed.\n\nFor a sandboxed task to create a disconnected directory, it needs to\nhave write access (i.e. FS_MAKE_REG, FS_REMOVE_FILE, and FS_REFER) to\nthe underlying source of the bind mount, and read access to the related\nmount point.   Because a sandboxed task cannot acquire more access\nrights than those defined by its Landlock domain, this could lead to\ninconsistent access rights due to missing permissions that should be\ninherited from the mount point hierarchy, while inheriting permissions\nfrom the filesystem hierarchy hidden by this mount point instead.\n\nLandlock now handles files and directories opened from disconnected\ndirectories by taking into account the filesystem hierarchy when the\nmount point is not found in the hierarchy walk, and also always taking\ninto account the mount point from which these disconnected directories\nwere opened.  This ensures that a rename is not allowed if it would\nwiden access rights [1].\n\nThe rationale is that, even if disconnected hierarchies might not be\nvisible or accessible to a sandboxed task, relying on the collected\naccess rights from them improves the guarantee that access rights will\nnot be widened during a rename because of the access right comparison\nbetween the source and the destination (see LANDLOCK_ACCESS_FS_REFER).\nIt may look like this would grant more access on disconnected files and\ndirectories, but the security policies are always enforced for all the\nevaluated hierarchies.  This new behavior should be less surprising to\nusers and safer from an access control perspective.\n\nRemove a wrong WARN_ON_ONCE() canary in collect_domain_accesses() and\nfix the related comment.\n\nBecause opened files have their access rights stored in the related file\nsecurity properties, there is no impact for disconnected or unlinked\nfiles.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nlandlock: Corrección del manejo de directorios desconectados\n\nArchivos o directorios desconectados pueden aparecer cuando son visibles y se abren desde un montaje de enlace, pero han sido renombrados o movidos desde el origen del montaje de enlace de una manera que los hace inaccesibles desde el punto de montaje (es decir, fuera de alcance).\n\nAnteriormente, los derechos de acceso vinculados a archivos o directorios abiertos a través de un directorio desconectado se recopilaban recorriendo la jerarquía relacionada hasta la raíz del sistema de archivos, sin tener en cuenta el punto de montaje porque no se podía encontrar. Esto podría llevar a resultados de acceso inconsistentes, una posible ampliación de los derechos de acceso y renombramientos difíciles de depurar, especialmente porque tales rutas no pueden imprimirse.\n\nPara que una tarea en sandbox cree un directorio desconectado, necesita tener acceso de escritura (es decir, FS_MAKE_REG, FS_REMOVE_FILE y FS_REFER) al origen subyacente del montaje de enlace, y acceso de lectura al punto de montaje relacionado. Debido a que una tarea en sandbox no puede adquirir más derechos de acceso que los definidos por su dominio Landlock, esto podría llevar a derechos de acceso inconsistentes debido a permisos faltantes que deberían heredarse de la jerarquía del punto de montaje, mientras que, en su lugar, hereda permisos de la jerarquía del sistema de archivos oculta por este punto de montaje.\n\nLandlock ahora maneja archivos y directorios abiertos desde directorios desconectados teniendo en cuenta la jerarquía del sistema de archivos cuando el punto de montaje no se encuentra en el recorrido de la jerarquía, y también siempre teniendo en cuenta el punto de montaje desde el cual se abrieron estos directorios desconectados. Esto asegura que no se permite un renombramiento si ampliara los derechos de acceso [1].\n\nLa razón es que, incluso si las jerarquías desconectadas podrían no ser visibles o accesibles para una tarea en sandbox, confiar en los derechos de acceso recopilados de ellas mejora la garantía de que los derechos de acceso no se ampliarán durante un renombramiento debido a la comparación de derechos de acceso entre el origen y el destino (ver LANDLOCK_ACCESS_FS_REFER). Podría parecer que esto otorgaría más acceso a archivos y directorios desconectados, pero las políticas de seguridad siempre se aplican para todas las jerarquías evaluadas. Este nuevo comportamiento debería ser menos sorprendente para los usuarios y más seguro desde una perspectiva de control de acceso.\n\nEliminar un canary WARN_ON_ONCE() incorrecto en collect_domain_accesses() y corregir el comentario relacionado.\n\nDebido a que los archivos abiertos tienen sus derechos de acceso almacenados en las propiedades de seguridad de archivo relacionadas, no hay impacto para archivos desconectados o desvinculados.","source":"nvd"}],"published":"2025-12-24T12:09:35.081Z","modified":"2026-10-16T15:16:52.470Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"cb2c7d1a1776057c9a1f48ed1250d85e94d4850d","fixed":"4f5cdc82a6c7e22cfd9a92d203cec13a52a3f363","status":"affected"},{"type":"git","introduced":"cb2c7d1a1776057c9a1f48ed1250d85e94d4850d","fixed":"fbf718d5afe21057694a0c0223a18b0c7a5960b6","status":"affected"},{"type":"git","introduced":"cb2c7d1a1776057c9a1f48ed1250d85e94d4850d","fixed":"426d5b681b2f3339ff04da39b81d71176dc8c87c","status":"affected"},{"type":"git","introduced":"cb2c7d1a1776057c9a1f48ed1250d85e94d4850d","fixed":"cadb28f8b3fd6908e3051e86158c65c3a8e1c907","status":"affected"},{"type":"git","introduced":"cb2c7d1a1776057c9a1f48ed1250d85e94d4850d","fixed":"49c9e09d961025b22e61ef9ad56aa1c21b6ce2f1","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.13","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.13","status":"unaffected"},{"type":"semver","introduced":"6.1.189","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.143","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.80","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.2","lastAffected":"6.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.19","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/4f5cdc82a6c7e22cfd9a92d203cec13a52a3f363","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fbf718d5afe21057694a0c0223a18b0c7a5960b6","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/426d5b681b2f3339ff04da39b81d71176dc8c87c","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cadb28f8b3fd6908e3051e86158c65c3a8e1c907","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/49c9e09d961025b22e61ef9ad56aa1c21b6ce2f1","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-16T15:04:56.596Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-68736","url":"https://www.cve.org/CVERecord?id=CVE-2025-68736","licence":"CVE Terms of Use","modified":"2026-10-16T15:09:43.754Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-68736","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68736","licence":"Public domain","modified":"2026-10-16T15:16:52.470Z"}],"updatedAt":"2026-11-25T22:59:09.902Z","epss":{"score":0.00154,"percentile":0.04738,"date":"2026-12-01T12:00:22.000Z"}}