lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211202221539.113434-1-amhamza.mgc@gmail.com>
Date:   Fri,  3 Dec 2021 03:15:39 +0500
From:   Ameer Hamza <amhamza.mgc@...il.com>
To:     saeedm@...dia.com, leon@...nel.org, davem@...emloft.net,
        kuba@...nel.org
Cc:     netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
        linux-kernel@...r.kernel.org, amhamza.mgc@...il.com
Subject: [PATCH] net/mlx5: Fix dangling pointer access

Fix for dangling pointer access reported by Coverity.

Addresses-Coverity: 1494138 ("Use after free")

Signed-off-by: Ameer Hamza <amhamza.mgc@...il.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/health.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c
index 3ca998874c50..856023321972 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
@@ -335,7 +335,7 @@ static int mlx5_health_try_recover(struct mlx5_core_dev *dev)
 {
 	mlx5_core_warn(dev, "handling bad device here\n");
 	mlx5_handle_bad_state(dev);
-	if (mlx5_health_wait_pci_up(dev)) {
+	if (dev->timeouts && mlx5_health_wait_pci_up(dev)) {
 		mlx5_core_err(dev, "health recovery flow aborted, PCI reads still not working\n");
 		return -EIO;
 	}
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