« Volver al listado

CVE-2025-68807

Estado: AplazadaSin puntuar—

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

block: fix race between wbt_enable_default and IO submission

When wbt_enable_default() is moved out of queue freezing in elevator_change(), it can cause the wbt inflight counter to become negative (-1), leading to hung tasks in the writeback path. Tasks get stuck in wbt_wait() because the counter is in an inconsistent state.

The issue occurs because wbt_enable_default() could race with IO submission, allowing the counter to be decremented before proper initialization. This manifests as:

rwb_enabled() checks the state, which can be updated exactly between wbt_wait() (rq_qos_throttle()) and wbt_track()(rq_qos_track()), then the inflight counter will become negative.

Leer descripción completaMostrar menos

Fix this by:

This ensures WBT is properly initialized before any IO can be submitted, preventing the counter from going negative.

Detalles técnicos trazas, registros y código del informe original
  rq_wait[0]:
    inflight:             -1
    has_waiters:        True

And results in hung task warnings like:
  task:kworker/u24:39 state:D stack:0 pid:14767
  Call Trace:
    rq_qos_wait+0xb4/0x150
    wbt_wait+0xa9/0x100
    __rq_qos_throttle+0x24/0x40
    blk_mq_submit_bio+0x672/0x7b0
    ...

1. Splitting wbt_enable_default() into:
   - __wbt_enable_default(): Returns true if wbt_init() should be called
   - wbt_enable_default(): Wrapper for existing callers (no init)
   - wbt_init_enable_default(): New function that checks and inits WBT

2. Using wbt_init_enable_default() in blk_register_queue() to ensure
   proper initialization during queue registration

3. Move wbt_init() out of wbt_enable_default() which is only for enabling
   disabled wbt from bfq and iocost, and wbt_init() isn't needed. Then the
   original lock warning can be avoided.

4. Removing the ELEVATOR_FLAG_ENABLE_WBT_ON_EXIT flag and its handling
   code since it's no longer needed

CVSS

NVD no ha asignado puntuación CVSS a esta CVE (habitual desde el cambio de política de abril de 2026).

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).

Tecnologías afectadas (1)

⚠ Inferidas por IA a partir de la descripción — NVD aún no ha analizado esta CVE; no son CPE verificados.

Referencias

JSON original (NVD)

