« Volver al listado

CVE-2026-22995

Estado: AnalizadaAlta (7.8)—

In the Linux kernel, the following vulnerability has been resolved:

ublk: fix use-after-free in ublk_partition_scan_work

A race condition exists between the async partition scan work and device teardown that can lead to a use-after-free of ub->ub_disk:

Fix this by using ublk_get_disk()/ublk_put_disk() in the worker to hold a reference to the disk during the partition scan. The spinlock in ublk_get_disk() synchronizes with ublk_detach_disk() ensuring the worker either gets a valid reference or sees NULL and exits early.

Also change flush_work() to cancel_work_sync() to avoid running the partition scan work unnecessarily when the disk is already detached.

Detalles técnicos trazas, registros y código del informe original
1. ublk_ctrl_start_dev() schedules partition_scan_work after add_disk()
2. ublk_stop_dev() calls ublk_stop_dev_unlocked() which does:
   - del_gendisk(ub->ub_disk)
   - ublk_detach_disk() sets ub->ub_disk = NULL
   - put_disk() which may free the disk
3. The worker ublk_partition_scan_work() then dereferences ub->ub_disk
   leading to UAF

CVSS

Probabilidad de explotación (EPSS)

EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).

🎯 Técnicas ATT&CK

Cómo se explota esta vulnerabilidad y qué consigue el atacante, en el lenguaje de MITRE ATT&CK.

Vulnerabilidad local (AV:L/PR:L) de use-after-free (CWE-416) en kernel Linux que permite escalada de privilegios mediante ejecución de código arbitrario desde contexto privilegiado.

Inferido por nuestro agente de análisis a partir de la descripción oficial, el vector CVSS y la CWE, y comprobado por un supervisor. Puede contener errores.

🛡️ Mitigaciones ATT&CK que cubren estas técnicas

Tecnologías afectadas (1)

CWE

Referencias

JSON original (NVD)

Mostrar
{
  "id": "CVE-2026-22995",
  "cveTags": [],
  "metrics": {
    "cvssMetricV31": [
      {
        "type": "Primary",
        "source": "nvd@nist.gov",
        "cvssData": {
          "scope": "UNCHANGED",
          "version": "3.1",
          "baseScore": 7.8,
          "attackVector": "LOCAL",
          "baseSeverity": "HIGH",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
          "integrityImpact": "HIGH",
          "userInteraction": "NONE",
          "attackComplexity": "LOW",
          "availabilityImpact": "HIGH",
          "privilegesRequired": "LOW",
          "confidentialityImpact": "HIGH"
        },
        "impactScore": 5.9,
        "exploitabilityScore": 1.8
      }
    ]
  },
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "product": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "63dfbcd59b4b823eac4441efff10b1c303c8f49f",
              "lessThan": "72e28774e9644c2bdbb4920842fbf77103a15a85",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "7fc4da6a304bdcd3de14fc946dc2c19437a9cc5a",
              "lessThan": "f0d385f6689f37a2828c686fb279121df006b4cb",
              "versionType": "git"
            }
          ],
          "programFiles": [
            "drivers/block/ublk_drv.c"
          ],
          "defaultStatus": "unaffected"
        },
        {
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "product": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.18.4",
              "lessThan": "6.18.6",
              "versionType": "semver"
            }
          ],
          "programFiles": [
            "drivers/block/ublk_drv.c"
          ],
          "defaultStatus": "unaffected"
        }
      ]
    }
  ],
  "published": "2026-01-23T16:15:55.603",
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/72e28774e9644c2bdbb4920842fbf77103a15a85",
      "tags": [
        "Patch"
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/f0d385f6689f37a2828c686fb279121df006b4cb",
      "tags": [
        "Patch"
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ],
  "vulnStatus": "Analyzed",
  "weaknesses": [
    {
      "type": "Primary",
      "source": "nvd@nist.gov",
      "description": [
        {
          "lang": "en",
          "value": "CWE-416"
        }
      ]
    }
  ],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nublk: fix use-after-free in ublk_partition_scan_work\n\nA race condition exists between the async partition scan work and device\nteardown that can lead to a use-after-free of ub->ub_disk:\n\n1. ublk_ctrl_start_dev() schedules partition_scan_work after add_disk()\n2. ublk_stop_dev() calls ublk_stop_dev_unlocked() which does:\n   - del_gendisk(ub->ub_disk)\n   - ublk_detach_disk() sets ub->ub_disk = NULL\n   - put_disk() which may free the disk\n3. The worker ublk_partition_scan_work() then dereferences ub->ub_disk\n   leading to UAF\n\nFix this by using ublk_get_disk()/ublk_put_disk() in the worker to hold\na reference to the disk during the partition scan. The spinlock in\nublk_get_disk() synchronizes with ublk_detach_disk() ensuring the worker\neither gets a valid reference or sees NULL and exits early.\n\nAlso change flush_work() to cancel_work_sync() to avoid running the\npartition scan work unnecessarily when the disk is already detached."
    },
    {
      "lang": "es",
      "value": "Se ha resuelto la siguiente vulnerabilidad en el kernel de Linux:\n\nublk: corrige uso después de liberación en ublk_partition_scan_work\n\nExiste una condición de carrera entre el trabajo de escaneo de particiones asíncrono y el desmontaje del dispositivo que puede llevar a un uso después de liberación de ub->ub_disk:\n\n1. ublk_ctrl_start_dev() programa partition_scan_work después de add_disk()\n2. ublk_stop_dev() llama a ublk_stop_dev_unlocked() que hace:\n   - del_gendisk(ub->ub_disk)\n   - ublk_detach_disk() establece ub->ub_disk = NULL\n   - put_disk() que puede liberar el disco\n3. El worker ublk_partition_scan_work() entonces desreferencia ub->ub_disk llevando a UAF\n\nCorrige esto usando ublk_get_disk()/ublk_put_disk() en el worker para mantener una referencia al disco durante el escaneo de particiones. El spinlock en ublk_get_disk() se sincroniza con ublk_detach_disk() asegurando que el worker o bien obtiene una referencia válida o ve NULL y sale temprano.\n\nTambién cambia flush_work() a cancel_work_sync() para evitar ejecutar innecesariamente el trabajo de escaneo de particiones cuando el disco ya está desmontado."
    }
  ],
  "lastModified": "2026-06-17T10:20:40.373",
  "configurations": [
    {
      "nodes": [
        {
          "negate": false,
          "cpeMatch": [
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "27849DC4-2BBE-4536-8F33-2616A53ACA55",
              "versionEndExcluding": "6.18.6",
              "versionStartIncluding": "6.18.4"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:6.19:rc4:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "13580667-0A98-40CC-B29F-D12790B91BDB"
            }
          ],
          "operator": "OR"
        }
      ]
    }
  ],
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}