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 637D8194AD7 for ; Sat, 6 Dec 2025 21:52:56 +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=1765057976; cv=none; b=pThXFdwpzDTIEicqOOu4l0XJXFmN8D0s3QEExNAJmeGL1xE0ZjY8ASaborYkwCud+TqGbUtmPfaB6TgCGFaXsrEsymVjTGBKpzpKqVkSJQeaZKMKelwu2MouITxhs6oJ7g270RuYqr13UNP5P+8gjLvk16ZcJCikZXEk/q0x2YU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765057976; c=relaxed/simple; bh=Hf8/3zJRwxJwETHEuhVUrzCVWiqNmsFWrzEGmy50jVs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gHN9kmAWyLXXqWCfZIfcdas/77UkQ+KNADHCC1NngUPmfW+saI/kvAKiwVuj+sGkqUZmv+FvmFa2SYuTaRKLme+kUldt+n2VOBKUYT2Ww7BNUaIXc9DThwLeQW5JHHPfwYXKyAeT6VdqP+5YxaAFYAbWCr2MUhctXjNR4KNPmQI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nilsPLKn; 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="nilsPLKn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8868CC4CEF5; Sat, 6 Dec 2025 21:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765057975; bh=Hf8/3zJRwxJwETHEuhVUrzCVWiqNmsFWrzEGmy50jVs=; h=From:To:Cc:Subject:Date:Reply-To:From; b=nilsPLKn+5R/2vWDeRsSdt9gWBZgoTT3FsV82j+QPno5okGbfkN4puCuFAYzt8nw+ nzlss209d6imnMRN3sy3QoBo1jfkT4pjBS+w5FhPNr1P+i8BoqxHCY/tUpUwiRTSZe i9htAT7pFc+VoziUHITfu3zG/V7rujBUVZl0di8A= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40285: smb/server: fix possible refcount leak in smb2_sess_setup() Date: Sun, 7 Dec 2025 06:52:32 +0900 Message-ID: <2025120718-CVE-2025-40285-9158@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2172; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=TtEP0V7URPZhW+/3MpiMYPrNWfvXe8ZR5L8zAehOZX4=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkmSyedTQg5UxW+91go44Ez19ml/uitnSKUUcRaY8Jd0 vVkv9r+jlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIqlSGBSf6Du9LXlSrqy8a KuyubxDvFslTzDA/2O3OtbP2m1ISfKKV7gfkL7wovagSAA== 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: smb/server: fix possible refcount leak in smb2_sess_setup() Reference count of ksmbd_session will leak when session need reconnect. Fix this by adding the missing ksmbd_user_session_put(). The Linux kernel CVE team has assigned CVE-2025-40285 to this issue. Affected and fixed versions =========================== Fixed in 6.1.159 with commit 6fc935f798d44a8eb8a5e6659198399fbf57b981 Fixed in 6.6.117 with commit e671f9bb97805771380c98de944e2ceab6949188 Fixed in 6.12.59 with commit dcc51dfe6ff26b52cac106865a172ac982d78401 Fixed in 6.17.9 with commit d37b2c81c83d6c0d5ca582f4fe73c672983f9e0d Fixed in 6.18 with commit 379510a815cb2e64eb0a379cb62295d6ade65df0 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-40285 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: fs/smb/server/smb2pdu.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/6fc935f798d44a8eb8a5e6659198399fbf57b981 https://git.kernel.org/stable/c/e671f9bb97805771380c98de944e2ceab6949188 https://git.kernel.org/stable/c/dcc51dfe6ff26b52cac106865a172ac982d78401 https://git.kernel.org/stable/c/d37b2c81c83d6c0d5ca582f4fe73c672983f9e0d https://git.kernel.org/stable/c/379510a815cb2e64eb0a379cb62295d6ade65df0