Skip to content
  1. Nov 13, 2012
    • Petr Matousek's avatar
      KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461) · 6d1068b3
      Petr Matousek authored
      
      
      On hosts without the XSAVE support unprivileged local user can trigger
      oops similar to the one below by setting X86_CR4_OSXSAVE bit in guest
      cr4 register using KVM_SET_SREGS ioctl and later issuing KVM_RUN
      ioctl.
      
      invalid opcode: 0000 [#2] SMP
      Modules linked in: tun ip6table_filter ip6_tables ebtable_nat ebtables
      ...
      Pid: 24935, comm: zoog_kvm_monito Tainted: G      D      3.2.0-3-686-pae
      EIP: 0060:[<f8b9550c>] EFLAGS: 00210246 CPU: 0
      EIP is at kvm_arch_vcpu_ioctl_run+0x92a/0xd13 [kvm]
      EAX: 00000001 EBX: 000f387e ECX: 00000000 EDX: 00000000
      ESI: 00000000 EDI: 00000000 EBP: ef5a0060 ESP: d7c63e70
       DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
      Process zoog_kvm_monito (pid: 24935, ti=d7c62000 task=ed84a0c0
      task.ti=d7c62000)
      Stack:
       00000001 f70a1200 f8b940a9 ef5a0060 00000000 00200202 f8769009 00000000
       ef5a0060 000f387e eda5c020 8722f9c8 00015bae 00000000 ed84a0c0 ed84a0c0
       c12bf02d 0000ae80 ef7f8740 fffffffb f359b740 ef5a0060 f8b85dc1 0000ae80
      Call Trace:
       [<f8b940a9>] ? kvm_arch_vcpu_ioctl_set_sregs+0x2fe/0x308 [kvm]
      ...
       [<c12bfb44>] ? syscall_call+0x7/0xb
      Code: 89 e8 e8 14 ee ff ff ba 00 00 04 00 89 e8 e8 98 48 ff ff 85 c0 74
      1e 83 7d 48 00 75 18 8b 85 08 07 00 00 31 c9 8b 95 0c 07 00 00 <0f> 01
      d1 c7 45 48 01 00 00 00 c7 45 1c 01 00 00 00 0f ae f0 89
      EIP: [<f8b9550c>] kvm_arch_vcpu_ioctl_run+0x92a/0xd13 [kvm] SS:ESP
      0068:d7c63e70
      
      QEMU first retrieves the supported features via KVM_GET_SUPPORTED_CPUID
      and then sets them later. So guest's X86_FEATURE_XSAVE should be masked
      out on hosts without X86_FEATURE_XSAVE, making kvm_set_cr4 with
      X86_CR4_OSXSAVE fail. Userspaces that allow specifying guest cpuid with
      X86_FEATURE_XSAVE even on hosts that do not support it, might be
      susceptible to this attack from inside the guest as well.
      
      Allow setting X86_CR4_OSXSAVE bit only if host has XSAVE support.
      
      Signed-off-by: default avatarPetr Matousek <pmatouse@redhat.com>
      Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      6d1068b3
  2. Nov 01, 2012
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/virt/kvm/kvm · 8c23f406
      Linus Torvalds authored
      Pull KVM fix from Marcelo Tosatti.
      
      * git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86: fix vcpu->mmio_fragments overflow
      8c23f406
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 1e207eb1
      Linus Torvalds authored
      Pull scsi target fixes from Nicholas Bellinger:
       "These are the current target pending fixes headed for v3.7-rc4 code.
        This includes the following highlights:
      
         - Fix long-standing qla2xxx target bug where certain fc_port_t state
           transitions could cause the internal session b-tree list to become
           out-of-sync.  (Roland)
         - Fix task management double free of se_cmd descriptor in exception
           path for users of target_submit_tmr().  (nab)
         - Re-introduce simple NOP emulation of REZERO_UNIT, SEEK_6, and
           SEEK_10 SCSI-2 commands in order to support legacy initiators that
           still require them.  (Bernhard)
      
        Note these three patches are also CC'ed to stable.
      
        Also, there a couple of outstanding (external) regressions that are
        still being tracked down for tcm_fc(FCoE) and tcm_vhost fabrics for
        v3.7.0 code, so please expect another PULL as these issues identified
        -> resolved."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        target: reintroduce some obsolete SCSI-2 commands
        target: Fix double-free of se_cmd in target_complete_tmr_failure
        qla2xxx: Update target lookup session tables when a target session changes
        tcm_qla2xxx: Format VPD page 83h SCSI name string according to SPC
        qla2xxx: Add missing ->vport_slock while calling qlt_update_vp_map
      1e207eb1
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · ed48c06c
      Linus Torvalds authored
      Pull nouveau fixes from Dave Airlie:
       "Just a nouveau set, since we have a couple of reports on lkml and
        dri-devel of regressions that this should fix I sent it along on its
        own."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/nouveau: headless mode by default if pci class != vga display
        drm/nouveau: resurrect headless mode since rework
        drm/nv50/fb: prevent oops on chipsets without compression tags
        drm/nouveau: allow creation of zero-sized mm
        drm/nouveau/i2c: fix typo when checking nvio i2c port validity
        drm/nouveau: silence modesetting spam on pre-gf8 chipsets
      ed48c06c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · 296bac30
      Linus Torvalds authored
      Pull HID updates from Jiri Kosina:
       "This contains fixes for two devices by Jiri Slaby and Xianhan Yu, new
        device IDs for MacBook Pro 10,2 from Dirk Hohndel and generic
        multitouch code fix from Alan Cox."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
        HID: Add support for the MacBook Pro 10,2 keyboard / touchpad
        HID: multitouch: fix maxcontacts problem on GeneralTouch
        HID: multitouch: put the case in the right switch statement
        HID: microsoft: fix invalid rdesc for 3k kbd
      296bac30
    • Linus Torvalds's avatar
      Merge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 33046957
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "This contains unexpectedly many changes in a wide range due to the
        fixes for races at disconnection of USB audio devices.  In the end, we
        end up covering fairly core parts of sound subsystem.
      
        Other than that, just a few usual small fixes."
      
      * tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: ice1724: Fix rate setup after resume
        ALSA: Avoid endless sleep after disconnect
        ALSA: Add a reference counter to card instance
        ALSA: usb-audio: Fix races at disconnection in mixer_quirks.c
        ALSA: usb-audio: Use rwsem for disconnect protection
        ALSA: usb-audio: Fix races at disconnection
        ALSA: PCM: Fix some races at disconnection
        ASoC: omap-dmic: Correct functional clock name
        ASoC: zoom2: Fix compile error by including correct header files
        ALSA: hda - Fix mute-LED setup for HP dv5 laptop
      33046957
    • Xiao Guangrong's avatar
      KVM: x86: fix vcpu->mmio_fragments overflow · 87da7e66
      Xiao Guangrong authored
      
      
      After commit b3356bf0 (KVM: emulator: optimize "rep ins" handling),
      the pieces of io data can be collected and write them to the guest memory
      or MMIO together
      
      Unfortunately, kvm splits the mmio access into 8 bytes and store them to
      vcpu->mmio_fragments. If the guest uses "rep ins" to move large data, it
      will cause vcpu->mmio_fragments overflow
      
      The bug can be exposed by isapc (-M isapc):
      
      [23154.818733] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
      [ ......]
      [23154.858083] Call Trace:
      [23154.859874]  [<ffffffffa04f0e17>] kvm_get_cr8+0x1d/0x28 [kvm]
      [23154.861677]  [<ffffffffa04fa6d4>] kvm_arch_vcpu_ioctl_run+0xcda/0xe45 [kvm]
      [23154.863604]  [<ffffffffa04f5a1a>] ? kvm_arch_vcpu_load+0x17b/0x180 [kvm]
      
      Actually, we can use one mmio_fragment to store a large mmio access then
      split it when we pass the mmio-exit-info to userspace. After that, we only
      need two entries to store mmio info for the cross-mmio pages access
      
      Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      87da7e66
  3. Oct 31, 2012
  4. Oct 30, 2012