CVE-2025-38141 (GCVE-0-2025-38141)
Vulnerability from cvelistv5
Published
2025-07-03 08:35
Modified
2025-07-28 04:13
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: dm: fix dm_blk_report_zones If dm_get_live_table() returned NULL, dm_put_live_table() was never called. Also, it is possible that md->zone_revalidate_map will change while calling this function. Only read it once, so that we are always using the same value. Otherwise we might miss a call to dm_put_live_table(). Finally, while md->zone_revalidate_map is set and a process is calling blk_revalidate_disk_zones() to set up the zone append emulation resources, it is possible that another process, perhaps triggered by blkdev_report_zones_ioctl(), will call dm_blk_report_zones(). If blk_revalidate_disk_zones() fails, these resources can be freed while the other process is still using them, causing a use-after-free error. blk_revalidate_disk_zones() will only ever be called when initially setting up the zone append emulation resources, such as when setting up a zoned dm-crypt table for the first time. Further table swaps will not set md->zone_revalidate_map or call blk_revalidate_disk_zones(). However it must be called using the new table (referenced by md->zone_revalidate_map) and the new queue limits while the DM device is suspended. dm_blk_report_zones() needs some way to distinguish between a call from blk_revalidate_disk_zones(), which must be allowed to use md->zone_revalidate_map to access this not yet activated table, and all other calls to dm_blk_report_zones(), which should not be allowed while the device is suspended and cannot use md->zone_revalidate_map, since the zone resources might be freed by the process currently calling blk_revalidate_disk_zones(). Solve this by tracking the process that sets md->zone_revalidate_map in dm_revalidate_zones() and only allowing that process to make use of it in dm_blk_report_zones().
Impacted products
Vendor Product Version
Linux Linux Version: f211268ed1f9bdf48f06a3ead5f5d88437450579
Version: f211268ed1f9bdf48f06a3ead5f5d88437450579
Version: f211268ed1f9bdf48f06a3ead5f5d88437450579
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/md/dm-core.h",
            "drivers/md/dm-zone.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "f9c1bdf24615303d48a2d0fd629c88f3189563aa",
              "status": "affected",
              "version": "f211268ed1f9bdf48f06a3ead5f5d88437450579",
              "versionType": "git"
            },
            {
              "lessThan": "d19bc1b4dd5f322980b1f05f79b2ea4f0db10920",
              "status": "affected",
              "version": "f211268ed1f9bdf48f06a3ead5f5d88437450579",
              "versionType": "git"
            },
            {
              "lessThan": "37f53a2c60d03743e0eacf7a0c01c279776fef4e",
              "status": "affected",
              "version": "f211268ed1f9bdf48f06a3ead5f5d88437450579",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/md/dm-core.h",
            "drivers/md/dm-zone.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.10"
            },
            {
              "lessThan": "6.10",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.34",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.15.*",
              "status": "unaffected",
              "version": "6.15.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.16",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.34",
                  "versionStartIncluding": "6.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15.3",
                  "versionStartIncluding": "6.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16",
                  "versionStartIncluding": "6.10",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndm: fix dm_blk_report_zones\n\nIf dm_get_live_table() returned NULL, dm_put_live_table() was never\ncalled. Also, it is possible that md-\u003ezone_revalidate_map will change\nwhile calling this function. Only read it once, so that we are always\nusing the same value. Otherwise we might miss a call to\ndm_put_live_table().\n\nFinally, while md-\u003ezone_revalidate_map is set and a process is calling\nblk_revalidate_disk_zones() to set up the zone append emulation\nresources, it is possible that another process, perhaps triggered by\nblkdev_report_zones_ioctl(), will call dm_blk_report_zones(). If\nblk_revalidate_disk_zones() fails, these resources can be freed while\nthe other process is still using them, causing a use-after-free error.\n\nblk_revalidate_disk_zones() will only ever be called when initially\nsetting up the zone append emulation resources, such as when setting up\na zoned dm-crypt table for the first time. Further table swaps will not\nset md-\u003ezone_revalidate_map or call blk_revalidate_disk_zones().\nHowever it must be called using the new table (referenced by\nmd-\u003ezone_revalidate_map) and the new queue limits while the DM device is\nsuspended. dm_blk_report_zones() needs some way to distinguish between a\ncall from blk_revalidate_disk_zones(), which must be allowed to use\nmd-\u003ezone_revalidate_map to access this not yet activated table, and all\nother calls to dm_blk_report_zones(), which should not be allowed while\nthe device is suspended and cannot use md-\u003ezone_revalidate_map, since\nthe zone resources might be freed by the process currently calling\nblk_revalidate_disk_zones().\n\nSolve this by tracking the process that sets md-\u003ezone_revalidate_map in\ndm_revalidate_zones() and only allowing that process to make use of it\nin dm_blk_report_zones()."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-07-28T04:13:20.687Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/f9c1bdf24615303d48a2d0fd629c88f3189563aa"
        },
        {
          "url": "https://git.kernel.org/stable/c/d19bc1b4dd5f322980b1f05f79b2ea4f0db10920"
        },
        {
          "url": "https://git.kernel.org/stable/c/37f53a2c60d03743e0eacf7a0c01c279776fef4e"
        }
      ],
      "title": "dm: fix dm_blk_report_zones",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-38141",
    "datePublished": "2025-07-03T08:35:42.787Z",
    "dateReserved": "2025-04-16T04:51:23.987Z",
    "dateUpdated": "2025-07-28T04:13:20.687Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-38141\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-07-03T09:15:28.740\",\"lastModified\":\"2025-07-03T15:13:53.147\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ndm: fix dm_blk_report_zones\\n\\nIf dm_get_live_table() returned NULL, dm_put_live_table() was never\\ncalled. Also, it is possible that md-\u003ezone_revalidate_map will change\\nwhile calling this function. Only read it once, so that we are always\\nusing the same value. Otherwise we might miss a call to\\ndm_put_live_table().\\n\\nFinally, while md-\u003ezone_revalidate_map is set and a process is calling\\nblk_revalidate_disk_zones() to set up the zone append emulation\\nresources, it is possible that another process, perhaps triggered by\\nblkdev_report_zones_ioctl(), will call dm_blk_report_zones(). If\\nblk_revalidate_disk_zones() fails, these resources can be freed while\\nthe other process is still using them, causing a use-after-free error.\\n\\nblk_revalidate_disk_zones() will only ever be called when initially\\nsetting up the zone append emulation resources, such as when setting up\\na zoned dm-crypt table for the first time. Further table swaps will not\\nset md-\u003ezone_revalidate_map or call blk_revalidate_disk_zones().\\nHowever it must be called using the new table (referenced by\\nmd-\u003ezone_revalidate_map) and the new queue limits while the DM device is\\nsuspended. dm_blk_report_zones() needs some way to distinguish between a\\ncall from blk_revalidate_disk_zones(), which must be allowed to use\\nmd-\u003ezone_revalidate_map to access this not yet activated table, and all\\nother calls to dm_blk_report_zones(), which should not be allowed while\\nthe device is suspended and cannot use md-\u003ezone_revalidate_map, since\\nthe zone resources might be freed by the process currently calling\\nblk_revalidate_disk_zones().\\n\\nSolve this by tracking the process that sets md-\u003ezone_revalidate_map in\\ndm_revalidate_zones() and only allowing that process to make use of it\\nin dm_blk_report_zones().\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: dm: fix dm_blk_report_zones Si dm_get_live_table() devolv\u00eda NULL, dm_put_live_table() nunca se llamaba. Adem\u00e1s, es posible que md-\u0026gt;zone_revalidate_map cambie al llamar a esta funci\u00f3n. Solo l\u00e9alo una vez, para que siempre usemos el mismo valor. De lo contrario, podr\u00edamos perder una llamada a dm_put_live_table(). Finalmente, mientras md-\u0026gt;zone_revalidate_map est\u00e1 configurado y un proceso est\u00e1 llamando a blk_revalidate_disk_zones() para configurar los recursos de emulaci\u00f3n de anexi\u00f3n de zona, es posible que otro proceso, quiz\u00e1s activado por blkdev_report_zones_ioctl(), llame a dm_blk_report_zones(). Si blk_revalidate_disk_zones() falla, estos recursos pueden liberarse mientras el otro proceso a\u00fan los est\u00e1 usando, causando un error de uso despu\u00e9s de liberaci\u00f3n. blk_revalidate_disk_zones() solo se llamar\u00e1 al configurar inicialmente los recursos de emulaci\u00f3n de anexi\u00f3n de zona, como al configurar una tabla dm-crypt zonificada por primera vez. Los intercambios de tabla posteriores no establecer\u00e1n md-\u0026gt;zone_revalidate_map ni llamar\u00e1n a blk_revalidate_disk_zones(). Sin embargo, debe llamarse utilizando la nueva tabla (referenciada por md-\u0026gt;zone_revalidate_map) y los nuevos l\u00edmites de cola mientras el dispositivo DM est\u00e9 suspendido. dm_blk_report_zones() necesita distinguir entre una llamada a blk_revalidate_disk_zones(), que debe permitir el uso de md-\u0026gt;zone_revalidate_map para acceder a esta tabla a\u00fan no activada, y todas las dem\u00e1s llamadas a dm_blk_report_zones(), que no deben permitirse mientras el dispositivo est\u00e9 suspendido y no puedan usar md-\u0026gt;zone_revalidate_map, ya que los recursos de la zona podr\u00edan ser liberados por el proceso que llama a blk_revalidate_disk_zones(). Para solucionar esto, se debe rastrear el proceso que establece md-\u0026gt;zone_revalidate_map en dm_revalidate_zones() y permitir que solo ese proceso lo use en dm_blk_report_zones().\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/37f53a2c60d03743e0eacf7a0c01c279776fef4e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d19bc1b4dd5f322980b1f05f79b2ea4f0db10920\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/f9c1bdf24615303d48a2d0fd629c88f3189563aa\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




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.


Loading…

Loading…