Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Exposing the lock object to untrusted code can result in DoS.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

LCK00-J

low

probable

medium

P4

L3

Automated Detection

ToolVersionCheckerDescription
The Checker Framework

Include Page
The Checker Framework_V
The Checker Framework_V

Lock CheckerConcurrency and lock errors (see Chapter 6)
CodeSonar
Include Page
CodeSonar_V
CodeSonar_V

JAVA.CONCURRENCY.LOCK.ISTR

Synchronization on Interned String (Java)

Parasoft Jtest
Include Page
Parasoft_V
Parasoft_V
TRS
CERT.LCK00.SOPF
Implemented
Do not synchronize on "public" fields since doing so may cause deadlocks
SonarQube
Include Page
SonarQube_V
SonarQube_V
S2445
 

Related Guidelines

MITRE CWE

CWE-412. Unrestricted externally accessible lock

 


CWE-413. Improper resource locking

Bibliography

[Bloch 2001]

Item 52. Document Thread Safety

...