cve-2025-21654
Vulnerability from cvelistv5
Published
2025-01-19 10:18
Modified
2025-01-24 16:01
Severity ?
Summary
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.
Impacted products
Vendor Product Version
Linux Linux Version: 16aac5ad1fa94894b798dd522c5c3a6a0628d7f0
Version: 16aac5ad1fa94894b798dd522c5c3a6a0628d7f0
Version: 16aac5ad1fa94894b798dd522c5c3a6a0628d7f0
Create a notification for this product.
   Linux Linux Version: 6.6
Create a notification for this product.
Show details on NVD website


{
   containers: {
      cna: {
         affected: [
            {
               defaultStatus: "unaffected",
               product: "Linux",
               programFiles: [
                  "fs/overlayfs/export.c",
               ],
               repo: "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               vendor: "Linux",
               versions: [
                  {
                     lessThan: "f0c0ac84de17c37e6e84da65fb920f91dada55ad",
                     status: "affected",
                     version: "16aac5ad1fa94894b798dd522c5c3a6a0628d7f0",
                     versionType: "git",
                  },
                  {
                     lessThan: "3c7c90274ae339e1ad443c9be1c67a20b80b9c76",
                     status: "affected",
                     version: "16aac5ad1fa94894b798dd522c5c3a6a0628d7f0",
                     versionType: "git",
                  },
                  {
                     lessThan: "c45beebfde34aa71afbc48b2c54cdda623515037",
                     status: "affected",
                     version: "16aac5ad1fa94894b798dd522c5c3a6a0628d7f0",
                     versionType: "git",
                  },
               ],
            },
            {
               defaultStatus: "affected",
               product: "Linux",
               programFiles: [
                  "fs/overlayfs/export.c",
               ],
               repo: "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               vendor: "Linux",
               versions: [
                  {
                     status: "affected",
                     version: "6.6",
                  },
                  {
                     lessThan: "6.6",
                     status: "unaffected",
                     version: "0",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "6.6.*",
                     status: "unaffected",
                     version: "6.6.74",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "6.12.*",
                     status: "unaffected",
                     version: "6.12.10",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "*",
                     status: "unaffected",
                     version: "6.13",
                     versionType: "original_commit_for_fix",
                  },
               ],
            },
         ],
         descriptions: [
            {
               lang: "en",
               value: "In the Linux kernel, the following vulnerability has been resolved:\n\novl: support encoding fid from inode with no alias\n\nDmitry Safonov reported that a WARN_ON() assertion can be trigered by\nuserspace when calling inotify_show_fdinfo() for an overlayfs watched\ninode, whose dentry aliases were discarded with drop_caches.\n\nThe WARN_ON() assertion in inotify_show_fdinfo() was removed, because\nit is possible for encoding file handle to fail for other reason, but\nthe impact of failing to encode an overlayfs file handle goes beyond\nthis assertion.\n\nAs shown in the LTP test case mentioned in the link below, failure to\nencode an overlayfs file handle from a non-aliased inode also leads to\nfailure to report an fid with FAN_DELETE_SELF fanotify events.\n\nAs Dmitry notes in his analyzis of the problem, ovl_encode_fh() fails\nif it cannot find an alias for the inode, but this failure can be fixed.\novl_encode_fh() seldom uses the alias and in the case of non-decodable\nfile handles, as is often the case with fanotify fid info,\novl_encode_fh() never needs to use the alias to encode a file handle.\n\nDefer finding an alias until it is actually needed so ovl_encode_fh()\nwill not fail in the common case of FAN_DELETE_SELF fanotify events.",
            },
         ],
         providerMetadata: {
            dateUpdated: "2025-01-24T16:01:36.797Z",
            orgId: "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            shortName: "Linux",
         },
         references: [
            {
               url: "https://git.kernel.org/stable/c/f0c0ac84de17c37e6e84da65fb920f91dada55ad",
            },
            {
               url: "https://git.kernel.org/stable/c/3c7c90274ae339e1ad443c9be1c67a20b80b9c76",
            },
            {
               url: "https://git.kernel.org/stable/c/c45beebfde34aa71afbc48b2c54cdda623515037",
            },
         ],
         title: "ovl: support encoding fid from inode with no alias",
         x_generator: {
            engine: "bippy-5f407fcff5a0",
         },
      },
   },
   cveMetadata: {
      assignerOrgId: "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      assignerShortName: "Linux",
      cveId: "CVE-2025-21654",
      datePublished: "2025-01-19T10:18:11.104Z",
      dateReserved: "2024-12-29T08:45:45.729Z",
      dateUpdated: "2025-01-24T16:01:36.797Z",
      state: "PUBLISHED",
   },
   dataType: "CVE_RECORD",
   dataVersion: "5.1",
   "vulnerability-lookup:meta": {
      nvd: "{\"cve\":{\"id\":\"CVE-2025-21654\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-01-19T11:15:11.040\",\"lastModified\":\"2025-01-24T16:15:38.177\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\novl: support encoding fid from inode with no alias\\n\\nDmitry Safonov reported that a WARN_ON() assertion can be trigered by\\nuserspace when calling inotify_show_fdinfo() for an overlayfs watched\\ninode, whose dentry aliases were discarded with drop_caches.\\n\\nThe WARN_ON() assertion in inotify_show_fdinfo() was removed, because\\nit is possible for encoding file handle to fail for other reason, but\\nthe impact of failing to encode an overlayfs file handle goes beyond\\nthis assertion.\\n\\nAs shown in the LTP test case mentioned in the link below, failure to\\nencode an overlayfs file handle from a non-aliased inode also leads to\\nfailure to report an fid with FAN_DELETE_SELF fanotify events.\\n\\nAs Dmitry notes in his analyzis of the problem, ovl_encode_fh() fails\\nif it cannot find an alias for the inode, but this failure can be fixed.\\novl_encode_fh() seldom uses the alias and in the case of non-decodable\\nfile handles, as is often the case with fanotify fid info,\\novl_encode_fh() never needs to use the alias to encode a file handle.\\n\\nDefer finding an alias until it is actually needed so ovl_encode_fh()\\nwill not fail in the common case of FAN_DELETE_SELF fanotify events.\"},{\"lang\":\"es\",\"value\":\"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.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/3c7c90274ae339e1ad443c9be1c67a20b80b9c76\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c45beebfde34aa71afbc48b2c54cdda623515037\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/f0c0ac84de17c37e6e84da65fb920f91dada55ad\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
   },
}


Log in or create an account to share your comment.

Security Advisory comment format.

This schema specifies the format of a comment related to a security advisory.

UUIDv4 of the comment
UUIDv4 of the Vulnerability-Lookup instance
When the comment was created originally
When the comment was last updated
Title of the comment
Description of the comment
The identifier of the vulnerability (CVE ID, GHSA-ID, PYSEC ID, etc.).



Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.