{"id":"CVE-2022-48764","summary":"KVM: x86: Free kvm_cpuid_entry2 array on post-KVM_RUN KVM_SET_CPUID{,2}","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: x86: Free kvm_cpuid_entry2 array on post-KVM_RUN KVM_SET_CPUID{,2}\n\nFree the \"struct kvm_cpuid_entry2\" array on successful post-KVM_RUN\nKVM_SET_CPUID{,2} to fix a memory leak, the callers of kvm_set_cpuid()\nfree the array only on failure.\n\n BUG: memory leak\n unreferenced object 0xffff88810963a800 (size 2048):\n  comm \"syz-executor025\", pid 3610, jiffies 4294944928 (age 8.080s)\n  hex dump (first 32 bytes):\n    00 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00  ................\n    47 65 6e 75 6e 74 65 6c 69 6e 65 49 00 00 00 00  GenuntelineI....\n  backtrace:\n    [\u003cffffffff814948ee\u003e] kmalloc_node include/linux/slab.h:604 [inline]\n    [\u003cffffffff814948ee\u003e] kvmalloc_node+0x3e/0x100 mm/util.c:580\n    [\u003cffffffff814950f2\u003e] kvmalloc include/linux/slab.h:732 [inline]\n    [\u003cffffffff814950f2\u003e] vmemdup_user+0x22/0x100 mm/util.c:199\n    [\u003cffffffff8109f5ff\u003e] kvm_vcpu_ioctl_set_cpuid2+0x8f/0xf0 arch/x86/kvm/cpuid.c:423\n    [\u003cffffffff810711b9\u003e] kvm_arch_vcpu_ioctl+0xb99/0x1e60 arch/x86/kvm/x86.c:5251\n    [\u003cffffffff8103e92d\u003e] kvm_vcpu_ioctl+0x4ad/0x950 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4066\n    [\u003cffffffff815afacc\u003e] vfs_ioctl fs/ioctl.c:51 [inline]\n    [\u003cffffffff815afacc\u003e] __do_sys_ioctl fs/ioctl.c:874 [inline]\n    [\u003cffffffff815afacc\u003e] __se_sys_ioctl fs/ioctl.c:860 [inline]\n    [\u003cffffffff815afacc\u003e] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:860\n    [\u003cffffffff844a3335\u003e] do_syscall_x64 arch/x86/entry/common.c:50 [inline]\n    [\u003cffffffff844a3335\u003e] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80\n    [\u003cffffffff84600068\u003e] entry_SYSCALL_64_after_hwframe+0x44/0xae","modified":"2026-04-02T08:26:59.180227Z","published":"2024-06-20T11:13:41.170Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48764.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/811f95ff95270e6048197821434d9301e3d7f07c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b9ee734a14bb685b2088f2176d82b34cb4e30dbc"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48764.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-48764"},{"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":"24e7590c60aa9487b8e43583dc9885f62f8216c1"},{"fixed":"b9ee734a14bb685b2088f2176d82b34cb4e30dbc"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"c6617c61e8fe44b9e9fdfede921f61cac6b5149d"},{"fixed":"811f95ff95270e6048197821434d9301e3d7f07c"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-48764.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"}]}