CVE-2022-49080
mm/mempolicy: fix mpol_new leak in shared_policy_replace
Summary
Descriptions
In the Linux kernel, the following vulnerability has been resolved: mm/mempolicy: fix mpol_new leak in shared_policy_replace If mpol_new is allocated but not used in restart loop, mpol_new will be
freed via mpol_put before returning to the caller. But refcnt is not
initialized yet, so mpol_put could not do the right things and might
leak the unused mpol_new. This would happen if mempolicy was updated on
the shared shmem file while the sp->lock has been dropped during the
memory allocation. This issue could be triggered easily with the below code snippet if
there are many processes doing the below work at the same time: shmid = shmget((key_t)5566, 1024 * PAGE_SIZE, 0666|IPC_CREAT); shm = shmat(shmid, 0, 0); loop many times { mbind(shm, 1024 * PAGE_SIZE, MPOL_LOCAL, mask, maxnode, 0); mbind(shm + 128 * PAGE_SIZE, 128 * PAGE_SIZE, MPOL_DEFAULT, mask, maxnode, 0); }
CVSS Scores
SSVC
- Decision:-
Timeline
- 2025-02-26 CVE Reserved
- 2025-02-26 CVE Published
- 2025-02-26 CVE Updated
- ---------- EPSS Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
CAPEC
Threat Intelligence Resources (0)
Select | Title | Date |
---|
Select an advisory to view details here.
Select | Title | Date |
---|
Select an exploit to view details here.
References (10)
URL | Tag | Source |
---|---|---|
https://git.kernel.org/stable/c/42288fe366c4f1ce7522bc9f27d0bc2a81c55264 | Vuln. Introduced |
URL | Date | SRC |
---|
URL | Date | SRC |
---|
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 3.8 < 4.9.311 Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 4.9.311" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 3.8 < 4.14.276 Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 4.14.276" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 3.8 < 4.19.238 Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 4.19.238" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 3.8 < 5.4.189 Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 5.4.189" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 3.8 < 5.10.111 Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 5.10.111" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 3.8 < 5.15.34 Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 5.15.34" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 3.8 < 5.16.20 Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 5.16.20" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 3.8 < 5.17.3 Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 5.17.3" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 3.8 < 5.18 Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 5.18" | en |
Affected
|