BaseDraft

CWE-1335Incorrect Bitwise Shift of Integer

Category: other

Description

An integer value is specified to be shifted by a negative amount or an amount greater than or equal to the number of bits contained in the value causing an unexpected or indeterminate result.

Common consequences· 1

  • Integrity — DoS: Crash, Exit, or Restart

Potential mitigations· 1

  • [Implementation]Implicitly or explicitly add checks and mitigation for negative or over-shift values.

References

  1. https://cwe.mitre.org/data/definitions/1335.html

Related by meaning· 6

Nearest entities by semantic similarity across the cs-graph corpus.

CWE
Signed to Unsigned Conversion Error
CWE
Incorrect Conversion between Numeric Types
CWE
Integer Underflow (Wrap or Wraparound)
CWE
Floating Point Comparison with Incorrect Operator
CWE
Function Call With Incorrectly Specified Argument Value
CWE
Function Call With Incorrect Argument Type
Sourced from MITRE CWE 4.20. Curated for EU compliance use cases by Adam Lundqvist, Founder at SQUR.