1
0
Fork 0
remarkable-linux/include/rdma
Jason Gunthorpe 5d43a619be IB/security: Restrict use of the write() interface
[ Upstream commit e6bd18f57a ]

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>

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2016-05-17 13:42:48 -04:00
..
ib.h IB/security: Restrict use of the write() interface 2016-05-17 13:42:48 -04:00
ib_addr.h IB/core: change rdma_gid2ip into void function as it always return zero 2015-05-05 13:21:27 -04:00
ib_cache.h IB/core: Add ib_find_exact_cached_pkey() 2012-09-30 20:33:30 -07:00
ib_cm.h IB/core: Fix unaligned accesses 2015-05-05 13:21:27 -04:00
ib_fmr_pool.h RDMA: Improve include file coding style 2008-07-14 23:48:44 -07:00
ib_mad.h IB/mad: Add user space RMPP support 2014-08-10 20:36:00 -07:00
ib_marshall.h RDMA/cma: Export rdma cm interface to userspace 2006-12-12 11:50:22 -08:00
ib_pack.h IB/core: Ethernet L2 attributes in verbs/cm structures 2014-01-14 14:20:54 -08:00
ib_pma.h IB/pma: Add include file for IBA performance counters definitions 2011-07-18 21:04:35 -07:00
ib_sa.h IB/core: Ethernet L2 attributes in verbs/cm structures 2014-01-14 14:20:54 -08:00
ib_smi.h IB: Remove __constant_{endian} uses 2009-01-17 17:11:57 -08:00
ib_umem.h IB/core: Add support for on demand paging regions 2014-12-15 18:13:36 -08:00
ib_umem_odp.h IB/core: Implement support for MMU notifiers regarding on demand paging regions 2014-12-15 18:13:36 -08:00
ib_verbs.h Revert "IB/core: Add support for extended query device caps" 2015-02-06 00:54:33 -08:00
iw_cm.h RDMA/cma: Add IPv6 support for iWARP 2013-08-12 12:32:31 -07:00
iw_portmap.h RDMA/core: Enable the iWarp Port Mapper to provide the actual address of the connecting peer to its clients 2015-05-05 09:18:01 -04:00
rdma_cm.h RDMA/cma: Export cma_get_service_id() 2013-06-20 23:35:41 -07:00
rdma_cm_ib.h RDMA: Fix license text 2008-07-14 23:48:43 -07:00
rdma_netlink.h RDMA/core: Add support for iWARP Port Mapper user space service 2014-06-10 10:11:45 -07:00