• Linus Torvalds's avatar
    Merge tag 'usercopy-v4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 617aebe6
    Linus Torvalds authored
    Pull hardened usercopy whitelisting from Kees Cook:
     "Currently, hardened usercopy performs dynamic bounds checking on slab
      cache objects. This is good, but still leaves a lot of kernel memory
      available to be copied to/from userspace in the face of bugs.
    
      To further restrict what memory is available for copying, this creates
      a way to whitelist specific areas of a given slab cache object for
      copying to/from userspace, allowing much finer granularity of access
      control.
    
      Slab caches that are never exposed to userspace can declare no
      whitelist for their objects, thereby keeping them unavailable to
      userspace via dynamic copy operations. (Note, an implicit form of
      whitelisting is the use of constant sizes in usercopy operations and
      get_user()/put_user(); these bypass all hardened usercopy checks since
      these sizes cannot change at runtime.)
    
      This new check is WARN-by-default, so any mistakes can be found over
      the next several releases without breaking anyone's system.
    
      The series has roughly the following sections:
       - remove %p and improve reporting with offset
       - prepare infrastructure and whitelist kmalloc
       - update VFS subsystem with whitelists
       - update SCSI subsystem with whitelists
       - update network subsystem with whitelists
       - update process memory with whitelists
       - update per-architecture thread_struct with whitelists
       - update KVM with whitelists and fix ioctl bug
       - mark all other allocations as not whitelisted
       - update lkdtm for more sensible test overage"
    
    * tag 'usercopy-v4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: (38 commits)
      lkdtm: Update usercopy tests for whitelisting
      usercopy: Restrict non-usercopy caches to size 0
      kvm: x86: fix KVM_XEN_HVM_CONFIG ioctl
      kvm: whitelist struct kvm_vcpu_arch
      arm: Implement thread_struct whitelist for hardened usercopy
      arm64: Implement thread_struct whitelist for hardened usercopy
      x86: Implement thread_struct whitelist for hardened usercopy
      fork: Provide usercopy whitelisting for task_struct
      fork: Define usercopy region in thread_stack slab caches
      fork: Define usercopy region in mm_struct slab caches
      net: Restrict unwhitelisted proto caches to size 0
      sctp: Copy struct sctp_sock.autoclose to userspace using put_user()
      sctp: Define usercopy region in SCTP proto slab cache
      caif: Define usercopy region in caif proto slab cache
      ip: Define usercopy region in IP proto slab cache
      net: Define usercopy region in struct proto slab cache
      scsi: Define usercopy region in scsi_sense_cache slab cache
      cifs: Define usercopy region in cifs_request slab cache
      vxfs: Define usercopy region in vxfs_inode slab cache
      ufs: Define usercopy region in ufs_inode_cache slab cache
      ...
    617aebe6
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
acl.c Loading commit data...
file.c Loading commit data...
inode.c Loading commit data...
ioctl.c Loading commit data...
jfs_acl.h Loading commit data...
jfs_btree.h Loading commit data...
jfs_debug.c Loading commit data...
jfs_debug.h Loading commit data...
jfs_dinode.h Loading commit data...
jfs_discard.c Loading commit data...
jfs_discard.h Loading commit data...
jfs_dmap.c Loading commit data...
jfs_dmap.h Loading commit data...
jfs_dtree.c Loading commit data...
jfs_dtree.h Loading commit data...
jfs_extent.c Loading commit data...
jfs_extent.h Loading commit data...
jfs_filsys.h Loading commit data...
jfs_imap.c Loading commit data...
jfs_imap.h Loading commit data...
jfs_incore.h Loading commit data...
jfs_inode.c Loading commit data...
jfs_inode.h Loading commit data...
jfs_lock.h Loading commit data...
jfs_logmgr.c Loading commit data...
jfs_logmgr.h Loading commit data...
jfs_metapage.c Loading commit data...
jfs_metapage.h Loading commit data...
jfs_mount.c Loading commit data...
jfs_superblock.h Loading commit data...
jfs_txnmgr.c Loading commit data...
jfs_txnmgr.h Loading commit data...
jfs_types.h Loading commit data...
jfs_umount.c Loading commit data...
jfs_unicode.c Loading commit data...
jfs_unicode.h Loading commit data...
jfs_uniupr.c Loading commit data...
jfs_xattr.h Loading commit data...
jfs_xtree.c Loading commit data...
jfs_xtree.h Loading commit data...
namei.c Loading commit data...
resize.c Loading commit data...
super.c Loading commit data...
symlink.c Loading commit data...
xattr.c Loading commit data...