CVE-2025-21654

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.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc6:*:*:*:*:*:*

History

26 Sep 2025, 19:48

Type Values Removed Values Added
First Time Linux linux Kernel
Linux
CWE CWE-617
CPE cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
References () https://git.kernel.org/stable/c/3c7c90274ae339e1ad443c9be1c67a20b80b9c76 - () https://git.kernel.org/stable/c/3c7c90274ae339e1ad443c9be1c67a20b80b9c76 - Patch
References () https://git.kernel.org/stable/c/c45beebfde34aa71afbc48b2c54cdda623515037 - () https://git.kernel.org/stable/c/c45beebfde34aa71afbc48b2c54cdda623515037 - Patch
References () https://git.kernel.org/stable/c/f0c0ac84de17c37e6e84da65fb920f91dada55ad - () https://git.kernel.org/stable/c/f0c0ac84de17c37e6e84da65fb920f91dada55ad - Patch

24 Jan 2025, 16:15

Type Values Removed Values Added
References
  • {'url': 'https://git.kernel.org/stable/c/950b604384fd75d62e860bec7135b2b62eb4d508', 'source': '416baaa9-dc9f-4396-8d5f-8c081fb06d67'}
  • {'url': 'https://git.kernel.org/stable/c/a1a541fbfa7e97c1100144db34b57553d7164ce5', 'source': '416baaa9-dc9f-4396-8d5f-8c081fb06d67'}

23 Jan 2025, 17:15

Type Values Removed Values Added
References
  • () https://git.kernel.org/stable/c/f0c0ac84de17c37e6e84da65fb920f91dada55ad -

21 Jan 2025, 11:15

Type Values Removed Values Added
References
  • () https://git.kernel.org/stable/c/950b604384fd75d62e860bec7135b2b62eb4d508 -
Summary
  • (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.

19 Jan 2025, 11:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-01-19 11:15

Updated : 2025-09-26 19:48


NVD link : CVE-2025-21654

Mitre link : CVE-2025-21654

CVE.ORG link : CVE-2025-21654


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-617

Reachable Assertion