CVE-2021-46921: locking/qrwlock: Fix ordering in queued_write_lock_slowpath()
In the Linux kernel, the following vulnerability has been resolved:
locking/qrwlock: Fix ordering in queued_write_lock_slowpath()
While this code is executed with the wait_lock held, a reader can
acquire the lock without holding wait_lock. The writer side loops
checking the value with the atomic_cond_read_acquire(), but only truly
acquires the lock when the compare-and-exchange is completed
successfully which isn’t ordered. This exposes the window between the
acquire and the cmpxchg to an A-B-A problem which allows reads
following the lock acquisition to observe values speculatively before
the write lock is truly acquired.
We've seen a problem in epoll where the reader does a xchg while
holding the read lock, but the writer can see a value change out from
under it.
Writer | Reader
--------------------------------------------------------------------------------
ep_scan_ready_list() |
|- write_lock_irq() |
|- queued_write_lock_slowpath() |
|- atomic_cond_read_acquire() |
| read_lock_irqsave(&ep->lock, flags);
--> (observes value before unlock) | chain_epi_lockless()
| | epi->next = xchg(&ep->ovflist, epi);
| | read_unlock_irqrestore(&ep->lock, flags);
| |
| atomic_cmpxchg_relaxed() |
|-- READ_ONCE(ep->ovflist); |
A core can order the read of the ovflist ahead of the
atomic_cmpxchg_relaxed(). Switching the cmpxchg to use acquire
semantics addresses this issue at which point the atomic_cond_read can
be switched to use relaxed semantics.
[peterz: use try_cmpxchg()]
Security readout for executives and security teams
Plain-English summary
This Linux kernel issue is a low-level locking bug that can let code observe inconsistent state during concurrent access. The source describes an observed epoll race, but provides no CVSS score, CWE, active exploitation claim, or impact severity.
Executive priority
Treat this as a kernel maintenance and reliability risk until vendor scoring clarifies impact. Prioritize routine patch cycles for internet-facing and high-availability Linux systems, but do not escalate as actively exploited based on the provided evidence.
Technical view
In queued_write_lock_slowpath(), the writer loop used acquire semantics before a relaxed compare-and-exchange. That ordering gap created an A-B-A window where reads after apparent write-lock acquisition could be observed before the lock was truly acquired. The fix changes the successful compare-and-exchange ordering.
Likely exposure
Exposure is limited to Linux systems running affected kernel versions or downstream builds without the stable fix. The bundle lists Linux 4.15, 4.19.189, 5.4.115, 5.10.33, 5.11.17, and 5.12 as affected.
Exploitation context
The bundle does not support active exploitation: KEV is false, and no cited source claims public exploitation. It describes a kernel concurrency failure observed in epoll, not a weaponized attack path.
Researcher notes
The key issue is memory ordering in queued write-lock acquisition. Validate whether downstream kernels include the acquire-semantics change for the compare-and-exchange path. The source bundle lacks CVSS, CWE, exploitability analysis, and distro-specific package status.
Mitigation direction
Apply vendor-supported Linux kernel updates containing the stable qrwlock fix.
Confirm distro backports rather than relying only on upstream version numbers.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-46921 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.