Katalog CWE

CWE-1254 · Słabość

Incorrect Comparison Logic Granularity

Abstrakcja
Bazowa
Status
Szkic
Dodano
12 lutego 2020
Ostatnia zmiana
11 grudnia 2025

Podatności CVE z tą słabościąPełny wpis na cwe.mitre.org ↗

Opis

The product's comparison logic is performed over a series of steps rather than across the entire string in one operation. If there is a comparison logic failure on one of these steps, the operation may be vulnerable to a timing attack that can result in the interception of the process for nefarious purposes.

Comparison logic is used to compare a variety of objects including passwords, Message Authentication Codes (MACs), and responses to verification challenges. When comparison logic is implemented at a finer granularity (e.g., byte-by-byte comparison) and breaks in the case of a comparison failure, an attacker can exploit this implementation to identify when exactly the failure occurred. With multiple attempts, the attacker may be able to guesses the correct password/response to challenge and elevate their privileges.

Skutki

  • Confidentiality, Authorization

    Bypass Protection Mechanism

Zapobieganie

  • Implementation

    The hardware designer should ensure that comparison logic is implemented so as to compare in one operation instead in smaller chunks.

Przykłady podatności

Słabość nadrzędna

Kiedy powstaje

Dotyczy

Not Language-Specific, Not OS-Specific, Not Architecture-Specific, Not Technology-Specific

Uwagi

CWE 4.16 removed a demonstrative example for a hardware module because it was inaccurate and unable to be adapted. The CWE team is developing an alternative.

Źródła

  1. SCA4n00bz - Timing-based Sidechannel Attacks for Hardware N00bz workshop — Joe Fitzpatrick

Wpis z katalogu CWE 4.20.