Linux Kernel up to 5.11.16 qrwlock queued_write_lock_slowpath comparison

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 5.3 | $0-$5k | 0.00 |
Summary
A vulnerability was found in Linux Kernel up to 4.19.188/5.4.114/5.10.32/5.11/5.11.16 and classified as problematic. The impacted element is the function queued_write_lock_slowpath of the component qrwlock. Such manipulation leads to comparison.
This vulnerability is listed as CVE-2021-46921. There is no available exploit.
It is suggested to upgrade the affected component.
Details
A vulnerability was found in Linux Kernel up to 4.19.188/5.4.114/5.10.32/5.11/5.11.16 (Operating System). It has been rated as problematic. Affected by this issue is the function queued_write_lock_slowpath of the component qrwlock. The manipulation with an unknown input leads to a comparison vulnerability. Using CWE to declare the problem leads to CWE-697. The product compares two entities in a security-relevant context, but the comparison is incorrect, which may lead to resultant weaknesses. The impact remains unknown. CVE summarizes:
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()]
The weakness was presented 02/27/2024. The advisory is shared for download at git.kernel.org. This vulnerability is handled as CVE-2021-46921 since 02/25/2024. There are known technical details, but no exploit is available.
Upgrading to version 4.19.189, 5.4.115, 5.10.33, 5.11.17 or 5.12 eliminates this vulnerability. Applying the patch 5902f9453a31/82808cc02681/82fa9ced35d8/d558fcdb1713/84a24bf8c52e is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Product
Type
Vendor
Name
Version
- 4.19.188
- 5.0
- 5.1
- 5.2
- 5.3
- 5.4
- 5.4.114
- 5.5
- 5.6
- 5.7
- 5.8
- 5.9
- 5.10
- 5.10.0
- 5.10.1
- 5.10.2
- 5.10.3
- 5.10.4
- 5.10.5
- 5.10.6
- 5.10.7
- 5.10.8
- 5.10.9
- 5.10.10
- 5.10.11
- 5.10.12
- 5.10.13
- 5.10.14
- 5.10.15
- 5.10.16
- 5.10.17
- 5.10.18
- 5.10.19
- 5.10.20
- 5.10.21
- 5.10.22
- 5.10.23
- 5.10.24
- 5.10.25
- 5.10.26
- 5.10.27
- 5.10.28
- 5.10.29
- 5.10.30
- 5.10.31
- 5.10.32
- 5.11
- 5.11.0
- 5.11.1
- 5.11.2
- 5.11.3
- 5.11.4
- 5.11.5
- 5.11.6
- 5.11.7
- 5.11.8
- 5.11.9
- 5.11.10
- 5.11.11
- 5.11.12
- 5.11.13
- 5.11.14
- 5.11.15
- 5.11.16
License
Website
- Vendor: https://www.kernel.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 5.5VulDB Meta Temp Score: 5.3
VulDB Base Score: 5.5
VulDB Temp Score: 5.3
VulDB Vector: 🔍
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Exploiting
Class: ComparisonCWE: CWE-697
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Partially
Availability: 🔍
Status: Not defined
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Upgrade: Kernel 4.19.189/5.4.115/5.10.33/5.11.17/5.12
Patch: 5902f9453a31/82808cc02681/82fa9ced35d8/d558fcdb1713/84a24bf8c52e
Timeline
02/25/2024 🔍02/27/2024 🔍
02/27/2024 🔍
02/27/2024 🔍
Sources
Vendor: kernel.orgAdvisory: git.kernel.org
Status: Confirmed
CVE: CVE-2021-46921 (🔍)
GCVE (CVE): GCVE-0-2021-46921
GCVE (VulDB): GCVE-100-254888
Entry
Created: 02/27/2024 11:09Changes: 02/27/2024 11:09 (43)
Complete: 🔍
Cache ID: 216::103
VulDB is the best source for vulnerability data and more expert information about this specific topic.
No comments yet. Languages: en.
Please log in to comment.