1. 30 Apr, 2014 36 commits
  2. 09 Apr, 2014 4 commits
    • Ben Hutchings's avatar
      Linux 3.2.57 · a2601fcc
      Ben Hutchings authored
      a2601fcc
    • Martin Schwidefsky's avatar
      s390: fix kernel crash due to linkage stack instructions · 16640282
      Martin Schwidefsky authored
      commit 8d7f6690 upstream.
      
      The kernel currently crashes with a low-address-protection exception
      if a user space process executes an instruction that tries to use the
      linkage stack. Set the base-ASTE origin and the subspace-ASTE origin
      of the dispatchable-unit-control-table to point to a dummy ASTE.
      Set up control register 15 to point to an empty linkage stack with no
      room left.
      
      A user space process with a linkage stack instruction will still crash
      but with a different exception which is correctly translated to a
      segmentation fault instead of a kernel oops.
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      16640282
    • Jeff Layton's avatar
      cifs: ensure that uncached writes handle unmapped areas correctly · b1a292f3
      Jeff Layton authored
      commit 5d81de8e upstream.
      
      It's possible for userland to pass down an iovec via writev() that has a
      bogus user pointer in it. If that happens and we're doing an uncached
      write, then we can end up getting less bytes than we expect from the
      call to iov_iter_copy_from_user. This is CVE-2014-0069
      
      cifs_iovec_write isn't set up to handle that situation however. It'll
      blindly keep chugging through the page array and not filling those pages
      with anything useful. Worse yet, we'll later end up with a negative
      number in wdata->tailsz, which will confuse the sending routines and
      cause an oops at the very least.
      
      Fix this by having the copy phase of cifs_iovec_write stop copying data
      in this situation and send the last write as a short one. At the same
      time, we want to avoid sending a zero-length write to the server, so
      break out of the loop and set rc to -EFAULT if that happens. This also
      allows us to handle the case where no address in the iovec is valid.
      
      [Note: Marking this for stable on v3.4+ kernels, but kernels as old as
             v2.6.38 may have a similar problem and may need similar fix]
      Reviewed-by: default avatarPavel Shilovsky <piastry@etersoft.ru>
      Reported-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      [bwh: Backported to 3.2:
       - Adjust context
       - s/nr_pages/npages/
       - s/wdata->pages/pages/
       - In case of an error with no data copied, we must kunmap() page 0,
         but in neither case should we free anything else]
       Thanks to Raphael Geissert for an independent backport that showed some
       bugs in my first version.]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      b1a292f3
    • Marcelo Tosatti's avatar
      KVM: VMX: fix use after free of vmx->loaded_vmcs · f5652b31
      Marcelo Tosatti authored
      commit 26a865f4 upstream.
      
      After free_loaded_vmcs executes, the "loaded_vmcs" structure
      is kfreed, and now vmx->loaded_vmcs points to a kfreed area.
      Subsequent free_loaded_vmcs then attempts to manipulate
      vmx->loaded_vmcs.
      
      Switch the order to avoid the problem.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1047892Reviewed-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      f5652b31