Files
linux/drivers/infiniband/core
Jack Morgenstein addb8a6559 RDMA/uverbs: Expand primary and alt AV port checks
The commit cited below checked that the port numbers provided in the
primary and alt AVs are legal.

That is sufficient to prevent a kernel panic. However, it is not
sufficient for correct operation.

In Linux, AVs (both primary and alt) must be completely self-described.
We do not accept an AV from userspace without an embedded port number.
(This has been the case since kernel 3.14 commit dbf727de74
("IB/core: Use GID table in AH creation and dmac resolution")).

For the primary AV, this embedded port number must match the port number
specified with IB_QP_PORT.

We also expect the port number embedded in the alt AV to match the
alt_port_num value passed by the userspace driver in the modify_qp command
base structure.

Add these checks to modify_qp.

Cc: <[email protected]> # 4.16
Fixes: 5d4c05c3ee ("RDMA/uverbs: Sanitize user entered port numbers prior to access it")
Signed-off-by: Jack Morgenstein <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2018-07-24 15:30:34 -06:00
..
2018-04-17 19:42:50 -06:00
…
2018-06-12 16:19:22 -07:00
…
…
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
…
2018-06-12 16:19:22 -07:00
2018-06-01 11:16:24 -04:00
…
2018-05-15 16:17:38 -06:00
…
…
2018-02-28 12:55:03 -07:00
2017-08-31 08:35:09 -04:00
…
…
…
2018-03-29 13:42:29 -06:00