[bug report] RDMA/qedr: Fix uABI structure layouts for 32/64 compat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Jason Gunthorpe,

The patch 71e80a4781af: "RDMA/qedr: Fix uABI structure layouts for
32/64 compat" from Mar 20, 2018, leads to the following static
checker warning:

	drivers/infiniband/hw/qedr/verbs.c:532 qedr_alloc_pd()
	warn: check that 'uresp.reserved' doesn't leak information

drivers/infiniband/hw/qedr/verbs.c
   526  
   527          if (udata && context) {
   528                  struct qedr_alloc_pd_uresp uresp;
   529  
   530                  uresp.pd_id = pd_id;
   531  
   532                  rc = qedr_ib_copy_to_udata(udata, &uresp, sizeof(uresp));
                                                           ^^^^^^^^^^^^^^^^^^^^
Yup.  Info leak.  I thought I reported this but it must have been
something else because I can't find it in my inbox.

   533                  if (rc) {
   534                          DP_ERR(dev, "copy error pd_id=0x%x.\n", pd_id);
   535                          dev->ops->rdma_dealloc_pd(dev->rdma_ctx, pd_id);
   536                          goto err;
   537                  }
   538  
   539                  pd->uctx = get_qedr_ucontext(context);
   540                  pd->uctx->pd = pd;
   541          }
   542  
   543          return &pd->ibpd;
   544  
   545  err:
   546          kfree(pd);
   547          return ERR_PTR(rc);
   548  }

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux