Skip to content

Commit 0625b4b

Browse files
committed
IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes were written. Fixes: 41d902c ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp") Cc: <[email protected]> Acked-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 0da9be2 commit 0625b4b

File tree

1 file changed

+1
-1
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/mlx5/qp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,7 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
16071607
struct mlx5_ib_resources *devr = &dev->devr;
16081608
int inlen = MLX5_ST_SZ_BYTES(create_qp_in);
16091609
struct mlx5_core_dev *mdev = dev->mdev;
1610-
struct mlx5_ib_create_qp_resp resp;
1610+
struct mlx5_ib_create_qp_resp resp = {};
16111611
struct mlx5_ib_cq *send_cq;
16121612
struct mlx5_ib_cq *recv_cq;
16131613
unsigned long flags;

0 commit comments

Comments
 (0)