RDMA/cxgb3: Fix information leak in send_abort()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 26 May 2014 21:04:44 +0000 (00:04 +0300)
committerRoland Dreier <roland@purestorage.com>
Tue, 27 May 2014 18:55:40 +0000 (11:55 -0700)
The cpl_abort_req struct has several reserved members which need to be
cleared to avoid disclosing kernel information.  I have added a memset()
so now it matches the cxgb4 version of this function.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/cxgb3/iwch_cm.c

index 095bb04..cb78b1e 100644 (file)
@@ -418,6 +418,7 @@ static int send_abort(struct iwch_ep *ep, struct sk_buff *skb, gfp_t gfp)
        skb->priority = CPL_PRIORITY_DATA;
        set_arp_failure_handler(skb, abort_arp_failure);
        req = (struct cpl_abort_req *) skb_put(skb, sizeof(*req));
+       memset(req, 0, sizeof(*req));
        req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_OFLD_HOST_ABORT_CON_REQ));
        req->wr.wr_lo = htonl(V_WR_TID(ep->hwtid));
        OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_ABORT_REQ, ep->hwtid));