
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2021-46921 is a vulnerability in the Linux kernel's locking mechanism, specifically in the queued read-write lock (qrwlock) implementation. The issue was discovered in the queued_write_lock_slowpath() function where there was an ordering problem in the lock acquisition process (Kernel Commit).
The vulnerability occurs because while the code is executed with the wait_lock held, a reader can acquire the lock without holding wait_lock. The writer side checks the value with atomic_cond_read_acquire(), but only truly acquires the lock when the compare-and-exchange completes successfully. This creates a window between the acquire and the cmpxchg operations that exposes an A-B-A problem, allowing reads following the lock acquisition to observe values speculatively before the write lock is truly acquired (Kernel Commit).
The vulnerability can lead to race conditions where a reader might observe incorrect values due to speculative execution before the write lock is properly acquired. This was specifically observed in epoll where a reader performing an exchange operation while holding the read lock could result in the writer seeing values change unexpectedly (Kernel Commit).
The issue has been fixed by switching the cmpxchg to use acquire semantics and changing the atomic_cond_read to use relaxed semantics. The fix was implemented in the Linux kernel through a patch that modifies the queued_write_lock_slowpath() function (Kernel Commit).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."