Katalog CWE

CWE-663 · Słabość

Use of a Non-reentrant Function in a Concurrent Context

Abstrakcja
Bazowa
Status
Szkic
Dodano
11 kwietnia 2008
Ostatnia zmiana
11 grudnia 2025

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

Opis

The product calls a non-reentrant function in a concurrent context in which a competing code sequence (e.g. thread or signal handler) may have an opportunity to call the same function or otherwise influence its state.

Skutki

  • Integrity, Confidentiality, Other

    Modify Memory; Read Memory; Modify Application Data; Read Application Data; Alter Execution Logic

Zapobieganie

  • Implementation

    Use reentrant functions if available.

  • Implementation

    Add synchronization to your non-reentrant function.

  • Implementation

    In Java, use the ReentrantLock Class.

Przykłady podatności

Słabość nadrzędna

Słabości podrzędne

Kiedy powstaje

Dotyczy

Not Language-Specific, C

Źródła

  1. Java Concurrency API — SUN, Class ReentrantLock
  2. Use reentrant functions for safer signal handling — Dipak Jha, Software Engineer, IBM

Wpis z katalogu CWE 4.20.