linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] infiniband: mlx5: a possible null-pointer dereference in set_roce_addr()
@ 2019-07-29  2:16 Jia-Ju Bai
  2019-07-29  5:20 ` Leon Romanovsky
  2019-07-29  5:25 ` Parav Pandit
  0 siblings, 2 replies; 5+ messages in thread
From: Jia-Ju Bai @ 2019-07-29  2:16 UTC (permalink / raw)
  To: leon, dledford, jgg; +Cc: linux-rdma, linux-kernel

In set_roce_addr(), there is an if statement on line 589 to check 
whether gid is NULL:
     if (gid)

When gid is NULL, it is used on line 613:
     return mlx5_core_roce_gid_set(..., gid->raw, ...);

Thus, a possible null-pointer dereference may occur.

This bug is found by a static analysis tool STCheck written by us.

I do not know how to correctly fix this bug, so I only report it.


Best wishes,
Jia-Ju Bai

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-07-29  5:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-29  2:16 [BUG] infiniband: mlx5: a possible null-pointer dereference in set_roce_addr() Jia-Ju Bai
2019-07-29  5:20 ` Leon Romanovsky
2019-07-29  5:25 ` Parav Pandit
2019-07-29  5:26   ` Parav Pandit
2019-07-29  5:52     ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).