Improper Lock Affecting spin package, versions <0.5.2


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.09% (42nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUST-SPIN-460451
  • published29 Aug 2019
  • disclosed27 Aug 2019
  • creditMatt Taylor

Introduced: 27 Aug 2019

CVE-2019-16137  (opens in a new tab)
CWE-667  (opens in a new tab)

How to fix?

Upgrade spin to version 0.5.2 or higher.

Overview

spin is a Rust library that implements a simple spinlock, and is safe for #[no_std] environments.

Affected versions of this package are vulnerable to Improper Lock. Wrong memory orderings inside the RwLock implementation allow for two writers to acquire the lock at the same time. The drop implementation used Ordering::Relaxed, which allows the compiler or CPU to reorder a mutable access on the locked data after the lock has been yielded.

CVSS Scores

version 3.1