{
  "id": "CVE-2025-38141",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-38141",
  "published_at": "2025-07-03T08:35:42.787Z",
  "title": "dm: fix dm_blk_report_zones",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "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().",
  "cwe": "CWE-416",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8,
    "nvd": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= f211268ed1f9bdf48f06a3ead5f5d88437450579, \u003c f9c1bdf24615303d48a2d0fd629c88f3189563aa",
          "\u003e= f211268ed1f9bdf48f06a3ead5f5d88437450579, \u003c d19bc1b4dd5f322980b1f05f79b2ea4f0db10920",
          "\u003e= f211268ed1f9bdf48f06a3ead5f5d88437450579, \u003c 37f53a2c60d03743e0eacf7a0c01c279776fef4e"
        ],
        "fixed_in": [
          "f9c1bdf24615303d48a2d0fd629c88f3189563aa",
          "d19bc1b4dd5f322980b1f05f79b2ea4f0db10920",
          "37f53a2c60d03743e0eacf7a0c01c279776fef4e"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.10"
        ],
        "fixed_in": [
          "0",
          "6.12.34",
          "6.15.3",
          "6.16"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to f9c1bdf24615303d48a2d0fd629c88f3189563aa or d19bc1b4dd5f322980b1f05f79b2ea4f0db10920 or 37f53a2c60d03743e0eacf7a0c01c279776fef4e or later.",
      "Upgrade Linux to 0 or 6.12.34 or 6.15.3 or 6.16 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
