In the Linux kernel, the following vulnerability has been resolved: ipc/shm: serialize orphan cleanup with shm_nattch updates shm_destroy_orphaned() walks the shm idr under shm_ids(ns).rwsem, but that does not serialize all fields tested by shm_may_destroy(). In particular, shm_nattch is updated while holding shm_perm.lock, and attach paths can do that without holding the rwsem. Do not decide that an orphaned segment is unused before taking the object lock. Move the shm_may_destroy() check under shm_perm.lock, matching the other destroy paths, and unlock the segment when it no longer qualifies for removal.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
| Attack Vector | LOCAL |
|---|---|
| Attack Complexity | LOW |
| Privileges Required | LOW |
| User Interaction | NONE |
| Scope | UNCHANGED |
| Confidentiality Impact | NONE |
| Integrity Impact | NONE |
| Availability Impact | HIGH |
| 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 0x7d239fbe9940> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d23af077b40> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d239fbead40> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d239fbe9100> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d239fbeb740> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d239fbea200> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d23af077480> | Operating System |
| linux | linux_kernel | 7.1 | <built-in method update of dict object at 0x7d23a59caac0> | Operating System |
| linux | linux_kernel | 7.1 | <built-in method update of dict object at 0x7d23a59c9200> | Operating System |
| linux | linux_kernel | 7.1 | <built-in method update of dict object at 0x7d239fbeae40> | Operating System |
| linux | linux_kernel | 7.1 | <built-in method update of dict object at 0x7d23a59cb080> | Operating System |
| linux | linux_kernel | 7.1 | <built-in method update of dict object at 0x7d23a59ca040> | Operating System |
| linux | linux_kernel | 7.1 | <built-in method update of dict object at 0x7d239fbe8200> | Operating System |
| linux | linux_kernel | 7.1 | <built-in method update of dict object at 0x7d23af075f00> | 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:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| 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:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:7.1:rc7:*:*:*:*:*:* |