| From bippy-1.2.0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@kernel.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2025-37778: ksmbd: Fix dangling pointer in krb_authenticate |
| |
| 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 |
| =========================== |
| |
| Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.1.135 with commit d5b554bc8d554ed6ddf443d3db2fad9f665cec10 |
| Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.6.88 with commit 1db2451de23e98bc864c6a6e52aa0d82c91cb325 |
| Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.12.25 with commit 6e30c0e10210c714f3d4453dc258d4abcc70364e |
| Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.14.4 with commit e83e39a5f6a01a81411a4558a59a10f87aa88dd6 |
| Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.15 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 |