CVE-2022-49080

mm/mempolicy: fix mpol_new leak in shared_policy_replace

No CVSS score yet EPSS 0.31%

Published 26 Feb 2025 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2022-49080

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-49080 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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); }

Exploitation

EPSS 0.31%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 26.0% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 42288fe366c4f1ce7522bc9f27d0bc2a81c55264, before 8510c2346d9e47a72b7f018a36ef0c39483e53d6
affected from 42288fe366c4f1ce7522bc9f27d0bc2a81c55264, before 5e16dc5378abd749a836daa9ee4ab2c8d2668999
affected from 42288fe366c4f1ce7522bc9f27d0bc2a81c55264, before 39a32f3c06f6d68a530bf9612afa19f50f12e93d
affected from 42288fe366c4f1ce7522bc9f27d0bc2a81c55264, before 25f506273b6ae806fd46bfcb6fdaa5b9ec81a05b
affected from 42288fe366c4f1ce7522bc9f27d0bc2a81c55264, before f7e183b0a7136b6dc9c7b9b2a85a608a8feba894
affected from 42288fe366c4f1ce7522bc9f27d0bc2a81c55264, before 198932a14aeb19a15cf19e51e151d023bc4cd648
affected from 42288fe366c4f1ce7522bc9f27d0bc2a81c55264, before 6e00309ac716fa8225f0cbde2cd9c24f0e74ee21
affected from 42288fe366c4f1ce7522bc9f27d0bc2a81c55264, before fe39ac59dbbf893b73b24e3184161d0bd06d6651
affected from 42288fe366c4f1ce7522bc9f27d0bc2a81c55264, before 4ad099559b00ac01c3726e5c95dc3108ef47d03e
Other versions: unaffected
Linux
affected 3.8
unaffected before 3.8
unaffected from 4.9.311 up to and including 4.9.*
unaffected from 4.14.276 up to and including 4.14.*
unaffected from 4.19.238 up to and including 4.19.*
unaffected from 5.4.189 up to and including 5.4.*
unaffected from 5.10.111 up to and including 5.10.*
unaffected from 5.15.34 up to and including 5.15.*
unaffected from 5.16.20 up to and including 5.16.*
unaffected from 5.17.3 up to and including 5.17.*
unaffected 5.18 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2022-49080 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-49080

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2022-49080
trivy image --scanners vuln IMAGE | grep CVE-2022-49080

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2022-49080 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.