+V15.4 Safe Concurrency
---+V15.4.1 Verify that shared objects in multi-threaded code (such as caches, files, or in-memory objects …
---+V15.4.2 Verify that checks on a resource's state, such as its existence or permissions, and the actions …
---+V15.4.3 Verify that locks are used consistently to avoid threads getting stuck, whether by waiting on each …
---+V15.4.4 Verify that resource allocation policies prevent thread starvation by ensuring fair access to …

V15.4 Safe Concurrency

Concurrency issues such as race conditions, time-of-check to time-of-use (TOCTOU) vulnerabilities, deadlocks, livelocks, thread starvation, and improper synchronization can lead to unpredictable behavior and security risks. This section includes various techniques and strategies to help mitigate these risks.

1. Ħarsa ġenerali

Titlu Standard
V15.4.1 Verify that shared objects in multi-threaded code (such as caches, files, or in-memory objects …

Verify that shared objects in multi-threaded code (such as caches, files, or in-memory objects accessed by multiple threads) are accessed safely by using thread-safe types and synchronization mechanisms like locks or semaphores to avoid race conditions and data corruption.

V15.4.2 Verify that checks on a resource's state, such as its existence or permissions, and the actions …

Verify that checks on a resource's state, such as its existence or permissions, and the actions that depend on them are performed as a single atomic operation to prevent time-of-check to time-of-use (TOCTOU) race conditions. For example, checking if a file exists before opening it, or verifying a user’s access before granting it.

V15.4.3 Verify that locks are used consistently to avoid threads getting stuck, whether by waiting on each …

Verify that locks are used consistently to avoid threads getting stuck, whether by waiting on each other or retrying endlessly, and that locking logic stays within the code responsible for managing the resource to ensure locks cannot be inadvertently or maliciously modified by external classes or code.

V15.4.4 Verify that resource allocation policies prevent thread starvation by ensuring fair access to …

Verify that resource allocation policies prevent thread starvation by ensuring fair access to resources, such as by leveraging thread pools, allowing lower-priority threads to proceed within a reasonable timeframe.

1.1 Referenzi

1.2 Rekwiżiti identifikati

1.3 Regolamenti relatati

2. Rekwiżiti identifikati

Rekwiżiti
Sors Rekwiżit

3. Regolamenti relatati

Regolamenti
Sors Regolamentazzjoni
  • OWASP -

    EN: Publications of the OWASP Foundation, https://owasp.org/. OWASP® is a registered trademark of the OWASP Foundation, Inc.; GRCA is not affiliated with, nor endorsed by, the OWASP Foundation. Only the versions published by OWASP are authoritative.

    DE: Veröffentlichungen der OWASP Foundation, https://owasp.org/. OWASP® ist eine eingetragene Marke der OWASP Foundation, Inc.; GRCA steht in keiner Verbindung zur OWASP Foundation und wird von ihr nicht unterstützt. Maßgeblich sind allein die von OWASP veröffentlichten Fassungen.