← Back to CVE Explorer

CVE-2026-11743

Full vulnerability record from the local CVENow database.

Description

The SF32LB MPI QSPI NOR flash driver (drivers/flash/flash_sf32lb_mpi_qspi_nor.c) validated the flash offset and length on its read and write paths with the test (offset + size) > data->size. Because offset is a signed off_t while size is unsigned, a negative offset is converted to a large unsigned value and the addition can wrap to a small result that passes the check. The read path then performs memcpy(dst, (void *)(data->base + offset), size) and the write path programs flash at offset and cache-invalidates data->base + offset, in both cases accessing memory outside the mapped flash window. The driver's erase path already rejected negative offsets, but read and write did not. In builds with CONFIG_USERSPACE, flash_read and flash_write are syscalls whose verifiers validate the device object and the caller's buffer but deliberately delegate offset bounds checking to the driver. An unprivileged thread that has been granted access to this flash device can therefore call the syscall with a crafted negative offset and a buffer valid in its own memory domain, and reach the unchecked access. The most direct impact is on the read path: by choosing a negative offset and matching size, an attacker slides the memcpy source below the flash base and copies arbitrary CPU-addressable memory into its own buffer, disclosing memory it is not authorized to read. The write path additionally allows programming flash at an out-of-range address and invalidating an attacker-chosen cache range, affecting integrity and availability. Reachability requires userspace to be enabled and the raw flash device object to be granted to an untrusted thread. The fix replaces the check with qspi_nor_range_is_valid(), which rejects negative offsets and performs the bound comparison in overflow-safe 64-bit arithmetic on both paths, and additionally adds an SRAM DMA bounce buffer plus source/destination overlap rejection to prevent a separate DMA bus-hang condition.

Severity
MEDIUM
CVSS score
6.6 (v3.1)
Vulnerability status
Awaiting Analysis
Source identifier
Published
2026-08-07 22:16:57.317000
Last modified
2026-10-23 20:10:00.160000
View original CVE JSON
{
  "id": "CVE-2026-11743",
  "sourceIdentifier": "[email protected]",
  "published": "2026-08-07T22:16:57.317",
  "lastModified": "2026-10-23T20:10:00.160",
  "vulnStatus": "Awaiting Analysis",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "The SF32LB MPI QSPI NOR flash driver (drivers/flash/flash_sf32lb_mpi_qspi_nor.c) validated the flash offset and length on its read and write paths with the test (offset + size) > data->size. Because offset is a signed off_t while size is unsigned, a negative offset is converted to a large unsigned value and the addition can wrap to a small result that passes the check. The read path then performs memcpy(dst, (void *)(data->base + offset), size) and the write path programs flash at offset and cache-invalidates data->base + offset, in both cases accessing memory outside the mapped flash window. The driver's erase path already rejected negative offsets, but read and write did not.\n\nIn builds with CONFIG_USERSPACE, flash_read and flash_write are syscalls whose verifiers validate the device object and the caller's buffer but deliberately delegate offset bounds checking to the driver. An unprivileged thread that has been granted access to this flash device can therefore call the syscall with a crafted negative offset and a buffer valid in its own memory domain, and reach the unchecked access.\n\nThe most direct impact is on the read path: by choosing a negative offset and matching size, an attacker slides the memcpy source below the flash base and copies arbitrary CPU-addressable memory into its own buffer, disclosing memory it is not authorized to read. The write path additionally allows programming flash at an out-of-range address and invalidating an attacker-chosen cache range, affecting integrity and availability. Reachability requires userspace to be enabled and the raw flash device object to be granted to an untrusted thread.\n\nThe fix replaces the check with qspi_nor_range_is_valid(), which rejects negative offsets and performs the bound comparison in overflow-safe 64-bit arithmetic on both paths, and additionally adds an SRAM DMA bounce buffer plus source/destination overlap rejection to prevent a separate DMA bus-hang condition."
    },
    {
      "lang": "es",
      "value": "El controlador de flash SF32LB MPI QSPI NOR (drivers/flash/flash_sf32lb_mpi_qspi_nor.c) validaba el desplazamiento y la longitud del flash en sus rutas de lectura y escritura con la prueba (offset + size) > data  ->  size. Debido a que ’offset’ es un ’off_t’ con signo mientras que ’size’ no tiene signo, un desplazamiento negativo se convierte en un valor grande sin signo y la adición puede desbordarse a un resultado pequeño que pasa la verificación. La ruta de lectura luego realiza memcpy(dst, (void *)(data  ->  base + offset), size) y la ruta de escritura programa el flash en el desplazamiento e invalida la caché de data  ->  base + offset, en ambos casos, accediendo a memoria fuera de la ventana de flash mapeada. La ruta de borrado del controlador ya rechazaba los desplazamientos negativos, pero lectura y escritura no lo hacían.\n\nEn compilaciones con CONFIG_USERSPACE, flash_read y flash_write son llamadas al sistema (syscalls) cuyos verificadores validan el objeto del dispositivo y el búfer del llamador, pero delegan deliberadamente la verificación de límites de desplazamiento al controlador. Un hilo sin privilegios al que se le ha concedido acceso a este dispositivo flash puede, por lo tanto, llamar a la llamada al sistema con un desplazamiento negativo manipulado y un búfer válido en su propio dominio de memoria, y alcanzar el acceso no verificado.\n\nEl impacto más directo está en la ruta de lectura: al elegir un desplazamiento negativo y un tamaño coincidente, un atacante desliza el origen de memcpy por debajo de la base del flash y copia memoria arbitraria direccionable por la CPU en su propio búfer, revelando memoria que no está autorizado a leer. La ruta de escritura permite adicionalmente programar el flash en una dirección fuera de rango e invalidar un rango de caché elegido por el atacante, afectando la integridad y la disponibilidad. La alcanzabilidad requiere que el espacio de usuario (userspace) esté habilitado y que el objeto del dispositivo flash en bruto se conceda a un hilo no confiable.\n\nLa solución reemplaza la verificación con qspi_nor_range_is_valid(), que rechaza los desplazamientos negativos y realiza la comparación de límites en aritmética de 64 bits segura contra desbordamientos en ambas rutas, y adicionalmente añade un búfer de rebote DMA SRAM más el rechazo de superposición de origen/destino para prevenir una condición separada de bloqueo del bus DMA."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "zephyrproject",
          "product": "zephyr",
          "defaultStatus": "unaffected",
          "collectionURL": "https://github.com/zephyrproject-rtos/zephyr",
          "packageName": "zephyr",
          "programFiles": [
            "drivers/flash/flash_sf32lb_mpi_qspi_nor.c"
          ],
          "versions": [
            {
              "version": "4.3.0",
              "lessThan": "4.4.2",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L",
          "baseScore": 6.6,
          "baseSeverity": "MEDIUM",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "LOW",
          "availabilityImpact": "LOW"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 4.7
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-08-10T16:43:11.668749Z",
          "id": "CVE-2026-11743",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-125"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/zephyrproject-rtos/zephyr/commit/909eb568750304d68ea481d1b56a489ae670bdae",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-c6wh-gwg4-fj5j",
      "source": "[email protected]"
    }
  ]
}