Linux kernel -stable discussions
 help / color / mirror / Atom feed
* Backport of Patch CVE-2025-21751 to kernel 6.12.43
@ 2025-08-25 13:12 Subramaniam, Sujana
  2025-08-25 20:20 ` Greg KH
  2025-08-25 20:34 ` Sasha Levin
  0 siblings, 2 replies; 3+ messages in thread
From: Subramaniam, Sujana @ 2025-08-25 13:12 UTC (permalink / raw)
  To: stable@vger.kernel.org; +Cc: akendo@akendo.eu


[-- Attachment #1.1: Type: text/plain, Size: 409 bytes --]

Dear Kernel Developers,

Hereby we attach patch backported from kernel 6.13 (as proposed by Greg k-h on the full disclosure mailing list) to 6.12 for CVE-2025-21751 vulnerability.

This patch was tested on metal and virtual machines and rolled out in production.

I hope patch is sufficient for cherry-pick. Please let us know if something has to be updated/modified.

Regards,
Sujana, Akendo




[-- Attachment #1.2: Type: text/html, Size: 2495 bytes --]

[-- Attachment #2: 0001-Fix-CVE-2025-21751.patch --]
[-- Type: application/octet-stream, Size: 2448 bytes --]

From d7ec3c1b2af20e239e7c48bf283ff2f080b459cf Mon Sep 17 00:00:00 2001
From: sujanas <sujana.subramaniam@sap.com>
Date: Mon, 25 Aug 2025 13:56:49 +0200
Subject: [PATCH] Fix CVE-2025-21751

Signed-off-by: sujanas <sujana.subramaniam@sap.com>
---
 .../mlx5/core/steering/hws/mlx5hws_matcher.c  | 25 ++++++-------------
 1 file changed, 8 insertions(+), 17 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_matcher.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_matcher.c
index 61a1155d4b4f..273b4ef1730c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_matcher.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_matcher.c
@@ -165,14 +165,14 @@ static int hws_matcher_disconnect(struct mlx5hws_matcher *matcher)
 						    next->match_ste.rtc_0_id,
 						    next->match_ste.rtc_1_id);
 		if (ret) {
-			mlx5hws_err(tbl->ctx, "Failed to disconnect matcher\n");
-			goto matcher_reconnect;
+			mlx5hws_err(tbl->ctx, "Fatal error, failed to disconnect matcher\n");
+			return ret;
 		}
 	} else {
 		ret = mlx5hws_table_connect_to_miss_table(tbl, tbl->default_miss.miss_tbl);
 		if (ret) {
-			mlx5hws_err(tbl->ctx, "Failed to disconnect last matcher\n");
-			goto matcher_reconnect;
+			mlx5hws_err(tbl->ctx, "Fatal error, failed to disconnect last matcher\n");
+			return ret;
 		}
 	}
 
@@ -180,29 +180,20 @@ static int hws_matcher_disconnect(struct mlx5hws_matcher *matcher)
 	if (prev_ft_id == tbl->ft_id) {
 		ret = mlx5hws_table_update_connected_miss_tables(tbl);
 		if (ret) {
-			mlx5hws_err(tbl->ctx, "Fatal error, failed to update connected miss table\n");
-			goto matcher_reconnect;
+			mlx5hws_err(tbl->ctx,
+				    "Fatal error, failed to update connected miss table\n");
+			return ret;
 		}
 	}
 
 	ret = mlx5hws_table_ft_set_default_next_ft(tbl, prev_ft_id);
 	if (ret) {
 		mlx5hws_err(tbl->ctx, "Fatal error, failed to restore matcher ft default miss\n");
-		goto matcher_reconnect;
+		return ret;
 	}
 
 	return 0;
 
-matcher_reconnect:
-	if (list_empty(&tbl->matchers_list) || !prev)
-		list_add(&matcher->list_node, &tbl->matchers_list);
-	else
-		/* insert after prev matcher */
-		list_add(&matcher->list_node, &prev->list_node);
-
-	return ret;
-}
-
 static void hws_matcher_set_rtc_attr_sz(struct mlx5hws_matcher *matcher,
 					struct mlx5hws_cmd_rtc_create_attr *rtc_attr,
 					enum mlx5hws_matcher_rtc_type rtc_type,
-- 

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

end of thread, other threads:[~2025-08-25 20:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-25 13:12 Backport of Patch CVE-2025-21751 to kernel 6.12.43 Subramaniam, Sujana
2025-08-25 20:20 ` Greg KH
2025-08-25 20:34 ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox