1. 08 Dec, 2017 2 commits
  2. 07 Dec, 2017 8 commits
  3. 06 Dec, 2017 25 commits
  4. 05 Dec, 2017 5 commits
    • Robb Glasser's avatar
      ALSA: pcm: prevent UAF in snd_pcm_info · 362bca57
      Robb Glasser authored
      When the device descriptor is closed, the `substream->runtime` pointer
      is freed. But another thread may be in the ioctl handler, case
      SNDRV_CTL_IOCTL_PCM_INFO. This case calls snd_pcm_info_user() which
      calls snd_pcm_info() which accesses the now freed `substream->runtime`.
      
      Note: this fixes CVE-2017-0861
      Signed-off-by: default avatarRobb Glasser <rglasser@google.com>
      Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      362bca57
    • George Cherian's avatar
      ACPI / CPPC: Fix KASAN global out of bounds warning · 1ecbd717
      George Cherian authored
      Default value of pcc_subspace_idx is -1.
      Make sure to check pcc_subspace_idx before using the same as array index.
      This will avoid following KASAN warnings too.
      
      [   15.113449] ==================================================================
      [   15.116983] BUG: KASAN: global-out-of-bounds in cppc_get_perf_caps+0xf3/0x3b0
      [   15.116983] Read of size 8 at addr ffffffffb9a5c0d8 by task swapper/0/1
      [   15.116983] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 4.15.0-rc2+ #2
      [   15.116983] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.2.8 01/26/2016
      [   15.116983] Call Trace:
      [   15.116983]  dump_stack+0x7c/0xbb
      [   15.116983]  print_address_description+0x1df/0x290
      [   15.116983]  kasan_report+0x28a/0x370
      [   15.116983]  ? cppc_get_perf_caps+0xf3/0x3b0
      [   15.116983]  cppc_get_perf_caps+0xf3/0x3b0
      [   15.116983]  ? cpc_read+0x210/0x210
      [   15.116983]  ? __rdmsr_on_cpu+0x90/0x90
      [   15.116983]  ? rdmsrl_on_cpu+0xa9/0xe0
      [   15.116983]  ? rdmsr_on_cpu+0x100/0x100
      [   15.116983]  ? wrmsrl_on_cpu+0x9c/0xd0
      [   15.116983]  ? wrmsrl_on_cpu+0x9c/0xd0
      [   15.116983]  ? wrmsr_on_cpu+0xe0/0xe0
      [   15.116983]  __intel_pstate_cpu_init.part.16+0x3a2/0x530
      [   15.116983]  ? intel_pstate_init_cpu+0x197/0x390
      [   15.116983]  ? show_no_turbo+0xe0/0xe0
      [   15.116983]  ? __lockdep_init_map+0xa0/0x290
      [   15.116983]  intel_pstate_cpu_init+0x30/0x60
      [   15.116983]  cpufreq_online+0x155/0xac0
      [   15.116983]  cpufreq_add_dev+0x9b/0xb0
      [   15.116983]  subsys_interface_register+0x1ae/0x290
      [   15.116983]  ? bus_unregister_notifier+0x40/0x40
      [   15.116983]  ? mark_held_locks+0x83/0xb0
      [   15.116983]  ? _raw_write_unlock_irqrestore+0x32/0x60
      [   15.116983]  ? intel_pstate_setup+0xc/0x104
      [   15.116983]  ? intel_pstate_setup+0xc/0x104
      [   15.116983]  ? cpufreq_register_driver+0x1ce/0x2b0
      [   15.116983]  cpufreq_register_driver+0x1ce/0x2b0
      [   15.116983]  ? intel_pstate_setup+0x104/0x104
      [   15.116983]  intel_pstate_register_driver+0x3a/0xa0
      [   15.116983]  intel_pstate_init+0x3c4/0x434
      [   15.116983]  ? intel_pstate_setup+0x104/0x104
      [   15.116983]  ? intel_pstate_setup+0x104/0x104
      [   15.116983]  do_one_initcall+0x9c/0x206
      [   15.116983]  ? parameq+0xa0/0xa0
      [   15.116983]  ? initcall_blacklisted+0x150/0x150
      [   15.116983]  ? lock_downgrade+0x2c0/0x2c0
      [   15.116983]  kernel_init_freeable+0x327/0x3f0
      [   15.116983]  ? start_kernel+0x612/0x612
      [   15.116983]  ? _raw_spin_unlock_irq+0x29/0x40
      [   15.116983]  ? finish_task_switch+0xdd/0x320
      [   15.116983]  ? finish_task_switch+0x8e/0x320
      [   15.116983]  ? rest_init+0xd0/0xd0
      [   15.116983]  kernel_init+0xf/0x11a
      [   15.116983]  ? rest_init+0xd0/0xd0
      [   15.116983]  ret_from_fork+0x24/0x30
      
      [   15.116983] The buggy address belongs to the variable:
      [   15.116983]  __key.36299+0x38/0x40
      
      [   15.116983] Memory state around the buggy address:
      [   15.116983]  ffffffffb9a5bf80: fa fa fa fa 00 fa fa fa fa fa fa fa 00 fa fa fa
      [   15.116983]  ffffffffb9a5c000: fa fa fa fa 00 fa fa fa fa fa fa fa 00 fa fa fa
      [   15.116983] >ffffffffb9a5c080: fa fa fa fa 00 fa fa fa fa fa fa fa 00 00 00 00
      [   15.116983]                                                     ^
      [   15.116983]  ffffffffb9a5c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      [   15.116983]  ffffffffb9a5c180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      [   15.116983] ==================================================================
      
      Fixes: 85b1407b (ACPI / CPPC: Make CPPC ACPI driver aware of PCC subspace IDs)
      Reported-by: default avatarChangbin Du <changbin.du@intel.com>
      Signed-off-by: default avatarGeorge Cherian <george.cherian@cavium.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1ecbd717
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 13231cac
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "A bunch of fixes for aacraid, a set of coherency fixes that only
        affect non-coherent platforms and one coccinelle detected null check
        after use"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: libsas: align sata_device's rps_resp on a cacheline
        scsi: use dma_get_cache_alignment() as minimum DMA alignment
        scsi: dma-mapping: always provide dma_get_cache_alignment
        scsi: ufs: ufshcd: fix potential NULL pointer dereference in ufshcd_config_vreg
        scsi: aacraid: Prevent crash in case of free interrupt during scsi EH path
        scsi: aacraid: Perform initialization reset only once
        scsi: aacraid: Check for PCI state of device in a generic way
      13231cac
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · e6cdd80a
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "Here is the first rc pull request for RDMA. This includes an important
        core fix for a regression in iWarp if SELinux is enabled, a fix for a
        compilation regression introduced in this merge window, and one
        obscure kconfig combination that oops's the kernel.
      
        For drivers, we have hns fixes needed to make their devices work on
        certain ARM IOMMU configurations, a stack data leak for hfi1, and
        various testing discovered -rc bug fixes for i40iw.
      
        This cycle we pushed back on the driver maintainers to have better
        commit messages for -rc material"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        IB/core: Only enforce security for InfiniBand
        RDMA/hns: Get rid of page operation after dma_alloc_coherent
        RDMA/hns: Get rid of virt_to_page and vmap calls after dma_alloc_coherent
        RDMA/hns: Fix the issue of IOVA not page continuous in hip08
        IB/core: Init subsys if compiled to vmlinuz-core
        RDMA/cma: Make sure that PSN is not over max allowed
        i40iw: Notify user of established connection after QP in RTS
        i40iw: Move MPA request event for loopback after connect
        i40iw: Correct ARP index mask
        i40iw: Do not free sqbuf when event is I40IW_TIMER_TYPE_CLOSE
        i40iw: Allocate a sdbuf per CQP WQE
        IB: INFINIBAND should depend on HAS_DMA
        IB/hfi1: Initialize bth1 in 16B rc ack builder
      e6cdd80a
    • Linus Torvalds's avatar
      Merge tag 'char-misc-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 6a5e05a4
      Linus Torvalds authored
      Pull char/misc fixes from Greg KH:
       "Here are some small misc driver fixes for 4.15-rc3 to resolve reported
        issues. Specifically these are:
      
         - binder fix for a memory leak
      
         - vpd driver fixes for a number of reported problems
      
         - hyperv driver fix for memory accesses where it shouldn't be.
      
        All of these have been in linux-next for a while. There's also one
        more MAINTAINERS file update that came in today to get the Android
        developer's emails correct, which is also in this pull request, that
        was not in linux-next, but should not be an issue"
      
      * tag 'char-misc-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        MAINTAINERS: update Android driver maintainers.
        firmware: vpd: Fix platform driver and device registration/unregistration
        firmware: vpd: Tie firmware kobject to device lifetime
        firmware: vpd: Destroy vpd sections in remove function
        hv: kvp: Avoid reading past allocated blocks from KVP file
        Drivers: hv: vmbus: Fix a rescind issue
        ANDROID: binder: fix transaction leak.
      6a5e05a4