aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorDavid Windsor <dave@nullcore.net>2017-06-10 22:50:33 -0400
committerKees Cook <keescook@chromium.org>2018-01-15 12:07:57 -0800
commitde046449045a329bae5c9256e55b58a685a22532 (patch)
tree7aa94c2a5f9506ad2ac0391f64211658ac3f92bb /drivers/scsi
parentvxfs: Define usercopy region in vxfs_inode slab cache (diff)
downloadlinux-dev-de046449045a329bae5c9256e55b58a685a22532.tar.xz
linux-dev-de046449045a329bae5c9256e55b58a685a22532.zip
cifs: Define usercopy region in cifs_request slab cache
CIFS request buffers, stored in the cifs_request slab cache, need to be copied to/from userspace. cache object allocation: fs/cifs/cifsfs.c: cifs_init_request_bufs(): ... cifs_req_poolp = mempool_create_slab_pool(cifs_min_rcv, cifs_req_cachep); fs/cifs/misc.c: cifs_buf_get(): ... ret_buf = mempool_alloc(cifs_req_poolp, GFP_NOFS); ... return ret_buf; In support of usercopy hardening, this patch defines a region in the cifs_request slab cache in which userspace copy operations are allowed. This region is known as the slab cache's usercopy region. Slab caches can now check that each dynamically sized copy operation involving cache-managed memory falls entirely within the slab's usercopy region. This patch is verbatim from Brad Spengler/PaX Team's PAX_USERCOPY whitelisting code in the last public patch of grsecurity/PaX based on my understanding of the code. Changes or omissions from the original code are mine and don't reflect the original grsecurity/PaX code. Signed-off-by: David Windsor <dave@nullcore.net> [kees: adjust commit log, provide usage trace] Cc: Steve French <sfrench@samba.org> Cc: linux-cifs@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/scsi')
0 files changed, 0 insertions, 0 deletions