Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19DA41DD525 for ; Thu, 11 Sep 2025 16:57:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757609875; cv=none; b=GaBh6EhLFHgebOR/xMVL+SuAHxmYTUWH93iC0UJLjoJDdj13CLYw4jm+VU/5xFe3oIsdFBSbQ0TYi5Z9X5NnLNT0GsPfnhDQb8aPXK6zaWzspEFMYyeTaK9VJ+625sUS6gMNyYgmJAWppug4gSJ+XxbtrqkjorpFNzFKQfFIe7g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757609875; c=relaxed/simple; bh=HtTZRrshlxzXwxbojdi13Xlmxqu8OfIedbWMOd97ums=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=jQ0GoeHVnPtsmHxDbRZqp9thwb1WuwjMEVvvPkTDpaFeXcn+bTcbsPxa2+Z6hvhC0pfTx25ZphpwfLEt8mSOFcl1vBJOp5JrVVA5xbWl3C0AVqeoypY3SW1EvzqNpXs96zrcZQfw/R2iSNt5dzlBAU+fm8saInO5QoxLIIcVPoM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AXh2GlwU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="AXh2GlwU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 546A0C4CEF0; Thu, 11 Sep 2025 16:57:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757609874; bh=HtTZRrshlxzXwxbojdi13Xlmxqu8OfIedbWMOd97ums=; h=From:To:Cc:Subject:Date:Reply-to:From; b=AXh2GlwU2NlJMpem0k0o+gSllJO9NYb6E/0PLlKzDfhQpFMDe1sfmL94hBXafMmhE eCkAz5LbR44snuWqwRM/g+aJA12lAXVo2uC7E0ZXo4+PgdKAWGf0UIiaWrwe9CS9uP MRM+9+QOIgsVrTft7dLEdWWpz3mq2X+ueUUfrK/U= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39768: net/mlx5: HWS, fix complex rules rehash error flow Date: Thu, 11 Sep 2025 18:56:47 +0200 Message-ID: <2025091144-CVE-2025-39768-5590@gregkh> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2976; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=gqYpFv745mowrieaBSsuq+PnMrCt+77eivtwkLR0kwE=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmH/vu6z42t4bFdsrWkheXzLN4J7VZP5Do7luo3MpZ/7 OvL2Hi8I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbioM6woDl37YOZ+zde6WP8 s+GS7JK4r/wfjjAsaFwrfXVFvtXiaE6D12nlCmn790VOAAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: net/mlx5: HWS, fix complex rules rehash error flow Moving rules from matcher to matcher should not fail. However, if it does fail due to various reasons, the error flow should allow the kernel to continue functioning (albeit with broken steering rules) instead of going into series of soft lock-ups or some other problematic behaviour. Similar to the simple rules, complex rules rehash logic suffers from the same problems. This patch fixes the error flow for moving complex rules: - If new rule creation fails before it was even enqeued, do not poll for completion - If TIMEOUT happened while moving the rule, no point trying to poll for completions for other rules. Something is broken, completion won't come, just abort the rehash sequence. - If some other completion with error received, don't give up. Continue handling rest of the rules to minimize the damage. - Make sure that the first error code that was received will be actually returned to the caller instead of replacing it with the generic error code. All the aforementioned issues stem from the same bad error flow, so no point fixing them one by one and leaving partially broken code - fixing them in one patch. The Linux kernel CVE team has assigned CVE-2025-39768 to this issue. Affected and fixed versions =========================== Issue introduced in 6.16 with commit 17e0accac577fd6ea2090934d71a8c6f36702a26 and fixed in 6.16.4 with commit 37d54bc28d092bc3b314da45d730f00e9d86ec2a Issue introduced in 6.16 with commit 17e0accac577fd6ea2090934d71a8c6f36702a26 and fixed in 6.17-rc3 with commit 4a842b1bf18a32ee0c25dd6dd98728b786a76fe4 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-39768 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc_complex.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/37d54bc28d092bc3b314da45d730f00e9d86ec2a https://git.kernel.org/stable/c/4a842b1bf18a32ee0c25dd6dd98728b786a76fe4