]> git.hungrycats.org Git - linux/commitdiff
RDMA/ucm: Mark UCM interface as BROKEN
authorLeon Romanovsky <leonro@mellanox.com>
Wed, 23 May 2018 05:22:11 +0000 (08:22 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jul 2018 09:48:34 +0000 (11:48 +0200)
commit 7a8690ed6f5346f6738971892205e91d39b6b901 upstream.

In commit 357d23c811a7 ("Remove the obsolete libibcm library")
in rdma-core [1], we removed obsolete library which used the
/dev/infiniband/ucmX interface.

Following multiple syzkaller reports about non-sanitized
user input in the UCMA module, the short audit reveals the same
issues in UCM module too.

It is better to disable this interface in the kernel,
before syzkaller team invests time and energy to harden
this unused interface.

[1] https://github.com/linux-rdma/rdma-core/pull/279

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/Kconfig
drivers/infiniband/core/Makefile

index 2a972ed6851b2265ae89ee44f621e7ee4ba174da..b03af54367c09e3b30a7617e6314116c7252be8a 100644 (file)
@@ -35,6 +35,17 @@ config INFINIBAND_USER_ACCESS
          libibverbs, libibcm and a hardware driver library from
          rdma-core <https://github.com/linux-rdma/rdma-core>.
 
+config INFINIBAND_USER_ACCESS_UCM
+       bool "Userspace CM (UCM, DEPRECATED)"
+       depends on BROKEN
+       depends on INFINIBAND_USER_ACCESS
+       help
+         The UCM module has known security flaws, which no one is
+         interested to fix. The user-space part of this code was
+         dropped from the upstream a long time ago.
+
+         This option is DEPRECATED and planned to be removed.
+
 config INFINIBAND_EXP_LEGACY_VERBS_NEW_UAPI
        bool "Allow experimental legacy verbs in new ioctl uAPI  (EXPERIMENTAL)"
        depends on INFINIBAND_USER_ACCESS
index dda9e856e3fa334d125d2ecdedadc42719197067..e1acbf5f87f1a45c8e1981d1f8463fade469d977 100644 (file)
@@ -5,8 +5,8 @@ user_access-$(CONFIG_INFINIBAND_ADDR_TRANS)     := rdma_ucm.o
 obj-$(CONFIG_INFINIBAND) +=            ib_core.o ib_cm.o iw_cm.o \
                                        $(infiniband-y)
 obj-$(CONFIG_INFINIBAND_USER_MAD) +=   ib_umad.o
-obj-$(CONFIG_INFINIBAND_USER_ACCESS) +=        ib_uverbs.o ib_ucm.o \
-                                       $(user_access-y)
+obj-$(CONFIG_INFINIBAND_USER_ACCESS) += ib_uverbs.o $(user_access-y)
+obj-$(CONFIG_INFINIBAND_USER_ACCESS_UCM) += ib_ucm.o $(user_access-y)
 
 ib_core-y :=                   packer.o ud_header.o verbs.o cq.o rw.o sysfs.o \
                                device.o fmr_pool.o cache.o netlink.o \