← Back to CVE Explorer

CVE-2025-39792

Full vulnerability record from the local CVENow database.

Description

In the Linux kernel, the following vulnerability has been resolved: dm: Always split write BIOs to zoned device limits Any zoned DM target that requires zone append emulation will use the block layer zone write plugging. In such case, DM target drivers must not split BIOs using dm_accept_partial_bio() as doing so can potentially lead to deadlocks with queue freeze operations. Regular write operations used to emulate zone append operations also cannot be split by the target driver as that would result in an invalid writen sector value return using the BIO sector. In order for zoned DM target drivers to avoid such incorrect BIO splitting, we must ensure that large BIOs are split before being passed to the map() function of the target, thus guaranteeing that the limits for the mapped device are not exceeded. dm-crypt and dm-flakey are the only target drivers supporting zoned devices and using dm_accept_partial_bio(). In the case of dm-crypt, this function is used to split BIOs to the internal max_write_size limit (which will be suppressed in a different patch). However, since crypt_alloc_buffer() uses a bioset allowing only up to BIO_MAX_VECS (256) vectors in a BIO. The dm-crypt device max_segments limit, which is not set and so default to BLK_MAX_SEGMENTS (128), must thus be respected and write BIOs split accordingly. In the case of dm-flakey, since zone append emulation is not required, the block layer zone write plugging is not used and no splitting of BIOs required. Modify the function dm_zone_bio_needs_split() to use the block layer helper function bio_needs_zone_write_plugging() to force a call to bio_split_to_limits() in dm_split_and_process_bio(). This allows DM target drivers to avoid using dm_accept_partial_bio() for write operations on zoned DM devices.

