{"id":"CVE-2022-49989","summary":"xen/privcmd: fix error exit of privcmd_ioctl_dm_op()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nxen/privcmd: fix error exit of privcmd_ioctl_dm_op()\n\nThe error exit of privcmd_ioctl_dm_op() is calling unlock_pages()\npotentially with pages being NULL, leading to a NULL dereference.\n\nAdditionally lock_pages() doesn't check for pin_user_pages_fast()\nhaving been completely successful, resulting in potentially not\nlocking all pages into memory. This could result in sporadic failures\nwhen using the related memory in user mode.\n\nFix all of that by calling unlock_pages() always with the real number\nof pinned pages, which will be zero in case pages being NULL, and by\nchecking the number of pages pinned by pin_user_pages_fast() matching\nthe expected number of pages.","modified":"2026-04-03T13:14:35.583257863Z","published":"2025-06-18T11:00:50.126Z","related":["SUSE-SU-2025:02264-1","SUSE-SU-2025:02308-1","SUSE-SU-2025:02320-1","SUSE-SU-2025:02321-1","SUSE-SU-2025:02322-1","SUSE-SU-2025:02537-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49989.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/45d47bd9b96e7874b98dbcc7602fe2826c5d62a6"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6de50db104af0dc921f593fd95c55db86a52ceef"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c2b7bae7c90051fd6a679d5dee00400d67ebbf4a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c5deb27895e017a0267de0a20d140ad5fcc55a54"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49989.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49989"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"ab520be8cd5d56867fc95cfbc34b90880faf1f9d"},{"fixed":"6de50db104af0dc921f593fd95c55db86a52ceef"},{"fixed":"c2b7bae7c90051fd6a679d5dee00400d67ebbf4a"},{"fixed":"45d47bd9b96e7874b98dbcc7602fe2826c5d62a6"},{"fixed":"c5deb27895e017a0267de0a20d140ad5fcc55a54"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49989.json"}}],"schema_version":"1.7.5"}