1. 26 Aug, 2012 2 commits
    • Zach Brown's avatar
      fuse: verify all ioctl retry iov elements · bd697182
      Zach Brown authored
      commit fb6ccff6 upstream.
      
      Commit 7572777e attempted to verify that
      the total iovec from the client doesn't overflow iov_length() but it
      only checked the first element.  The iovec could still overflow by
      starting with a small element.  The obvious fix is to check all the
      elements.
      
      The overflow case doesn't look dangerous to the kernel as the copy is
      limited by the length after the overflow.  This fix restores the
      intention of returning an error instead of successfully copying less
      than the iovec represented.
      
      I found this by code inspection.  I built it but don't have a test case.
      I'm cc:ing stable because the initial commit did as well.
      Signed-off-by: default avatarZach Brown <zab@redhat.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bd697182
    • Heiko Carstens's avatar
      s390/compat: fix mmap compat system calls · 44d33984
      Heiko Carstens authored
      commit e8587121 upstream.
      
      The native 31 bit and the compat behaviour for the mmap system calls differ:
      
      In native 31 bit mode the passed in address for the mmap system call will be
      unmodified passed to sys_mmap_pgoff().
      In compat mode however the passed in address will be modified with
      compat_ptr() which masks out the most significant bit.
      
      The result is that in native 31 bit mode each mmap request (with MAP_FIXED)
      will fail where the most significat bit is set, while in compat mode it
      may succeed.
      
      This odd behaviour was introduced with d3815898 "[S390] mmap: add missing
      compat_ptr conversion to both mmap compat syscalls".
      
      To restore a consistent behaviour accross native and compat mode this
      patch functionally reverts the above mentioned commit.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      44d33984
  2. 15 Aug, 2012 38 commits