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 A10AD156678 for ; Thu, 1 May 2025 13:09:14 +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=1746104954; cv=none; b=VC3b6t+f7k1Y3bd0lWH7Zg+XKDL2bMrebk3CgoU3aAGvvd0RYuWlEZ1sSj+b+eyaw2Qwt/3a39tBCL2eHMNtQvIvr3iTt+wJrHerfYmK+cumhD3BcLtvoUOTUAO7wB8zHOiOboQnObYy7Jfu4x6fgRaFKTjWziQblsOf+o7s45o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746104954; c=relaxed/simple; bh=YPT3cxuxNsZO1gNnw2ln0HkYchsyoYl6weDAZq+C3SM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bnpnu2q6Mqtn1s1gqHHE1eSMeAeIpy4zpnv1dG7qb97lyRV2iPKMH3BwNJhwoyc9PebW+SBP6HHwgZy+xJL0bex6VHhtwQ34UH1kt4d1CNxo2Exzv66Zzo/3AxBx5JDwYLjjS1w6HEL35oIi2o52wyWPnP2dNNj1HMRhp8bxCAo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=i4IlWW2B; 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="i4IlWW2B" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A765C4CEE3; Thu, 1 May 2025 13:09:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746104954; bh=YPT3cxuxNsZO1gNnw2ln0HkYchsyoYl6weDAZq+C3SM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=i4IlWW2B39JiV4ZGY8+DNfT1wwB/ZhFyDcuNAEKid2Fz6THd48GCSl1iGvpKYoeP0 RTLvtrNGXnHvTRj8wlfjyy+GFS17iVP+Ak7nnPdyfVsEADqfiJXDsWrCKrGR4N39J9 7XkdxsY4cgGqsDoeIBgyCFfWjvSvUuGiXEP5FSE0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37778: ksmbd: Fix dangling pointer in krb_authenticate Date: Thu, 1 May 2025 15:07:26 +0200 Message-ID: <2025050116-CVE-2025-37778-7202@gregkh> X-Mailer: git-send-email 2.49.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=2347; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=kmVYJydqAXGnJXgHNR5eDMkigp4dAf5GrdxoKvKCv7o=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnCRSy1RxXyumOtq3k7UgSvPtzjku3w+k2/b6S8wL+aq A/BFYc6YlkYBJkYZMUUWb5s4zm6v+KQopeh7WmYOaxMIEMYuDgFYCKJGgzzS38sMOMSZbKSuJ/a Pm3rw1zXjf9VGOZpM2yOr6ucyWhs5TnFvUoiIkkoyQwA 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 dangling pointer in krb_authenticate krb_authenticate frees sess->user and does not set the pointer to NULL. It calls ksmbd_krb5_authenticate to reinitialise sess->user but that function may return without doing so. If that happens then smb2_sess_setup, which calls krb_authenticate, will be accessing free'd memory when it later uses sess->user. The Linux kernel CVE team has assigned CVE-2025-37778 to this issue. Affected and fixed versions =========================== Fixed in 6.1.135 with commit d5b554bc8d554ed6ddf443d3db2fad9f665cec10 Fixed in 6.6.88 with commit 1db2451de23e98bc864c6a6e52aa0d82c91cb325 Fixed in 6.12.25 with commit 6e30c0e10210c714f3d4453dc258d4abcc70364e Fixed in 6.14.4 with commit e83e39a5f6a01a81411a4558a59a10f87aa88dd6 Fixed in 6.15-rc3 with commit 1e440d5b25b7efccb3defe542a73c51005799a5f 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-37778 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/d5b554bc8d554ed6ddf443d3db2fad9f665cec10 https://git.kernel.org/stable/c/1db2451de23e98bc864c6a6e52aa0d82c91cb325 https://git.kernel.org/stable/c/6e30c0e10210c714f3d4453dc258d4abcc70364e https://git.kernel.org/stable/c/e83e39a5f6a01a81411a4558a59a10f87aa88dd6 https://git.kernel.org/stable/c/1e440d5b25b7efccb3defe542a73c51005799a5f