CVE-2025-21654
JSON

5.5medium

ovl: support encoding fid from inode with no alias

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
0.20% (higher than 10% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: ovl: support encoding fid from inode with no alias Dmitry Safonov reported that a WARN_ON() assertion can be trigered by userspace when calling inotify_show_fdinfo() for an overlayfs watched inode, whose dentry aliases were discarded with drop_caches. The WARN_ON() assertion in inotify_show_fdinfo() was removed, because it is possible for encoding file handle to fail for other reason, but the impact of failing to encode an overlayfs file handle goes beyond this assertion. As shown in the LTP test case mentioned in the link below, failure to encode an overlayfs file handle from a non-aliased inode also leads to failure to report an fid with FAN_DELETE_SELF fanotify events. As Dmitry notes in his analyzis of the problem, ovl_encode_fh() fails if it cannot find an alias for the inode, but this failure can be fixed. ovl_encode_fh() seldom uses the alias and in the case of non-decodable file handles, as is often the case with fanotify fid info, ovl_encode_fh() never needs to use the alias to encode a file handle. Defer finding an alias until it is actually needed so ovl_encode_fh() will not fail in the common case of FAN_DELETE_SELF fanotify events.

Affected

Product or packageVersionsReported by
Linux Linuxfrom 16aac5ad1fa94894b798dd522c5c3a6a0628d7f0 before f0c0ac84de17c37e6e84da65fb920f91dada55ad, from 16aac5ad1fa94894b798dd522c5c3a6a0628d7f0 before 3c7c90274ae339e1ad443c9be1c67a20b80b9c76, from 16aac5ad1fa94894b798dd522c5c3a6a0628d7f0 before c45beebfde34aa71afbc48b2c54cdda623515037, 6.6
Not affected: before 6.6, from 6.6.74 up to 6.6.*, from 6.12.10 up to 6.12.*, from 6.13 up to *
CVE List
linux linux_kernelfrom 6.6 before 6.6.74, from 6.7 before 6.12.10, 6.13NVD

Classification

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: ovl: support encoding fid from inode with no alias Dmitry Safonov reported that a WARN_ON() assertion can be trigered by userspace when calling inotify_show_fdinfo() for an overlayfs watched inode, whose dentry aliases were discarded with drop_caches. The WARN_ON() assertion in inotify_show_fdinfo() was removed, because it is possible for encoding file handle to fail for other reason, but the impact of failing to encode an overlayfs file handle goes beyond this assertion. As shown in the LTP test case mentioned in the link below, failure to encode an overlayfs file handle from a non-aliased inode also leads to failure to report an fid with FAN_DELETE_SELF fanotify events. As Dmitry notes in his analyzis of the problem, ovl_encode_fh() fails if it cannot find an alias for the inode, but this failure can be fixed. ovl_encode_fh() seldom uses the alias and in the case of non-decodable file handles, as is often the case with fanotify fid info, ovl_encode_fh() never needs to use the alias to encode a file handle. Defer finding an alias until it is actually needed so ovl_encode_fh() will not fail in the common case of FAN_DELETE_SELF fanotify events.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ovl: soporte para codificar fid desde un inodo sin alias Dmitry Safonov informó que una aserción WARN_ON() puede ser activada por el espacio de usuario al llamar a inotify_show_fdinfo() para un inodo vigilado por overlayfs, cuyos alias dentry se descartaron con drop_caches. La aserción WARN_ON() en inotify_show_fdinfo() se eliminó, porque es posible que la codificación del identificador de archivo falle por otra razón, pero el impacto de no codificar un identificador de archivo overlayfs va más allá de esta aserción. Como se muestra en el caso de prueba LTP mencionado en el enlace a continuación, no codificar un identificador de archivo overlayfs desde un inodo sin alias también conduce a no informar un fid con eventos fanotify FAN_DELETE_SELF. Como Dmitry señala en su análisis del problema, ovl_encode_fh() falla si no puede encontrar un alias para el inodo, pero este error se puede solucionar. ovl_encode_fh() rara vez usa el alias y en el caso de identificadores de archivos no decodificables, como suele ser el caso con la información de fid de fanotify, ovl_encode_fh() nunca necesita usar el alias para codificar un identificador de archivo. Aplaza la búsqueda de un alias hasta que realmente sea necesario para que ovl_encode_fh() no falle en el caso común de eventos de fanotify FAN_DELETE_SELF.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-21654 changed 2026-05-11CVE Terms of Use
NVDCVE-2025-21654 changed 2026-06-17Public domain