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 9477A2D63F1 for ; Fri, 4 Jul 2025 13:42:18 +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=1751636538; cv=none; b=cCt5EchvNySmFih9ra5Xg0wiAyXKeHX3L8XQb9RGVarOhW6e5eTB97clR+PKmHIEw7u/DYBBGnh13/YxCSIF98YC6D2ugNYl6rmWvGJ8kESwVm8UI7O6JcXq0M7bUIHiP7nTjfWB+lInG06QVIx2eSdc1ZzK6KOaNzEGeEmgnzE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751636538; c=relaxed/simple; bh=NYX2MhOR45mQ5ncP2mj4qsoeNXzjIoTe+2KsmouUpKE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=upm1065d2dVtYB0svs8Ed9fMQfHKzKSwLcVwd11CHJBA+QH/0Kq0mkczIIC1xb+9WaUWJG8wFHvGN8k2WAonoA7mXFleliZNE41ZTuKlPZ3eHZ6Ygoq4NIWw90Vo/6qkpv01UYPHJmd7Vbragww2K1kYRPXgs0hce1IlTHCl35Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WDss09p2; 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="WDss09p2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA0EBC4CEE3; Fri, 4 Jul 2025 13:42:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751636538; bh=NYX2MhOR45mQ5ncP2mj4qsoeNXzjIoTe+2KsmouUpKE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=WDss09p2/alZegCOZpiATW16y26b9sw8lRpAMXadTY5em1Ks8WjU/b9YVFRBrTBwF dSnofFzIHgYhtvGYOlQEX0jqfmRMPMwhrhB/kXd2Q42cbSpu07X9ekuAKUm8ktzyrc iqtrHavGf8v6fe1sW0vpl/o2//+3Q3ZJkvCHNgf0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38191: ksmbd: fix null pointer dereference in destroy_previous_session Date: Fri, 4 Jul 2025 15:37:20 +0200 Message-ID: <2025070414-CVE-2025-38191-ee47@gregkh> X-Mailer: git-send-email 2.50.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=2404; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=IpgGDuQ6C2d3Cp1RKePlbjlzPtwdZvRV6S5o2eMuiro=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnpN7n2n3up5zNvYXez4Z1J327wvXpud6zW83PZF6nok +8sFnAxdcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE9F8yLNj05rNUgvTv+cJu LkeuTfg66ybj/DaGBde//V4dJdjv9k9c6qto3LqWSf37ZwEA 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: ksmbd: fix null pointer dereference in destroy_previous_session If client set ->PreviousSessionId on kerberos session setup stage, NULL pointer dereference error will happen. Since sess->user is not set yet, It can pass the user argument as NULL to destroy_previous_session. sess->user will be set in ksmbd_krb5_authenticate(). So this patch move calling destroy_previous_session() after ksmbd_krb5_authenticate(). The Linux kernel CVE team has assigned CVE-2025-38191 to this issue. Affected and fixed versions =========================== Fixed in 6.1.142 with commit 281afc52e2961cd5dd8326ebc9c5bc40904c0468 Fixed in 6.6.95 with commit 0902625a24eea7fdc187faa5d97df244d159dd6e Fixed in 6.12.35 with commit 1193486dffb7432a09f57f5d09049b4d4123538b Fixed in 6.15.4 with commit 076f1adefb9837977af7ed233883842ddc446644 Fixed in 6.16-rc3 with commit 7ac5b66acafcc9292fb935d7e03790f2b8b2dc0e 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-38191 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/281afc52e2961cd5dd8326ebc9c5bc40904c0468 https://git.kernel.org/stable/c/0902625a24eea7fdc187faa5d97df244d159dd6e https://git.kernel.org/stable/c/1193486dffb7432a09f57f5d09049b4d4123538b https://git.kernel.org/stable/c/076f1adefb9837977af7ed233883842ddc446644 https://git.kernel.org/stable/c/7ac5b66acafcc9292fb935d7e03790f2b8b2dc0e