Bug 1066707 (CVE-2017-15306)

Summary: VUL-0: CVE-2017-15306: kernel: KVM: PPC: Fix oops when checking KVM_CAP_PPC_HTM
Product: [Novell Products] SUSE Security Incidents Reporter: Johannes Segitz <jsegitz>
Component: IncidentsAssignee: Security Team bot <security-team>
Status: RESOLVED INVALID QA Contact: Security Team bot <security-team>
Severity: Normal    
Priority: P5 - None CC: smash_bz
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/194546/
Whiteboard:
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Johannes Segitz 2017-11-06 15:59:41 UTC
CVE-2017-15306

From: Michael Ellerman 

Hi folks,

Greg Kurz discovered a local denial of service (kernel oops) in the KVM
code for powerpc.

From his report:

    The following program causes a kernel oops:
    
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <fcntl.h>
    #include <sys/ioctl.h>
    #include <linux/kvm.h>
    
    main()
    {
        int fd = open("/dev/kvm", O_RDWR);
        ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_PPC_HTM);
    }
    
    This happens because when using the global KVM fd with
    KVM_CHECK_EXTENSION, kvm_vm_ioctl_check_extension() gets
    called with a NULL kvm argument, which gets dereferenced
    in is_kvmppc_hv_enabled().


The bug was introduced in commit:

  23528bb21ee2 ("KVM: PPC: Introduce KVM_CAP_PPC_HTM")

Which was merged into kernel 4.8-rc1.

The fix is now in mainline:

  ac64115a66c1 ("KVM: PPC: Fix oops when checking KVM_CAP_PPC_HTM")


References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-15306
http://seclists.org/oss-sec/2017/q4/221
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-15306
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ac64115a66c1
Comment 1 Johannes Segitz 2017-11-06 15:59:57 UTC
doesn't affect us, just for tracking