{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-49080","id":"CVE-2022-49080","title":"mm/mempolicy: fix mpol_new leak in shared_policy_replace","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mempolicy: fix mpol_new leak in shared_policy_replace\n\nIf mpol_new is allocated but not used in restart loop, mpol_new will be\nfreed via mpol_put before returning to the caller.  But refcnt is not\ninitialized yet, so mpol_put could not do the right things and might\nleak the unused mpol_new.  This would happen if mempolicy was ","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mempolicy: fix mpol_new leak in shared_policy_replace\n\nIf mpol_new is allocated but not used in restart loop, mpol_new will be\nfreed via mpol_put before returning to the caller.  But refcnt is not\ninitialized yet, so mpol_put could not do the right things and might\nleak the unused mpol_new.  This would happen if mempolicy was updated on\nthe shared shmem file while the sp->lock has been dropped during the\nmemory allocation.\n\nThis issue could be triggered easily with the below code snippet if\nthere are many processes doing the below work at the same time:\n\n  shmid = shmget((key_t)5566, 1024 * PAGE_SIZE, 0666|IPC_CREAT);\n  shm = shmat(shmid, 0, 0);\n  loop many times {\n    mbind(shm, 1024 * PAGE_SIZE, MPOL_LOCAL, mask, maxnode, 0);\n    mbind(shm + 128 * PAGE_SIZE, 128 * PAGE_SIZE, MPOL_DEFAULT, mask,\n          maxnode, 0);\n  }","published":"2025-02-26T01:54:41.176Z","updated":"2026-10-28T02:30:34.933706556Z","reserved":"2025-02-26T01:49:39.247Z","status":"Analyzed","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"42288fe366c4f1ce7522bc9f27d0bc2a81c55264","lessThan":"8510c2346d9e47a72b7f018a36ef0c39483e53d6","status":"affected","versionType":"git"},{"version":"42288fe366c4f1ce7522bc9f27d0bc2a81c55264","lessThan":"5e16dc5378abd749a836daa9ee4ab2c8d2668999","status":"affected","versionType":"git"},{"version":"42288fe366c4f1ce7522bc9f27d0bc2a81c55264","lessThan":"39a32f3c06f6d68a530bf9612afa19f50f12e93d","status":"affected","versionType":"git"},{"version":"42288fe366c4f1ce7522bc9f27d0bc2a81c55264","lessThan":"25f506273b6ae806fd46bfcb6fdaa5b9ec81a05b","status":"affected","versionType":"git"},{"version":"42288fe366c4f1ce7522bc9f27d0bc2a81c55264","lessThan":"f7e183b0a7136b6dc9c7b9b2a85a608a8feba894","status":"affected","versionType":"git"},{"version":"42288fe366c4f1ce7522bc9f27d0bc2a81c55264","lessThan":"198932a14aeb19a15cf19e51e151d023bc4cd648","status":"affected","versionType":"git"},{"version":"42288fe366c4f1ce7522bc9f27d0bc2a81c55264","lessThan":"6e00309ac716fa8225f0cbde2cd9c24f0e74ee21","status":"affected","versionType":"git"},{"version":"42288fe366c4f1ce7522bc9f27d0bc2a81c55264","lessThan":"fe39ac59dbbf893b73b24e3184161d0bd06d6651","status":"affected","versionType":"git"},{"version":"42288fe366c4f1ce7522bc9f27d0bc2a81c55264","lessThan":"4ad099559b00ac01c3726e5c95dc3108ef47d03e","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.8","status":"affected"},{"version":"0","lessThan":"3.8","status":"unaffected","versionType":"semver"},{"version":"4.9.311","lessThanOrEqual":"4.9.*","status":"unaffected","versionType":"semver"},{"version":"4.14.276","lessThanOrEqual":"4.14.*","status":"unaffected","versionType":"semver"},{"version":"4.19.238","lessThanOrEqual":"4.19.*","status":"unaffected","versionType":"semver"},{"version":"5.4.189","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.111","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.34","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"5.16.20","lessThanOrEqual":"5.16.*","status":"unaffected","versionType":"semver"},{"version":"5.17.3","lessThanOrEqual":"5.17.*","status":"unaffected","versionType":"semver"},{"version":"5.18","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-401"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/8510c2346d9e47a72b7f018a36ef0c39483e53d6","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/5e16dc5378abd749a836daa9ee4ab2c8d2668999","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/39a32f3c06f6d68a530bf9612afa19f50f12e93d","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/25f506273b6ae806fd46bfcb6fdaa5b9ec81a05b","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/f7e183b0a7136b6dc9c7b9b2a85a608a8feba894","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/198932a14aeb19a15cf19e51e151d023bc4cd648","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/6e00309ac716fa8225f0cbde2cd9c24f0e74ee21","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/fe39ac59dbbf893b73b24e3184161d0bd06d6651","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/4ad099559b00ac01c3726e5c95dc3108ef47d03e","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49080.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49080","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00312,"epssPercentile":0.24498,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-49080","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49080","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-49080","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-49080","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}