Mostrar
{
  "id": "CVE-2025-68807",
  "cveTags": [],
  "metrics": {},
  "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": "78c271344b6f64ce24c845e54903e09928cf2061",
              "lessThan": "f55201fb3becff6a903fd29f4d1147cc7e91eb0c",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "78c271344b6f64ce24c845e54903e09928cf2061",
              "lessThan": "9869d3a6fed381f3b98404e26e1afc75d680cbf9",
              "versionType": "git"
            }
          ],
          "programFiles": [
            "block/bfq-iosched.c",
            "block/blk-sysfs.c",
            "block/blk-wbt.c",
            "block/blk-wbt.h",
            "block/elevator.c",
            "block/elevator.h"
          ],
          "defaultStatus": "unaffected"
        },
        {
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "product": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.16"
            },
            {
              "status": "unaffected",
              "version": "0",
              "lessThan": "6.16",
              "versionType": "semver"
            },
            {
              "status": "unaffected",
              "version": "6.18.3",
              "versionType": "semver",
              "lessThanOrEqual": "6.18.*"
            },
            {
              "status": "unaffected",
              "version": "6.19",
              "versionType": "original_commit_for_fix",
              "lessThanOrEqual": "*"
            }
          ],
          "programFiles": [
            "block/bfq-iosched.c",
            "block/blk-sysfs.c",
            "block/blk-wbt.c",
            "block/blk-wbt.h",
            "block/elevator.c",
            "block/elevator.h"
          ],
          "defaultStatus": "affected"
        }
      ]
    }
  ],
  "published": "2026-01-13T16:16:02.857",
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/9869d3a6fed381f3b98404e26e1afc75d680cbf9",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/f55201fb3becff6a903fd29f4d1147cc7e91eb0c",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ],
  "vulnStatus": "Deferred",
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nblock: fix race between wbt_enable_default and IO submission\n\nWhen wbt_enable_default() is moved out of queue freezing in elevator_change(),\nit can cause the wbt inflight counter to become negative (-1), leading to hung\ntasks in the writeback path. Tasks get stuck in wbt_wait() because the counter\nis in an inconsistent state.\n\nThe issue occurs because wbt_enable_default() could race with IO submission,\nallowing the counter to be decremented before proper initialization. This manifests\nas:\n\n  rq_wait[0]:\n    inflight:             -1\n    has_waiters:        True\n\nrwb_enabled() checks the state, which can be updated exactly between wbt_wait()\n(rq_qos_throttle()) and wbt_track()(rq_qos_track()), then the inflight counter\nwill become negative.\n\nAnd results in hung task warnings like:\n  task:kworker/u24:39 state:D stack:0 pid:14767\n  Call Trace:\n    rq_qos_wait+0xb4/0x150\n    wbt_wait+0xa9/0x100\n    __rq_qos_throttle+0x24/0x40\n    blk_mq_submit_bio+0x672/0x7b0\n    ...\n\nFix this by:\n\n1. Splitting wbt_enable_default() into:\n   - __wbt_enable_default(): Returns true if wbt_init() should be called\n   - wbt_enable_default(): Wrapper for existing callers (no init)\n   - wbt_init_enable_default(): New function that checks and inits WBT\n\n2. Using wbt_init_enable_default() in blk_register_queue() to ensure\n   proper initialization during queue registration\n\n3. Move wbt_init() out of wbt_enable_default() which is only for enabling\n   disabled wbt from bfq and iocost, and wbt_init() isn't needed. Then the\n   original lock warning can be avoided.\n\n4. Removing the ELEVATOR_FLAG_ENABLE_WBT_ON_EXIT flag and its handling\n   code since it's no longer needed\n\nThis ensures WBT is properly initialized before any IO can be submitted,\npreventing the counter from going negative."
    },
    {
      "lang": "es",
      "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nblock: corrige la condición de carrera entre wbt_enable_default y el envío de E/S\n\nCuando wbt_enable_default() se mueve fuera de la congelación de la cola en elevator_change(), puede hacer que el contador inflight de wbt se vuelva negativo (-1), lo que lleva a tareas colgadas en la ruta de writeback. Las tareas se quedan atascadas en wbt_wait() porque el contador está en un estado inconsistente.\n\nEl problema ocurre porque wbt_enable_default() podría competir con el envío de E/S, permitiendo que el contador se decremente antes de la inicialización adecuada. Esto se manifiesta como:\n\n  rq_wait[0]:\n    inflight:             -1\n    has_waiters:        True\n\nrwb_enabled() verifica el estado, que puede actualizarse exactamente entre wbt_wait() (rq_qos_throttle()) y wbt_track()(rq_qos_track()), entonces el contador inflight se volverá negativo.\n\nY resulta en advertencias de tareas colgadas como:\n  task:kworker/u24:39 state:D stack:0 pid:14767\n  Call Trace:\n    rq_qos_wait+0xb4/0x150\n    wbt_wait+0xa9/0x100\n    __rq_qos_throttle+0x24/0x40\n    blk_mq_submit_bio+0x672/0x7b0\n    ...\n\nEsto se soluciona mediante:\n\n1. Dividiendo wbt_enable_default() en:\n   - __wbt_enable_default(): Devuelve verdadero si se debe llamar a wbt_init()\n   - wbt_enable_default(): Envoltorio para las funciones que ya lo llaman (sin inicialización)\n   - wbt_init_enable_default(): Nueva función que verifica e inicializa WBT\n\n2. Usando wbt_init_enable_default() en blk_register_queue() para asegurar una inicialización adecuada durante el registro de la cola\n\n3. Moviendo wbt_init() fuera de wbt_enable_default(), que es solo para habilitar wbt deshabilitado de bfq e iocost, y wbt_init() no es necesario. Así se puede evitar la advertencia de bloqueo original.\n\n4. Eliminando la bandera ELEVATOR_FLAG_ENABLE_WBT_ON_EXIT y su código de manejo, ya que ya no es necesario\n\nEsto asegura que WBT se inicialice correctamente antes de que se pueda enviar cualquier E/S, evitando que el contador se vuelva negativo."
    }
  ],
  "lastModified": "2026-06-17T09:59:37.323",
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}