linux_dsm_epyc7002/drivers/infiniband/hw/qib
Jason Gunthorpe e6bd18f57a IB/security: Restrict use of the write() interface
The drivers/infiniband stack uses write() as a replacement for
bi-directional ioctl().  This is not safe. There are ways to
trigger write calls that result in the return structure that
is normally written to user space being shunted off to user
specified kernel memory instead.

For the immediate repair, detect and deny suspicious accesses to
the write API.

For long term, update the user space libraries and the kernel API
to something that doesn't present the same security vulnerabilities
(likely a structured ioctl() interface).

The impacted uAPI interfaces are generally only available if
hardware from drivers/infiniband is installed in the system.

Reported-by: Jann Horn <jann@thejh.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
[ Expanded check to all known write() entry points ]
Cc: stable@vger.kernel.org
Signed-off-by: Doug Ledford <dledford@redhat.com>
2016-04-28 12:03:16 -04:00
..
Kconfig IB/qib: Begin to use rdmavt for verbs 2016-03-10 20:37:15 -05:00
Makefile IB/qib: Remove srq functionality 2016-03-10 20:37:33 -05:00
qib_6120_regs.h
qib_7220_regs.h
qib_7220.h IB/qib: Eliminate 64-bit jiffies use 2012-01-03 20:52:12 -08:00
qib_7322_regs.h IB/qib: Mask hardware error during link reset 2010-07-06 14:13:20 -07:00
qib_common.h IB/qib: Remove modify queue pair code 2016-03-10 20:37:34 -05:00
qib_debugfs.c IB/qib: Fix checkpatch warnings 2015-02-20 09:04:09 -08:00
qib_debugfs.h IB/qib: Convert opcode counters to per-context 2013-06-21 17:19:50 -07:00
qib_diag.c IB/qib: Add blank line after declaration 2015-02-20 09:04:12 -08:00
qib_dma.c IB/qib: Remove ib_sg_dma_address() and ib_sg_dma_len() overloads 2014-04-01 11:16:31 -07:00
qib_driver.c IB/qib: Remove modify queue pair code 2016-03-10 20:37:34 -05:00
qib_eeprom.c IB/qib: Add blank line after declaration 2015-02-20 09:04:12 -08:00
qib_file_ops.c IB/security: Restrict use of the write() interface 2016-04-28 12:03:16 -04:00
qib_fs.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
qib_iba6120.c IB/qib: Remove ibport and use rdmavt version 2016-03-10 20:37:21 -05:00
qib_iba7220.c IB/qib: use arch_phys_wc_add() 2015-05-05 09:18:02 -04:00
qib_iba7322.c IB/qib: Destroy SMI AH before de-allocating the protection domain 2016-03-10 20:38:11 -05:00
qib_init.c IB/qib: Remove completion queue data structures and functions from qib 2016-03-10 20:37:29 -05:00
qib_intr.c IB/qib: Begin to use rdmavt for verbs 2016-03-10 20:37:15 -05:00
qib_keys.c IB/qib: Remove qp and mr functionality from qib 2016-03-10 20:37:18 -05:00
qib_mad.c IB/qib: Destroy SMI AH before de-allocating the protection domain 2016-03-10 20:38:11 -05:00
qib_mad.h IB/core: Add core header changes needed for OPA 2015-08-28 22:54:50 -04:00
qib_pcie.c IB/qib: Add blank line after declaration 2015-02-20 09:04:12 -08:00
qib_pio_copy.c
qib_qp.c IB/qib, staging/rdma/hfi1, IB/rdmavt: progress selection changes 2016-03-10 20:38:14 -05:00
qib_qsfp.c IB/qib: Minor fixes to qib per SFF 8636 2015-12-07 16:36:00 -05:00
qib_qsfp.h IB/qib: Eliminate 64-bit jiffies use 2012-01-03 20:52:12 -08:00
qib_rc.c IB/qib, staging/rdma/hfi1: add s_hlock for use in post send 2016-03-10 20:38:07 -05:00
qib_ruc.c IB/qib, staging/rdma/hfi1: add s_hlock for use in post send 2016-03-10 20:38:07 -05:00
qib_sd7220.c IB/qib: Add blank line after declaration 2015-02-20 09:04:12 -08:00
qib_sdma.c IB/qib: Remove modify queue pair code 2016-03-10 20:37:34 -05:00
qib_sysfs.c IB/qib: Remove ibport and use rdmavt version 2016-03-10 20:37:21 -05:00
qib_twsi.c IB/qib: Add blank line after declaration 2015-02-20 09:04:12 -08:00
qib_tx.c IB/qib: Add blank line after declaration 2015-02-20 09:04:12 -08:00
qib_uc.c IB/qib, staging/rdma/hfi1: add s_hlock for use in post send 2016-03-10 20:38:07 -05:00
qib_ud.c IB/qib, staging/rdma/hfi1: add s_hlock for use in post send 2016-03-10 20:38:07 -05:00
qib_user_pages.c mm/gup: Switch all callers of get_user_pages() to not pass tsk/mm 2016-02-16 10:11:12 +01:00
qib_user_sdma.c IB/qib: Add blank line after declaration 2015-02-20 09:04:12 -08:00
qib_user_sdma.h
qib_verbs.c IB/qib: Setup notify free/create mad agent callbacks for rdmavt 2016-03-10 20:38:09 -05:00
qib_verbs.h IB/qib,rdmavt: Move smi_ah to qib 2016-03-10 20:38:09 -05:00
qib_wc_ppc64.c
qib_wc_x86_64.c IB/qib: fix test of unsigned variable 2015-05-12 13:55:41 -04:00
qib.h IB/qib: Rename several functions by adding a "qib_" prefix 2016-03-10 20:38:07 -05:00