CWE-1314 Base Brouillon

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…

Définition

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.
Impact réel

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.

Comment les attaquants l'exploitent

Parcours de l'attaquant étape par étape

  1. 1

    Identifier un chemin de code qui traite des entrées non fiables sans validation.

  2. 2

    Élaborer une charge utile qui exploite le comportement non sécurisé — injection, traversal, débordement ou abus de logique.

  3. 3

    Délivrer la charge utile via une requête normale et observer la réaction de l'application.

  4. 4

    Itérer jusqu'à ce que la réponse divulgue des données, exécute le code de l'attaquant ou élève les privilèges.

Exemple de code vulnérable

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.

Vulnérable 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.
Exemple de code sécurisé

Secure Other

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

Sécurisé 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.
Liste de contrôle de prévention

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.
Signaux de détection

How to detect CWE-1314

SAST High

Exécuter une analyse statique (SAST) sur le code source à la recherche du motif non sécurisé dans le flux de données.

DAST Moderate

Exécuter des tests de sécurité applicative dynamique (DAST) contre le point de terminaison en ligne.

Runtime Moderate

Surveiller les journaux runtime pour détecter des traces d'exception inhabituelles, des entrées malformées ou des tentatives de contournement d'autorisation.

Code review Moderate

Revue de code : signaler tout nouveau code qui traite les entrées de cette surface sans utiliser les helpers du framework validés.

Correction automatique Plexicus

Plexicus détecte automatiquement CWE-1314 et ouvre une PR de correction en moins de 60 secondes.

Codex Remedium analyse chaque commit, identifie cette faiblesse précise et livre une pull request prête à être relue avec le correctif. Pas de tickets. Pas de transferts.

Questions fréquentes

Frequently asked questions

Qu'est-ce que 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.

Quelle est la gravité de CWE-1314 ?

MITRE n'a pas publié de note de probabilité d'exploitation pour cette faiblesse. Traitez-la comme un impact moyen jusqu'à ce que votre modèle de menace prouve le contraire.

Quels langages ou plateformes sont affectés par CWE-1314 ?

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

Comment puis-je prévenir CWE-1314 ?

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

Comment Plexicus détecte et corrige CWE-1314 ?

Le moteur SAST de Plexicus reconnaît la signature de flux de données de CWE-1314 à chaque commit. Lorsqu'une correspondance est trouvée, notre agent Codex Remedium ouvre une PR de correction avec le code corrigé, les tests et un résumé d'une ligne pour le relecteur.

Où puis-je en savoir plus sur CWE-1314 ?

MITRE publie la définition canonique à https://cwe.mitre.org/data/definitions/1314.html. Vous pouvez également consulter la documentation OWASP et NIST pour des conseils adjacents.

Prêt quand vous l'êtes

Arrêtez de payer par développeur.
Commencez à fermer la boucle.

Plexicus est l'ASPM natif IA qui scanne, filtre, corrige, penteste et explique — de façon autonome. Développeurs illimités, dépôts illimités, actions IA à usage équitable. Vrai niveau gratuit, €269/mo annuel quand vous êtes prêt.