In the Linux kernel, the following vulnerability has been resolved: dm cache policy smq: check allocation under invalidate lock commit 2d1f7b65f5de ("dm cache policy smq: fix missing locks in invalidating cache blocks") added mq->lock around the destructive part of smq_invalidate_mapping(), but left the e->allocated check outside the critical section. That leaves a check-then-act race. Two concurrent invalidators can both observe e->allocated as true before either of them takes mq->lock. The first invalidator that acquires the lock removes the entry from the queues and hash table and then calls free_entry(), which clears e->allocated and puts the entry back on the free list. The second invalidator can then acquire mq->lock and continue with the stale result of the unlocked check. This can corrupt the SMQ queues or hash table by deleting an entry that is no longer on those structures. It can also hit the allocation check in free_entry() when the same entry is freed again. Move the allocation check under mq->lock so the predicate and the destructive operations are serialized by the same lock.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
| Attack Vector | LOCAL |
|---|---|
| Attack Complexity | LOW |
| Privileges Required | LOW |
| User Interaction | NONE |
| Scope | UNCHANGED |
| Confidentiality Impact | HIGH |
| Integrity Impact | HIGH |
| Availability Impact | HIGH |
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Type: Secondary
Exploitability Score: 1.8
Impact Score: 5.9
| Source | Type | Description |
|---|---|---|
| [email protected] | Primary |
en
NVD-CWE-noinfo
|
| Vendor | Product | Version | Update | Type |
|---|---|---|---|---|
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd36b7d61c0> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd36a9ad680> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd3855da540> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd39c4781c0> | Operating System |
| linux | linux_kernel | 5.10.258 | <built-in method update of dict object at 0x7fd36b7d4d80> | Operating System |
| linux | linux_kernel | 5.15.209 | <built-in method update of dict object at 0x7fd3855dad00> | Operating System |
| linux | linux_kernel | 6.1.175 | <built-in method update of dict object at 0x7fd34122e240> | Operating System |
| linux | linux_kernel | 7.1 | <built-in method update of dict object at 0x7fd319c75100> | Operating System |
| linux | linux_kernel | 7.1 | <built-in method update of dict object at 0x7fd319c77f00> | Operating System |
| linux | linux_kernel | 7.1 | <built-in method update of dict object at 0x7fd36b7d5180> | Operating System |
| linux | linux_kernel | 7.1 | <built-in method update of dict object at 0x7fd3697d46c0> | Operating System |
| linux | linux_kernel | 7.1 | <built-in method update of dict object at 0x7fd319c76840> | Operating System |
| linux | linux_kernel | 7.1 | <built-in method update of dict object at 0x7fd36a03d7c0> | Operating System |
| Vulnerable | CPE |
|---|---|
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:5.10.258:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:5.15.209:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:6.1.175:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:7.1:rc4:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:7.1:rc5:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:7.1:rc6:*:*:*:*:*:* |