[prev in list] [next in list] [prev in thread] [next in thread] 

List:       oss-security
Subject:    [oss-security] CVE request: kvm: integer overflow in kvm_dev_ioctl_get_supported_cpuid()
From:       Eugene Teo <eugeneteo () kernel ! sg>
Date:       2009-10-23 9:12:23
Message-ID: 4AE17377.6050909 () kernel ! sg
[Download RAW message or body]

Quote from the upstream commit:
"The number of entries is multiplied by the entry size, which can 
overflow on 32-bit hosts.  Bound the entry count instead."

   if (cpuid->nent < 1)
    goto out;
+ if (cpuid->nent > KVM_MAX_CPUID_ENTRIES)
+  cpuid->nent = KVM_MAX_CPUID_ENTRIES;
   r = -ENOMEM;
   cpuid_entries = vmalloc(sizeof(struct kvm_cpuid_entry2) * cpuid->nent);
   if (!cpuid_entries)

This one can be triggered if /dev/kvm is user accessible (which is
recommended...). This was introduced in v2.6.25-rc1, and fixed in 
v2.6.32-rc4. Only on 32-bit host.

References:
http://git.kernel.org/linus/0771671749b59a507b6da4efb931c44d9691e248
http://git.kernel.org/linus/6a54435560efdab1a08f429a954df4d6c740bddf
https://bugzilla.redhat.com/show_bug.cgi?id=530515

Thanks, Eugene
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic