CVE-2025-39791 (GCVE-0-2025-39791)

Vulnerability from cvelistv5 – Published: 2025-09-11 16:56 – Updated: 2026-10-15 22:02
VLAI
Title
dm: dm-crypt: Do not partially accept write BIOs with zoned targets
Summary
In the Linux kernel, the following vulnerability has been resolved: dm: dm-crypt: Do not partially accept write BIOs with zoned targets Read and write operations issued to a dm-crypt target may be split according to the dm-crypt internal limits defined by the max_read_size and max_write_size module parameters (default is 128 KB). The intent is to improve processing time of large BIOs by splitting them into smaller operations that can be parallelized on different CPUs. For zoned dm-crypt targets, this BIO splitting is still done but without the parallel execution to ensure that the issuing order of write operations to the underlying devices remains sequential. However, the splitting itself causes other problems: 1) Since dm-crypt relies on the block layer zone write plugging to handle zone append emulation using regular write operations, the reminder of a split write BIO will always be plugged into the target zone write plugged. Once the on-going write BIO finishes, this reminder BIO is unplugged and issued from the zone write plug work. If this reminder BIO itself needs to be split, the reminder will be re-issued and plugged again, but that causes a call to a blk_queue_enter(), which may block if a queue freeze operation was initiated. This results in a deadlock as DM submission still holds BIOs that the queue freeze side is waiting for. 2) dm-crypt relies on the emulation done by the block layer using regular write operations for processing zone append operations. This still requires to properly return the written sector as the BIO sector of the original BIO. However, this can be done correctly only and only if there is a single clone BIO used for processing the original zone append operation issued by the user. If the size of a zone append operation is larger than dm-crypt max_write_size, then the orginal BIO will be split and processed as a chain of regular write operations. Such chaining result in an incorrect written sector being returned to the zone append issuer using the original BIO sector. This in turn results in file system data corruptions using xfs or btrfs. Fix this by modifying get_max_request_size() to always return the size of the BIO to avoid it being split with dm_accpet_partial_bio() in crypt_map(). get_max_request_size() is renamed to get_max_request_sectors() to clarify the unit of the value returned and its interface is changed to take a struct dm_target pointer and a pointer to the struct bio being processed. In addition to this change, to ensure that crypt_alloc_buffer() works correctly, set the dm-crypt device max_hw_sectors limit to be at most BIO_MAX_VECS << PAGE_SECTORS_SHIFT (1 MB with a 4KB page architecture). This forces DM core to split write BIOs before passing them to crypt_map(), and thus guaranteeing that dm-crypt can always accept an entire write BIO without needing to split it. This change does not have any effect on the read path of dm-crypt. Read operations can still be split and the BIO fragments processed in parallel. There is also no impact on the performance of the write path given that all zone write BIOs were already processed inline instead of in parallel. This change also does not affect in any way regular dm-crypt block devices.
SSVC
Exploitation: none Automatable: no Technical Impact: total
CISA Coordinator · CISA-ADP (v2.0.3)
Decision recorded 2026-10-15 21:54 UTC
Assigner
Linux CNA under the mitre root
CNA scorecard D 53/100 over 6843 records in the last 180 days details
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: f211268ed1f9bdf48f06a3ead5f5d88437450579 , < 8864616719b6bbf92356bc89ff544b0cd484c656 (git)
Affected: f211268ed1f9bdf48f06a3ead5f5d88437450579 , < 52a2c4c60470352acf9cde7a2dfa661c1e67e796 (git)
Affected: f211268ed1f9bdf48f06a3ead5f5d88437450579 , < e549663849e5bb3b985dc2d293069f0d9747ae72 (git)
guessed Create a notification for this product.
Linux Linux Affected: 6.10
Unaffected: 0 , < 6.10 (semver)
Unaffected: 6.12.44 , ≤ 6.12.* (semver)
Unaffected: 6.16.4 , ≤ 6.16.* (semver)
Unaffected: 6.17 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2025-39791",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-10-15T21:54:11.714412Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-10-15T22:02:31.935Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/md/dm-crypt.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "8864616719b6bbf92356bc89ff544b0cd484c656",
              "status": "affected",
              "version": "f211268ed1f9bdf48f06a3ead5f5d88437450579",
              "versionType": "git"
            },
            {
              "lessThan": "52a2c4c60470352acf9cde7a2dfa661c1e67e796",
              "status": "affected",
              "version": "f211268ed1f9bdf48f06a3ead5f5d88437450579",
              "versionType": "git"
            },
            {
              "lessThan": "e549663849e5bb3b985dc2d293069f0d9747ae72",
              "status": "affected",
              "version": "f211268ed1f9bdf48f06a3ead5f5d88437450579",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/md/dm-crypt.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.44",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.16.*",
              "status": "unaffected",
              "version": "6.16.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.17",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.44",
                  "versionStartIncluding": "6.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16.4",
                  "versionStartIncluding": "6.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17",
                  "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: dm-crypt: Do not partially accept write BIOs with zoned targets\n\nRead and write operations issued to a dm-crypt target may be split\naccording to the dm-crypt internal limits defined by the max_read_size\nand max_write_size module parameters (default is 128 KB). The intent is\nto improve processing time of large BIOs by splitting them into smaller\noperations that can be parallelized on different CPUs.\n\nFor zoned dm-crypt targets, this BIO splitting is still done but without\nthe parallel execution to ensure that the issuing order of write\noperations to the underlying devices remains sequential. However, the\nsplitting itself causes other problems:\n\n1) Since dm-crypt relies on the block layer zone write plugging to\n   handle zone append emulation using regular write operations, the\n   reminder of a split write BIO will always be plugged into the target\n   zone write plugged. Once the on-going write BIO finishes, this\n   reminder BIO is unplugged and issued from the zone write plug work.\n   If this reminder BIO itself needs to be split, the reminder will be\n   re-issued and plugged again, but that causes a call to a\n   blk_queue_enter(), which may block if a queue freeze operation was\n   initiated. This results in a deadlock as DM submission still holds\n   BIOs that the queue freeze side is waiting for.\n\n2) dm-crypt relies on the emulation done by the block layer using\n   regular write operations for processing zone append operations. This\n   still requires to properly return the written sector as the BIO\n   sector of the original BIO. However, this can be done correctly only\n   and only if there is a single clone BIO used for processing the\n   original zone append operation issued by the user. If the size of a\n   zone append operation is larger than dm-crypt max_write_size, then\n   the orginal BIO will be split and processed as a chain of regular\n   write operations. Such chaining result in an incorrect written sector\n   being returned to the zone append issuer using the original BIO\n   sector.  This in turn results in file system data corruptions using\n   xfs or btrfs.\n\nFix this by modifying get_max_request_size() to always return the size\nof the BIO to avoid it being split with dm_accpet_partial_bio() in\ncrypt_map(). get_max_request_size() is renamed to\nget_max_request_sectors() to clarify the unit of the value returned\nand its interface is changed to take a struct dm_target pointer and a\npointer to the struct bio being processed. In addition to this change,\nto ensure that crypt_alloc_buffer() works correctly, set the dm-crypt\ndevice max_hw_sectors limit to be at most\nBIO_MAX_VECS \u003c\u003c PAGE_SECTORS_SHIFT (1 MB with a 4KB page architecture).\nThis forces DM core to split write BIOs before passing them to\ncrypt_map(), and thus guaranteeing that dm-crypt can always accept an\nentire write BIO without needing to split it.\n\nThis change does not have any effect on the read path of dm-crypt. Read\noperations can still be split and the BIO fragments processed in\nparallel. There is also no impact on the performance of the write path\ngiven that all zone write BIOs were already processed inline instead of\nin parallel.\n\nThis change also does not affect in any way regular dm-crypt block\ndevices."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerable code is in the device-mapper/block layer, reached by issuing writes to a locally mounted filesystem or block device backed by a zoned dm-crypt target. No network protocol handler is involved.\nAC:L - Any write producing a zone append larger than dm-crypt\u0027s 128 KB default max_write_size deterministically causes the wrong written sector to be returned; there is no race to win, no memory layout to groom, and the emulated max_zone_append_sectors is far above 128 KB so ordinary large-file writeback triggers it every time.\nPR:L - An unprivileged local user with write access to a file on an XFS or btrfs filesystem hosted on the zoned dm-crypt device can trigger it by writing a file larger than 128 KB. The CAP_SYS_ADMIN needed to create the dm-crypt target is a property of the deployed configuration, not a barrier the attacker must cross.\nUI:N - Triggering requires only the attacker\u0027s own write I/O; no action by any other user or administrator is needed once the affected storage stack is in use.\nS:U - The impact \u2014 corrupted filesystem extents and hung block I/O \u2014 stays within the kernel and storage stack of the same system, with no crossing into a different security authority such as a hypervisor or IOMMU boundary.\nC:H - XFS commits bmap extent records built from the incorrect returned sector, and because xfs_zoned_pack_tight() packs multiple inodes into a single zone and XFS has no data checksums, subsequent reads silently return the decrypted plaintext of other files \u2014 potentially other users\u0027 data \u2014 from the encrypted device.\nI:H - The wrong written sector is committed into persistent on-disk filesystem metadata, producing silent, unrecoverable data corruption in XFS and btrfs as explicitly stated by the fix; extents point at physical blocks owned by other files, corrupting both attacker and victim data.\nA:H - The split remainder BIO is re-issued from the zone write plug work and calls blk_queue_enter(), deadlocking against a queue freeze that is waiting on BIOs DM still holds, hanging all I/O to the device; the resulting extent and space-accounting corruption also trips filesystem verifiers and forces an XFS/btrfs shutdown."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:05:11.878Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/8864616719b6bbf92356bc89ff544b0cd484c656"
        },
        {
          "url": "https://git.kernel.org/stable/c/52a2c4c60470352acf9cde7a2dfa661c1e67e796"
        },
        {
          "url": "https://git.kernel.org/stable/c/e549663849e5bb3b985dc2d293069f0d9747ae72"
        }
      ],
      "title": "dm: dm-crypt: Do not partially accept write BIOs with zoned targets",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-39791",
    "datePublished": "2025-09-11T16:56:39.397Z",
    "dateReserved": "2025-04-16T07:20:57.131Z",
    "dateUpdated": "2026-10-15T22:02:31.935Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-39791",
      "date": "2026-10-22",
      "epss": "0.00131",
      "percentile": "0.02464"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "drivers/md/dm-crypt.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "8864616719b6bbf92356bc89ff544b0cd484c656",
                    "status": "affected",
                    "version": "f211268ed1f9bdf48f06a3ead5f5d88437450579",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "52a2c4c60470352acf9cde7a2dfa661c1e67e796",
                    "status": "affected",
                    "version": "f211268ed1f9bdf48f06a3ead5f5d88437450579",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "e549663849e5bb3b985dc2d293069f0d9747ae72",
                    "status": "affected",
                    "version": "f211268ed1f9bdf48f06a3ead5f5d88437450579",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "drivers/md/dm-crypt.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.44",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.16.*",
                    "status": "unaffected",
                    "version": "6.16.4",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "6.17",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "configurations": [
          {
            "nodes": [
              {
                "cpeMatch": [
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                    "matchCriteriaId": "489EF11B-3951-48B6-8DCA-E6B0DDAF7910",
                    "versionEndExcluding": "6.12.44",
                    "versionStartIncluding": "6.10",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                    "matchCriteriaId": "AFC28995-B8C3-4B68-8CB6-78E792B6629D",
                    "versionEndExcluding": "6.16.4",
                    "versionStartIncluding": "6.13",
                    "vulnerable": true
                  }
                ],
                "negate": false,
                "operator": "OR"
              }
            ]
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndm: dm-crypt: Do not partially accept write BIOs with zoned targets\n\nRead and write operations issued to a dm-crypt target may be split\naccording to the dm-crypt internal limits defined by the max_read_size\nand max_write_size module parameters (default is 128 KB). The intent is\nto improve processing time of large BIOs by splitting them into smaller\noperations that can be parallelized on different CPUs.\n\nFor zoned dm-crypt targets, this BIO splitting is still done but without\nthe parallel execution to ensure that the issuing order of write\noperations to the underlying devices remains sequential. However, the\nsplitting itself causes other problems:\n\n1) Since dm-crypt relies on the block layer zone write plugging to\n   handle zone append emulation using regular write operations, the\n   reminder of a split write BIO will always be plugged into the target\n   zone write plugged. Once the on-going write BIO finishes, this\n   reminder BIO is unplugged and issued from the zone write plug work.\n   If this reminder BIO itself needs to be split, the reminder will be\n   re-issued and plugged again, but that causes a call to a\n   blk_queue_enter(), which may block if a queue freeze operation was\n   initiated. This results in a deadlock as DM submission still holds\n   BIOs that the queue freeze side is waiting for.\n\n2) dm-crypt relies on the emulation done by the block layer using\n   regular write operations for processing zone append operations. This\n   still requires to properly return the written sector as the BIO\n   sector of the original BIO. However, this can be done correctly only\n   and only if there is a single clone BIO used for processing the\n   original zone append operation issued by the user. If the size of a\n   zone append operation is larger than dm-crypt max_write_size, then\n   the orginal BIO will be split and processed as a chain of regular\n   write operations. Such chaining result in an incorrect written sector\n   being returned to the zone append issuer using the original BIO\n   sector.  This in turn results in file system data corruptions using\n   xfs or btrfs.\n\nFix this by modifying get_max_request_size() to always return the size\nof the BIO to avoid it being split with dm_accpet_partial_bio() in\ncrypt_map(). get_max_request_size() is renamed to\nget_max_request_sectors() to clarify the unit of the value returned\nand its interface is changed to take a struct dm_target pointer and a\npointer to the struct bio being processed. In addition to this change,\nto ensure that crypt_alloc_buffer() works correctly, set the dm-crypt\ndevice max_hw_sectors limit to be at most\nBIO_MAX_VECS \u003c\u003c PAGE_SECTORS_SHIFT (1 MB with a 4KB page architecture).\nThis forces DM core to split write BIOs before passing them to\ncrypt_map(), and thus guaranteeing that dm-crypt can always accept an\nentire write BIO without needing to split it.\n\nThis change does not have any effect on the read path of dm-crypt. Read\noperations can still be split and the BIO fragments processed in\nparallel. There is also no impact on the performance of the write path\ngiven that all zone write BIOs were already processed inline instead of\nin parallel.\n\nThis change also does not affect in any way regular dm-crypt block\ndevices."
          },
          {
            "lang": "es",
            "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ndm: dm-crypt: No aceptar parcialmente BIOs de escritura con destinos zonificados\n\nLas operaciones de lectura y escritura emitidas a un destino dm-crypt pueden dividirse seg\u00fan los l\u00edmites internos de dm-crypt definidos por los par\u00e1metros del m\u00f3dulo max_read_size y max_write_size (el valor predeterminado es 128 KB). La intenci\u00f3n es mejorar el tiempo de procesamiento de BIOs grandes dividi\u00e9ndolos en operaciones m\u00e1s peque\u00f1as que pueden paralelizarse en diferentes CPUs.\n\nPara destinos dm-crypt zonificados, esta divisi\u00f3n de BIOs todav\u00eda se realiza pero sin la ejecuci\u00f3n paralela para asegurar que el orden de emisi\u00f3n de las operaciones de escritura a los dispositivos subyacentes permanezca secuencial. Sin embargo, la divisi\u00f3n en s\u00ed causa otros problemas:\n\n1) Dado que dm-crypt se basa en el \u0027zone write plugging\u0027 de la capa de bloques para manejar la emulaci\u00f3n de \u0027zone append\u0027 utilizando operaciones de escritura regulares, el resto de un BIO de escritura dividido siempre se \u0027enchufar\u00e1\u0027 en el \u0027zone write plugged\u0027 de destino. Una vez que el BIO de escritura en curso finaliza, este BIO restante se \u0027desenchufa\u0027 y se emite desde el trabajo de \u0027zone write plug\u0027. Si este BIO restante necesita ser dividido, el resto ser\u00e1 reemitido y \u0027enchufado\u0027 de nuevo, pero eso provoca una llamada a blk_queue_enter(), que puede bloquearse si se inici\u00f3 una operaci\u00f3n de congelaci\u00f3n de cola. Esto resulta en un interbloqueo ya que la presentaci\u00f3n de DM todav\u00eda retiene BIOs que el lado de congelaci\u00f3n de cola est\u00e1 esperando.\n\n2) dm-crypt se basa en la emulaci\u00f3n realizada por la capa de bloques utilizando operaciones de escritura regulares para procesar operaciones de \u0027zone append\u0027. Esto todav\u00eda requiere devolver correctamente el sector escrito como el sector BIO del BIO original. Sin embargo, esto solo se puede hacer correctamente si hay un \u00fanico BIO clon utilizado para procesar la operaci\u00f3n de \u0027zone append\u0027 original emitida por el usuario. Si el tama\u00f1o de una operaci\u00f3n de \u0027zone append\u0027 es mayor que dm-crypt max_write_size, entonces el BIO original se dividir\u00e1 y procesar\u00e1 como una cadena de operaciones de escritura regulares. Dicha encadenaci\u00f3n resulta en que se devuelve un sector escrito incorrecto al emisor de \u0027zone append\u0027 utilizando el sector BIO original. Esto a su vez resulta en corrupciones de datos del sistema de archivos utilizando xfs o btrfs.\n\nSolucione esto modificando get_max_request_size() para que siempre devuelva el tama\u00f1o del BIO para evitar que se divida con dm_accpet_partial_bio() en crypt_map(). get_max_request_size() se renombra a get_max_request_sectors() para aclarar la unidad del valor devuelto y su interfaz se cambia para que tome un puntero a struct dm_target y un puntero a la struct bio que se est\u00e1 procesando. Adem\u00e1s de este cambio, para asegurar que crypt_alloc_buffer() funcione correctamente, establezca el l\u00edmite max_hw_sectors del dispositivo dm-crypt en un m\u00e1ximo de BIO_MAX_VECS \u003c\u003c PAGE_SECTORS_SHIFT (1 MB con una arquitectura de p\u00e1gina de 4KB). Esto obliga al n\u00facleo de DM a dividir los BIOs de escritura antes de pasarlos a crypt_map(), y as\u00ed garantizando que dm-crypt siempre pueda aceptar un BIO de escritura completo sin necesidad de dividirlo.\n\nEste cambio no tiene ning\u00fan efecto en la ruta de lectura de dm-crypt. Las operaciones de lectura a\u00fan pueden dividirse y los fragmentos de BIO procesarse en paralelo. Tampoco hay impacto en el rendimiento de la ruta de escritura dado que todos los BIOs de escritura de zona ya se procesaban en l\u00ednea en lugar de en paralelo.\n\nEste cambio tampoco afecta de ninguna manera a los dispositivos de bloques dm-crypt regulares."
          }
        ],
        "id": "CVE-2025-39791",
        "lastModified": "2026-10-19T21:10:00.160",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 7.8,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "HIGH",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 5.9,
              "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
              "type": "Secondary"
            },
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 5.5,
                "baseSeverity": "MEDIUM",
                "confidentialityImpact": "NONE",
                "integrityImpact": "NONE",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 3.6,
              "source": "nvd@nist.gov",
              "type": "Primary"
            }
          ],
          "ssvcV203": [
            {
              "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "ssvcData": {
                "id": "CVE-2025-39791",
                "options": [
                  {
                    "exploitation": "none"
                  },
                  {
                    "automatable": "no"
                  },
                  {
                    "technicalImpact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-10-15T21:54:11.714412Z",
                "version": "2.0.3"
              }
            }
          ]
        },
        "published": "2025-09-11T17:15:45.517",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/52a2c4c60470352acf9cde7a2dfa661c1e67e796"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/8864616719b6bbf92356bc89ff544b0cd484c656"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/e549663849e5bb3b985dc2d293069f0d9747ae72"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Modified",
        "weaknesses": [
          {
            "description": [
              {
                "lang": "en",
                "value": "CWE-667"
              }
            ],
            "source": "nvd@nist.gov",
            "type": "Primary"
          }
        ]
      }
    },
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-07-30T08:57:23+00:00",
      "cve": "CVE-2025-39791",
      "id": "CVE-2025-39791",
      "initial_release_date": "2025-09-11T00:00:00+00:00",
      "product_status:known_affected": "198",
      "product_status:known_not_affected": "76",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: dm: dm-crypt: Do not partially accept write BIOs with zoned targets",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-39791.json",
      "version": "3"
    },
    "vulnrichment": {
      "containers": {
        "adp": [
          {
            "metrics": [
              {
                "other": {
                  "content": {
                    "id": "CVE-2025-39791",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "total"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2026-10-15T21:54:11.714412Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2026-10-15T21:54:12.611Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "defaultStatus": "unaffected",
              "product": "Linux",
              "programFiles": [
                "drivers/md/dm-crypt.c"
              ],
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "vendor": "Linux",
              "versions": [
                {
                  "lessThan": "8864616719b6bbf92356bc89ff544b0cd484c656",
                  "status": "affected",
                  "version": "f211268ed1f9bdf48f06a3ead5f5d88437450579",
                  "versionType": "git"
                },
                {
                  "lessThan": "52a2c4c60470352acf9cde7a2dfa661c1e67e796",
                  "status": "affected",
                  "version": "f211268ed1f9bdf48f06a3ead5f5d88437450579",
                  "versionType": "git"
                },
                {
                  "lessThan": "e549663849e5bb3b985dc2d293069f0d9747ae72",
                  "status": "affected",
                  "version": "f211268ed1f9bdf48f06a3ead5f5d88437450579",
                  "versionType": "git"
                }
              ]
            },
            {
              "defaultStatus": "affected",
              "product": "Linux",
              "programFiles": [
                "drivers/md/dm-crypt.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.44",
                  "versionType": "semver"
                },
                {
                  "lessThanOrEqual": "6.16.*",
                  "status": "unaffected",
                  "version": "6.16.4",
                  "versionType": "semver"
                },
                {
                  "lessThanOrEqual": "*",
                  "status": "unaffected",
                  "version": "6.17",
                  "versionType": "original_commit_for_fix"
                }
              ]
            }
          ],
          "cpeApplicability": [
            {
              "nodes": [
                {
                  "cpeMatch": [
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionEndExcluding": "6.12.44",
                      "versionStartIncluding": "6.10",
                      "vulnerable": true
                    },
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionEndExcluding": "6.16.4",
                      "versionStartIncluding": "6.10",
                      "vulnerable": true
                    },
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionEndExcluding": "6.17",
                      "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: dm-crypt: Do not partially accept write BIOs with zoned targets\n\nRead and write operations issued to a dm-crypt target may be split\naccording to the dm-crypt internal limits defined by the max_read_size\nand max_write_size module parameters (default is 128 KB). The intent is\nto improve processing time of large BIOs by splitting them into smaller\noperations that can be parallelized on different CPUs.\n\nFor zoned dm-crypt targets, this BIO splitting is still done but without\nthe parallel execution to ensure that the issuing order of write\noperations to the underlying devices remains sequential. However, the\nsplitting itself causes other problems:\n\n1) Since dm-crypt relies on the block layer zone write plugging to\n   handle zone append emulation using regular write operations, the\n   reminder of a split write BIO will always be plugged into the target\n   zone write plugged. Once the on-going write BIO finishes, this\n   reminder BIO is unplugged and issued from the zone write plug work.\n   If this reminder BIO itself needs to be split, the reminder will be\n   re-issued and plugged again, but that causes a call to a\n   blk_queue_enter(), which may block if a queue freeze operation was\n   initiated. This results in a deadlock as DM submission still holds\n   BIOs that the queue freeze side is waiting for.\n\n2) dm-crypt relies on the emulation done by the block layer using\n   regular write operations for processing zone append operations. This\n   still requires to properly return the written sector as the BIO\n   sector of the original BIO. However, this can be done correctly only\n   and only if there is a single clone BIO used for processing the\n   original zone append operation issued by the user. If the size of a\n   zone append operation is larger than dm-crypt max_write_size, then\n   the orginal BIO will be split and processed as a chain of regular\n   write operations. Such chaining result in an incorrect written sector\n   being returned to the zone append issuer using the original BIO\n   sector.  This in turn results in file system data corruptions using\n   xfs or btrfs.\n\nFix this by modifying get_max_request_size() to always return the size\nof the BIO to avoid it being split with dm_accpet_partial_bio() in\ncrypt_map(). get_max_request_size() is renamed to\nget_max_request_sectors() to clarify the unit of the value returned\nand its interface is changed to take a struct dm_target pointer and a\npointer to the struct bio being processed. In addition to this change,\nto ensure that crypt_alloc_buffer() works correctly, set the dm-crypt\ndevice max_hw_sectors limit to be at most\nBIO_MAX_VECS \u003c\u003c PAGE_SECTORS_SHIFT (1 MB with a 4KB page architecture).\nThis forces DM core to split write BIOs before passing them to\ncrypt_map(), and thus guaranteeing that dm-crypt can always accept an\nentire write BIO without needing to split it.\n\nThis change does not have any effect on the read path of dm-crypt. Read\noperations can still be split and the BIO fragments processed in\nparallel. There is also no impact on the performance of the write path\ngiven that all zone write BIOs were already processed inline instead of\nin parallel.\n\nThis change also does not affect in any way regular dm-crypt block\ndevices."
            }
          ],
          "metrics": [
            {
              "cvssV3_1": {
                "baseScore": 7.8,
                "baseSeverity": "HIGH",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                "version": "3.1"
              },
              "scenarios": [
                {
                  "lang": "en",
                  "value": "AV:L - The vulnerable code is in the device-mapper/block layer, reached by issuing writes to a locally mounted filesystem or block device backed by a zoned dm-crypt target. No network protocol handler is involved.\nAC:L - Any write producing a zone append larger than dm-crypt\u0027s 128 KB default max_write_size deterministically causes the wrong written sector to be returned; there is no race to win, no memory layout to groom, and the emulated max_zone_append_sectors is far above 128 KB so ordinary large-file writeback triggers it every time.\nPR:L - An unprivileged local user with write access to a file on an XFS or btrfs filesystem hosted on the zoned dm-crypt device can trigger it by writing a file larger than 128 KB. The CAP_SYS_ADMIN needed to create the dm-crypt target is a property of the deployed configuration, not a barrier the attacker must cross.\nUI:N - Triggering requires only the attacker\u0027s own write I/O; no action by any other user or administrator is needed once the affected storage stack is in use.\nS:U - The impact \u2014 corrupted filesystem extents and hung block I/O \u2014 stays within the kernel and storage stack of the same system, with no crossing into a different security authority such as a hypervisor or IOMMU boundary.\nC:H - XFS commits bmap extent records built from the incorrect returned sector, and because xfs_zoned_pack_tight() packs multiple inodes into a single zone and XFS has no data checksums, subsequent reads silently return the decrypted plaintext of other files \u2014 potentially other users\u0027 data \u2014 from the encrypted device.\nI:H - The wrong written sector is committed into persistent on-disk filesystem metadata, producing silent, unrecoverable data corruption in XFS and btrfs as explicitly stated by the fix; extents point at physical blocks owned by other files, corrupting both attacker and victim data.\nA:H - The split remainder BIO is re-issued from the zone write plug work and calls blk_queue_enter(), deadlocking against a queue freeze that is waiting on BIOs DM still holds, hanging all I/O to the device; the resulting extent and space-accounting corruption also trips filesystem verifiers and forces an XFS/btrfs shutdown."
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2026-08-05T12:05:11.878Z",
            "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "shortName": "Linux"
          },
          "references": [
            {
              "url": "https://git.kernel.org/stable/c/8864616719b6bbf92356bc89ff544b0cd484c656"
            },
            {
              "url": "https://git.kernel.org/stable/c/52a2c4c60470352acf9cde7a2dfa661c1e67e796"
            },
            {
              "url": "https://git.kernel.org/stable/c/e549663849e5bb3b985dc2d293069f0d9747ae72"
            }
          ],
          "title": "dm: dm-crypt: Do not partially accept write BIOs with zoned targets",
          "x_generator": {
            "engine": "bippy-1.2.0"
          }
        }
      },
      "cveMetadata": {
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "assignerShortName": "Linux",
        "cveId": "CVE-2025-39791",
        "datePublished": "2025-09-11T16:56:39.397Z",
        "dateReserved": "2025-04-16T07:20:57.131Z",
        "dateUpdated": "2026-10-15T22:02:31.935Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.