]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5e: Fix NULL deref in mlx5e_tir_builder_alloc()
authorElena Salomatkina <esalomatkina@ispras.ru>
Tue, 24 Sep 2024 16:00:18 +0000 (19:00 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:20 +0000 (15:11 +0200)
commit4655456a64a0f936098c8432bac64e7176bd2aff
treedd1c27064a95c26bc3ab3f7bc516ead789388f32
parent201ce2f738f4bde00c75d244df029738c2785bf4
net/mlx5e: Fix NULL deref in mlx5e_tir_builder_alloc()

[ Upstream commit f25389e779500cf4a59ef9804534237841bce536 ]

In mlx5e_tir_builder_alloc() kvzalloc() may return NULL
which is dereferenced on the next line in a reference
to the modify field.

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

Fixes: a6696735d694 ("net/mlx5e: Convert TIR to a dedicated object")
Signed-off-by: Elena Salomatkina <esalomatkina@ispras.ru>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en/tir.c