Skip to content

[CPP]: Add query for CWE-190: Integer Overflow or Wraparound when using transform after operation #550

@ihsinme

Description

@ihsinme

Query PR

github/codeql#8247

Language

C/C++

CVE(s) ID list

CVE-2021-43618

CWE

CWE-190: Integer Overflow or Wraparound

Report

  1. in integer overflow, signed or unsigned.
  2. when the multiplication result overflows, we can get truncated data, which can lead to problems when using the result. (pointer offset, memory allocation).
  3. The query is looking for an explicit late conversion that would have happened anyway.
  4. The subsequent transformation makes the detection either a security error detection or a stylistic error detection.

Are you planning to discuss this vulnerability submission publicly? (Blog Post, social networks, etc).

  • Yes
  • No

Blog post link

https://twitter.com/ihsinme/status/1501068796202782725

Metadata

Metadata

Assignees

No one assigned

    Labels

    All For OneSubmissions to the All for One, One for All bounty

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions