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 EC72D267B12 for ; Fri, 22 Aug 2025 16:02:57 +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=1755878578; cv=none; b=MDQ3rAK17E5ZCjrsEvD5hz0VCb3ACVmFYsiP9EqieBGifqbhOhvhhldvOedwnvkL0vgMLk9SB0UvfakEWkJzTc9aHGtIZaWHIP12mXG6EnC/AERXESLQvrkwlu33cXv0pUf7BebSnKsFmPdY+8bkvodUtKI7y07RwS5epyZrUx8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755878578; c=relaxed/simple; bh=qXuXaed96ymeFI+13jga5CtjeAV0GwdYdAhZuyqV2fU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Cp1xz7J2Vtv+14Ar64wCejhGIJNNpBEymp/2AMjsC26BMQqZQGfX1Dk6Vi4l+tccx7R4oZ0AAZmgXLsN3rW6wfDxu1ygCFplKhEf1c1cF8GeGAs0NT149o72h3wX/m4RJqx6nMoA6BUxwblXSlbwKWY0UfL16H+Ys0G5+z62PmE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=YlZizjlR; 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="YlZizjlR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73CD7C4CEED; Fri, 22 Aug 2025 16:02:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755878577; bh=qXuXaed96ymeFI+13jga5CtjeAV0GwdYdAhZuyqV2fU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=YlZizjlRbXBq7PcyGYVS3hdxBy+FnGAuA7FYVPqGr9btF2MAqObc4oRA9g7H2HJcu qw3zX4o3pbc4ynTH7k5SXt3IlpPTT+JbfwL8Bl9DCo7iEHre+yFIBnAP/zasGc/N/J swpl1mkcxC1NxcsPB0/HzARUCPcvGnE9ZVHZn/+k= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38645: net/mlx5: Check device memory pointer before usage Date: Fri, 22 Aug 2025 18:00:53 +0200 Message-ID: <2025082235-CVE-2025-38645-8e50@gregkh> X-Mailer: git-send-email 2.50.1 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=2895; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=S6P27in/TcxOU5CEZEjO6PsrPYwVVYt8b1vfkUJDJgc=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkrpihPbpnlZmibmLBHXJHz8jaN6l8X2Cv3eywQX282t XNrHPfljlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIvB7DgvW/ez07qivyPReK dD7cMJVN8+8FWYY5XLUbJz4M3dv/Q3+jzBaxj6HX7kneAwA= 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: Check device memory pointer before usage Add a NULL check before accessing device memory to prevent a crash if dev->dm allocation in mlx5_init_once() fails. The Linux kernel CVE team has assigned CVE-2025-38645 to this issue. Affected and fixed versions =========================== Issue introduced in 5.4 with commit c9b9dcb430b3cd0ad2b04c360c4e528d73430481 and fixed in 6.1.148 with commit eebb225fe6c9103293807b8edabcbad59f9589bc Issue introduced in 5.4 with commit c9b9dcb430b3cd0ad2b04c360c4e528d73430481 and fixed in 6.6.102 with commit 62d7cf455c887941ed6f105cd430ba04ee0b6c9f Issue introduced in 5.4 with commit c9b9dcb430b3cd0ad2b04c360c4e528d73430481 and fixed in 6.12.42 with commit 4249f1307932f1b6bbb8b7eba60d82f0b7e44430 Issue introduced in 5.4 with commit c9b9dcb430b3cd0ad2b04c360c4e528d73430481 and fixed in 6.15.10 with commit 3046b011d368162b1b9ca9453eee0fea930e0a93 Issue introduced in 5.4 with commit c9b9dcb430b3cd0ad2b04c360c4e528d73430481 and fixed in 6.16.1 with commit da899a1fd7c40e2e4302af1db7d0b8540fb22283 Issue introduced in 5.4 with commit c9b9dcb430b3cd0ad2b04c360c4e528d73430481 and fixed in 6.17-rc1 with commit 70f238c902b8c0461ae6fbb8d1a0bbddc4350eea 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-38645 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/infiniband/hw/mlx5/dm.c drivers/net/ethernet/mellanox/mlx5/core/lib/dm.c drivers/net/ethernet/mellanox/mlx5/core/main.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/eebb225fe6c9103293807b8edabcbad59f9589bc https://git.kernel.org/stable/c/62d7cf455c887941ed6f105cd430ba04ee0b6c9f https://git.kernel.org/stable/c/4249f1307932f1b6bbb8b7eba60d82f0b7e44430 https://git.kernel.org/stable/c/3046b011d368162b1b9ca9453eee0fea930e0a93 https://git.kernel.org/stable/c/da899a1fd7c40e2e4302af1db7d0b8540fb22283 https://git.kernel.org/stable/c/70f238c902b8c0461ae6fbb8d1a0bbddc4350eea