RDMA/cxgb3: Fix stack info leak in iwch_create_cq()
The "uresp.reserved" field isn't initialized on this path so it could leak uninitialized stack information to the user. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
committed by
Roland Dreier
parent
3b2f64d00c
commit
246fcdbc9d
@@ -226,6 +226,7 @@ static struct ib_cq *iwch_create_cq(struct ib_device *ibdev, int entries, int ve
|
|||||||
mm->len = PAGE_ALIGN(((1UL << uresp.size_log2) + 1) *
|
mm->len = PAGE_ALIGN(((1UL << uresp.size_log2) + 1) *
|
||||||
sizeof(struct t3_cqe));
|
sizeof(struct t3_cqe));
|
||||||
uresp.memsize = mm->len;
|
uresp.memsize = mm->len;
|
||||||
|
uresp.reserved = 0;
|
||||||
resplen = sizeof uresp;
|
resplen = sizeof uresp;
|
||||||
}
|
}
|
||||||
if (ib_copy_to_udata(udata, &uresp, resplen)) {
|
if (ib_copy_to_udata(udata, &uresp, resplen)) {
|
||||||
|
Reference in New Issue
Block a user