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 F2701302CA2 for ; Wed, 12 Nov 2025 10:24:58 +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=1762943099; cv=none; b=aRohyj/6sKi4xJwQjUDFEu/Dpt6QOu8zqA9k1XjzWAc96LIWrB+elKLZ5mHFiWG/FQ6VTd5r6flSL3mNCbGdDzsoEBOOcNJTqK12nCSqvLElubrEae2tfI3pJYXmvm4R770saT7xwKTsASLynEe1aaMKwf9cOhpT2XY8HT0dMzI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762943099; c=relaxed/simple; bh=ckQRjNo4VTklvfc6umKpdce1Indkw8SEnbInQ5kRUJE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=C5Ylnv/DbWyg+Zqs2N5JJjIbaZP3xWfW7cEe8jghzp+ZDI2fLIVaCJ8BlgXSvLcNROzVcO3cuGAqB2VcwZwxdaRoM+gnjA8bIm+bulFekf9ZANMyD8jBYrJGcEc/wC439gUWGWfy+O01BVKC8KUqLKK4dm1wUPc3atGR/+stlAU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mrz8cUOb; 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="mrz8cUOb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2D22C116B1; Wed, 12 Nov 2025 10:24:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1762943098; bh=ckQRjNo4VTklvfc6umKpdce1Indkw8SEnbInQ5kRUJE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=mrz8cUObz167o4Rm/gqK5XZv+7ci3GaFXaqKPLV1edM8+QRQ7MLck2Ppu9e8dnTTi ydcYQK/5v5FSTiyLaFacbGaBKR/MGjT7YCTpFiqEuIs+8+89733/bIHE3/6mfnYd9H SUpKrkRQpTW4q6ZrzCTkC+dWYK0zM43caKXQ6U1c= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40139: smc: Use __sk_dst_get() and dst_dev_rcu() in in smc_clc_prfx_set(). Date: Wed, 12 Nov 2025 19:24:15 +0900 Message-ID: <2025111255-CVE-2025-40139-a030@gregkh> X-Mailer: git-send-email 2.51.2 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=2166; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Z0UdqlaVzUhZIUSYJHgyOCxtP+jH6RF98Q+CjmLQ0o4=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkiCdZHbBb4FsdXbzXNOiav/Fa71P783F3/zz5or7vW/ /hB1krBjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiI5DaG+WGpP1e+8m87vb6g 9VGR0o4dX4/7fWGYxbSggedp2SZZtV6lpL0vLU+889b8DAA= 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: smc: Use __sk_dst_get() and dst_dev_rcu() in in smc_clc_prfx_set(). smc_clc_prfx_set() is called during connect() and not under RCU nor RTNL. Using sk_dst_get(sk)->dev could trigger UAF. Let's use __sk_dst_get() and dev_dst_rcu() under rcu_read_lock() after kernel_getsockname(). Note that the returned value of smc_clc_prfx_set() is not used in the caller. While at it, we change the 1st arg of smc_clc_prfx_set[46]_rcu() not to touch dst there. The Linux kernel CVE team has assigned CVE-2025-40139 to this issue. Affected and fixed versions =========================== Issue introduced in 4.11 with commit a046d57da19f812216f393e7c535f5858f793ac3 and fixed in 6.17.3 with commit 0736993bfe5c7a9c744ae3fac62d769dfdae54e1 Issue introduced in 4.11 with commit a046d57da19f812216f393e7c535f5858f793ac3 and fixed in 6.18-rc1 with commit 935d783e5de9b64587f3adb25641dd8385e64ddb 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-40139 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: net/smc/smc_clc.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/0736993bfe5c7a9c744ae3fac62d769dfdae54e1 https://git.kernel.org/stable/c/935d783e5de9b64587f3adb25641dd8385e64ddb