All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [BUG] net: qed: possible null-pointer dereference in qed_rdma_create_qp()
@ 2021-08-11  9:44 Shai Malin
  0 siblings, 0 replies; 2+ messages in thread
From: Shai Malin @ 2021-08-11  9:44 UTC (permalink / raw)
  To: Tuo Li
  Cc: netdev, Linux Kernel, baijiaju1990, Ariel Elior,
	GR-everest-linux-l2, davem, kuba, malin1024

On 8/11/21 6:30 AM, Tuo Li wrote:
> Hello,
> 
> Our static analysis tool finds a possible null-pointer dereference in
> qed_rdma.c in Linux 5.14.0-rc3:
> 
> The variable rdma_cxt is assigned to p_hwfn, and rdma_cxt is checked in:
> 1286:    if (!rdma_cxt || !in_params || !out_params ||
> !p_hwfn->p_rdma_info->active)
> 
> This indicates that both rdma_cxt and p_hwfn can be NULL. If so, a
> null-pointer dereference will occur:
> 1288:    DP_ERR(p_hwfn->cdev, ...);
> 
> I am not quite sure whether this possible null-pointer dereference is
> real and how to fix it if it is real.
> Any feedback would be appreciated, thanks!
> 
> Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>

Thanks! It's a real issue.
We will send a fix.

> 
> Best wishes,
> Tuo Li

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

* [BUG] net: qed: possible null-pointer dereference in qed_rdma_create_qp()
@ 2021-08-11  3:29 Tuo Li
  0 siblings, 0 replies; 2+ messages in thread
From: Tuo Li @ 2021-08-11  3:29 UTC (permalink / raw)
  To: aelior, GR-everest-linux-l2, davem, kuba
  Cc: netdev, Linux Kernel, baijiaju1990

Hello,

Our static analysis tool finds a possible null-pointer dereference in 
qed_rdma.c in Linux 5.14.0-rc3:

The variable rdma_cxt is assigned to p_hwfn, and rdma_cxt is checked in:
1286:    if (!rdma_cxt || !in_params || !out_params || 
!p_hwfn->p_rdma_info->active)

This indicates that both rdma_cxt and p_hwfn can be NULL. If so, a 
null-pointer dereference will occur:
1288:    DP_ERR(p_hwfn->cdev, ...);

I am not quite sure whether this possible null-pointer dereference is 
real and how to fix it if it is real.
Any feedback would be appreciated, thanks!

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>

Best wishes,
Tuo Li

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

end of thread, other threads:[~2021-08-11  9:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11  9:44 [BUG] net: qed: possible null-pointer dereference in qed_rdma_create_qp() Shai Malin
  -- strict thread matches above, loose matches on Subject: below --
2021-08-11  3:29 Tuo Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.