Severity
MEDIUM
CVSS score
5.5 (v3.1)
Vulnerability status
Modified
Source identifier
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published
2025-09-12 16:15:33.450000
Last modified
2026-10-19 21:10:00.160000
View original CVE JSON
{
  "id": "CVE-2025-39792",
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "published": "2025-09-12T16:15:33.450",
  "lastModified": "2026-10-19T21:10:00.160",
  "vulnStatus": "Modified",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndm: Always split write BIOs to zoned device limits\n\nAny zoned DM target that requires zone append emulation will use the\nblock layer zone write plugging. In such case, DM target drivers must\nnot split BIOs using dm_accept_partial_bio() as doing so can potentially\nlead to deadlocks with queue freeze operations. Regular write operations\nused to emulate zone append operations also cannot be split by the\ntarget driver as that would result in an invalid writen sector value\nreturn using the BIO sector.\n\nIn order for zoned DM target drivers to avoid such incorrect BIO\nsplitting, we must ensure that large BIOs are split before being passed\nto the map() function of the target, thus guaranteeing that the\nlimits for the mapped device are not exceeded.\n\ndm-crypt and dm-flakey are the only target drivers supporting zoned\ndevices and using dm_accept_partial_bio().\n\nIn the case of dm-crypt, this function is used to split BIOs to the\ninternal max_write_size limit (which will be suppressed in a different\npatch). However, since crypt_alloc_buffer() uses a bioset allowing only\nup to BIO_MAX_VECS (256) vectors in a BIO. The dm-crypt device\nmax_segments limit, which is not set and so default to BLK_MAX_SEGMENTS\n(128), must thus be respected and write BIOs split accordingly.\n\nIn the case of dm-flakey, since zone append emulation is not required,\nthe block layer zone write plugging is not used and no splitting of BIOs\nrequired.\n\nModify the function dm_zone_bio_needs_split() to use the block layer\nhelper function bio_needs_zone_write_plugging() to force a call to\nbio_split_to_limits() in dm_split_and_process_bio(). This allows DM\ntarget drivers to avoid using dm_accept_partial_bio() for write\noperations on zoned DM devices."
    },
    {
      "lang": "es",
      "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ndm: Siempre dividir los BIO de escritura a los límites del dispositivo por zonas\n\nCualquier objetivo DM por zonas que requiera emulación de adición de zona utilizará el 'plugging' de escritura de zona de la capa de bloques. En tal caso, los controladores de destino DM no deben dividir los BIO utilizando dm_accept_partial_bio() ya que hacerlo puede potencialmente conducir a interbloqueos con operaciones de congelación de cola. Las operaciones de escritura regulares utilizadas para emular operaciones de adición de zona tampoco pueden ser divididas por el controlador de destino, ya que eso resultaría en un valor de sector escrito inválido devuelto utilizando el sector del BIO.\n\nPara que los controladores de destino DM por zonas eviten dicha división incorrecta de BIO, debemos asegurarnos de que los BIO grandes se dividan antes de ser pasados a la función map() del destino, garantizando así que no se excedan los límites para el dispositivo mapeado.\n\ndm-crypt y dm-flakey son los únicos controladores de destino que soportan dispositivos por zonas y utilizan dm_accept_partial_bio().\n\nEn el caso de dm-crypt, esta función se utiliza para dividir los BIO al límite interno de max_write_size (que será suprimido en un parche diferente). Sin embargo, dado que crypt_alloc_buffer() utiliza un bioset que permite solo hasta BIO_MAX_VECS (256) vectores en un BIO. El límite max_segments del dispositivo dm-crypt, que no está establecido y por lo tanto por defecto es BLK_MAX_SEGMENTS (128), debe ser respetado y los BIO de escritura divididos en consecuencia.\n\nEn el caso de dm-flakey, dado que la emulación de adición de zona no es requerida, el 'plugging' de escritura de zona de la capa de bloques no se utiliza y no se requiere división de BIO.\n\nModificar la función dm_zone_bio_needs_split() para utilizar la función auxiliar de la capa de bloques bio_needs_zone_write_plugging() para forzar una llamada a bio_split_to_limits() en dm_split_and_process_bio(). Esto permite a los controladores de destino DM evitar el uso de dm_accept_partial_bio() para operaciones de escritura en dispositivos DM por zonas."
    }
  ],
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "programFiles": [
            "drivers/md/dm.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "f211268ed1f9bdf48f06a3ead5f5d88437450579",
              "lessThan": "d10bf66d9f9335ffc7521b3029b114f50604cabe",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "f211268ed1f9bdf48f06a3ead5f5d88437450579",
              "lessThan": "f5dd256333c08ab44b5aec4a8118cb04c0f20c54",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "f211268ed1f9bdf48f06a3ead5f5d88437450579",
              "lessThan": "4e9fef1cf0243d665d75c371cc80be6156cd30a2",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "f211268ed1f9bdf48f06a3ead5f5d88437450579",
              "lessThan": "2df7168717b7d2d32bcf017c68be16e4aae9dd13",
              "versionType": "git",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "programFiles": [
            "drivers/md/dm.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "6.10",
              "status": "affected"
            },
            {
              "version": "0",
              "lessThan": "6.10",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.12.43",
              "lessThanOrEqual": "6.12.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.15.11",
              "lessThanOrEqual": "6.15.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.16.2",
              "lessThanOrEqual": "6.16.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.17",
              "lessThanOrEqual": "*",
              "versionType": "original_commit_for_fix",
              "status": "unaffected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
          "baseScore": 7.8,
          "baseSeverity": "HIGH",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 5.9
      },
      {
        "source": "[email protected]",
        "type": "Primary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
          "baseScore": 5.5,
          "baseSeverity": "MEDIUM",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "NONE",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 3.6
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-10-15T21:54:15.486417Z",
          "id": "CVE-2025-39792",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "total"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Primary",
      "description": [
        {
          "lang": "en",
          "value": "NVD-CWE-noinfo"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.10",
              "versionEndExcluding": "6.12.43",
              "matchCriteriaId": "20A13D0A-C742-4953-990D-215CEE61908E"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.13",
              "versionEndExcluding": "6.15.11",
              "matchCriteriaId": "BC242347-F722-43AE-B910-BE0B22386977"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.16",
              "versionEndExcluding": "6.16.2",
              "matchCriteriaId": "BD7C087D-2415-4521-B624-30003352F899"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/2df7168717b7d2d32bcf017c68be16e4aae9dd13",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/4e9fef1cf0243d665d75c371cc80be6156cd30a2",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/d10bf66d9f9335ffc7521b3029b114f50604cabe",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/f5dd256333c08ab44b5aec4a8118cb04c0f20c54",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    }
  ]
}