]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/cxgb4: Added NULL check for lookup_atid
authorMikhail Lobanov <m.lobanov@rosalinux.ru>
Thu, 12 Sep 2024 14:58:39 +0000 (10:58 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:03 +0000 (15:11 +0200)
commitb11318dc8a1ec565300bb1a9073095af817cc508
treec81c8b31606b4c913b23317bb60046c85c154892
parent208dba182ee62acd59e0037647e90a82d2e54b84
RDMA/cxgb4: Added NULL check for lookup_atid

[ Upstream commit e766e6a92410ca269161de059fff0843b8ddd65f ]

The lookup_atid() function can return NULL if the ATID is
invalid or does not exist in the identifier table, which
could lead to dereferencing a null pointer without a
check in the `act_establish()` and `act_open_rpl()` functions.
Add a NULL check to prevent null pointer dereferencing.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: cfdda9d76436 ("RDMA/cxgb4: Add driver for Chelsio T4 RNIC")
Signed-off-by: Mikhail Lobanov <m.lobanov@rosalinux.ru>
Link: https://patch.msgid.link/20240912145844.77516-1-m.lobanov@rosalinux.ru
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/cxgb4/cm.c