CWE-1314 Base Borrador

Missing Write Protection for Parametric Data Values

This vulnerability occurs when a hardware device fails to protect the scaling parameters used to convert raw sensor readings. Untrusted software can alter these conversion factors, making dangerous…

Definición

What is CWE-1314?

This vulnerability occurs when a hardware device fails to protect the scaling parameters used to convert raw sensor readings. Untrusted software can alter these conversion factors, making dangerous conditions appear safe and potentially leading to hardware damage or system failure.
Hardware systems use sensors to monitor critical limits for temperature, power, voltage, and other operational parameters. Trusted firmware like the BIOS typically sets and protects these safety thresholds. However, the raw data from sensors often needs to be scaled using conversion parameters to produce meaningful values (like degrees Celsius or volts). The core issue is that while the final safety limits are often locked down, these underlying scaling factors are left exposed and writable. By manipulating these unprotected scaling parameters, an attacker can distort the sensor's reported values. For example, they could make a dangerously high temperature appear within a normal range. This bypasses the intended safety checks, allowing the system to operate outside its safe design limits, which can cause physical damage to components or lead to a complete operational failure.
Impacto en el mundo real

Real-world CVEs caused by CWE-1314

  • Kernel can inject faults in computations during the execution of TrustZone leading to information disclosure in Snapdragon Auto, Snapdragon Compute, Snapdragon Connectivity, Snapdragon Consumer Electronics Connectivity, Snapdragon Consumer IOT, Snapdragon Industrial IOT, Snapdragon IoT, Snapdragon Mobile, Snapdragon Voice and Music, Snapdragon Wearables, Snapdragon Wired Infrastructure and Networking.

Cómo lo explotan los atacantes

Ruta del atacante paso a paso

  1. 1

    Identifica una ruta de código que maneje entrada no confiable sin validación.

  2. 2

    Crea un payload que ejercite el comportamiento inseguro — inyección, traversal, overflow o abuso de lógica.

  3. 3

    Envía el payload a través de una solicitud normal y observa la reacción de la aplicación.

  4. 4

    Itera hasta que la respuesta filtre datos, ejecute código del atacante o escale privilegios.

Ejemplo de código vulnerable

Vulnerable Other

Malicious software executes instructions to increase power consumption to the highest possible level while causing the clock frequency to increase to its maximum value. Such a program executing for an extended period of time would likely overheat the device, possibly resulting in permanent damage to the device. A ring, oscillator-based temperature sensor will generally report the sensed value as oscillator frequency rather than degrees centigrade. The temperature sensor will have calibration values that are used to convert the detected frequency into the corresponding temperature in degrees centigrade. Consider a SoC design where the critical maximum temperature limit is set in fuse values to 100C and is not modifiable by software. If the scaled thermal sensor output equals or exceeds this limit, the system is commanded to shut itself down. The thermal sensor calibration values are programmable through registers that are exposed to system software. These registers allow software to affect the converted temperature output such that the output will never exceed the maximum temperature limit.

Vulnerable Other
The sensor frequency value is scaled by applying the function:

```
  Sensed Temp = a + b * Sensor Freq
```
where a and b are the programmable calibration data coefficients. Software sets a and b to zero ensuring the sensed temperature is always zero.
Ejemplo de código seguro

Secure Other

This weakness may be addressed by preventing access to a and b.

Seguro Other
The sensor frequency value is scaled by applying the function:

```
  Sensed Temp = a + b * Sensor Freq
```
where a and b are the programmable calibration data coefficients. Untrusted software is prevented from changing the values of either a or b, preventing this method of manipulating the temperature.
What changed: the unsafe sink is replaced (or the input is validated/escaped) so the same payload no longer triggers the weakness.
Lista de prevención

How to prevent CWE-1314

  • Architecture and Design Access controls for sensor blocks should ensure that only trusted software is allowed to change threshold limits and sensor parametric data.
Señales de detección

How to detect CWE-1314

SAST High

Ejecuta análisis estático (SAST) sobre el código buscando el patrón inseguro en el flujo de datos.

DAST Moderate

Ejecuta pruebas dinámicas de seguridad de aplicaciones (DAST) contra el endpoint en vivo.

Runtime Moderate

Vigila los logs en tiempo de ejecución para detectar trazas de excepción inusuales, entradas malformadas o intentos de bypass de autorización.

Code review Moderate

Revisión de código: marca cualquier código nuevo que maneje entrada desde esta superficie sin usar los helpers validados del framework.

Auto-corrección de Plexicus

Plexicus detecta automáticamente CWE-1314 y abre un PR de corrección en menos de 60 segundos.

Codex Remedium escanea cada commit, identifica esta debilidad concreta y entrega un pull request listo para revisión con el parche. Sin tickets. Sin traspasos.

Preguntas frecuentes

Frequently asked questions

¿Qué es CWE-1314?

This vulnerability occurs when a hardware device fails to protect the scaling parameters used to convert raw sensor readings. Untrusted software can alter these conversion factors, making dangerous conditions appear safe and potentially leading to hardware damage or system failure.

¿Qué gravedad tiene CWE-1314?

MITRE no ha publicado una calificación de probabilidad de explotación para esta debilidad. Trátala como de impacto medio hasta que tu modelo de amenazas demuestre lo contrario.

¿Qué lenguajes o plataformas se ven afectados por CWE-1314?

MITRE lists the following affected platforms: Not OS-Specific, Not Architecture-Specific, Sensor Hardware.

¿Cómo puedo prevenir CWE-1314?

Access controls for sensor blocks should ensure that only trusted software is allowed to change threshold limits and sensor parametric data.

¿Cómo detecta y corrige Plexicus CWE-1314?

El motor SAST de Plexicus detecta la firma de flujo de datos para CWE-1314 en cada commit. Cuando hay coincidencia, nuestro agente Codex Remedium abre un PR de corrección con el código corregido, las pruebas y un resumen de una línea para el revisor.

¿Dónde puedo aprender más sobre CWE-1314?

MITRE publica la definición canónica en https://cwe.mitre.org/data/definitions/1314.html. También puedes consultar la documentación de OWASP y NIST para guías relacionadas.

Listo cuando tú lo estés

Deja de pagar por desarrollador.
Empieza a cerrar el bucle.

Plexicus es el ASPM nativo de IA que escanea, filtra, corrige, pentestea y explica — de forma autónoma. Desarrolladores ilimitados, repos ilimitados, acciones de IA de uso justo. Nivel gratuito real, €269/mo anual cuando estés listo.