{"id":"CVE-2025-37778","state":"PUBLISHED","title":"ksmbd: Fix dangling pointer in krb_authenticate","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: Fix dangling pointer in krb_authenticate\n\nkrb_authenticate frees sess->user and does not set the pointer\nto NULL. It calls ksmbd_krb5_authenticate to reinitialise\nsess->user but that function may return without doing so. If\nthat happens then smb2_sess_setup, which calls krb_authenticate,\nwill be accessing free'd memory when it later uses sess->user.","publishedAt":"2025-05-01T13:07:16.472Z","updatedAt":"2026-10-15T21:51:59.708Z","severity":{"score":9.8,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"b61f04d5d73c53d183019bafe22fb700a739bac5","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"d5b554bc8d554ed6ddf443d3db2fad9f665cec10","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"1db2451de23e98bc864c6a6e52aa0d82c91cb325","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"6e30c0e10210c714f3d4453dc258d4abcc70364e","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"e83e39a5f6a01a81411a4558a59a10f87aa88dd6","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"1e440d5b25b7efccb3defe542a73c51005799a5f","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.203","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.135","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.88","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.25","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.14.4","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c"]}],"references":["https://git.kernel.org/stable/c/b61f04d5d73c53d183019bafe22fb700a739bac5","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","https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:03.054Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/37xxx/CVE-2025-37778.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-37778","state":"PUBLISHED","datePublished":"2025-05-01T13:07:16.472Z","dateUpdated":"2026-10-15T21:51:59.708Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:23.940Z"},"containers":{"cna":{"title":"ksmbd: Fix dangling pointer in krb_authenticate","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: Fix dangling pointer in krb_authenticate\n\nkrb_authenticate frees sess->user and does not set the pointer\nto NULL. It calls ksmbd_krb5_authenticate to reinitialise\nsess->user but that function may return without doing so. If\nthat happens then smb2_sess_setup, which calls krb_authenticate,\nwill be accessing free'd memory when it later uses sess->user."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"b61f04d5d73c53d183019bafe22fb700a739bac5","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"d5b554bc8d554ed6ddf443d3db2fad9f665cec10","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"1db2451de23e98bc864c6a6e52aa0d82c91cb325","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"6e30c0e10210c714f3d4453dc258d4abcc70364e","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"e83e39a5f6a01a81411a4558a59a10f87aa88dd6","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"1e440d5b25b7efccb3defe542a73c51005799a5f","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.203","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.135","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.88","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.25","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.14.4","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/b61f04d5d73c53d183019bafe22fb700a739bac5"},{"url":"https://git.kernel.org/stable/c/d5b554bc8d554ed6ddf443d3db2fad9f665cec10"},{"url":"https://git.kernel.org/stable/c/1db2451de23e98bc864c6a6e52aa0d82c91cb325"},{"url":"https://git.kernel.org/stable/c/6e30c0e10210c714f3d4453dc258d4abcc70364e"},{"url":"https://git.kernel.org/stable/c/e83e39a5f6a01a81411a4558a59a10f87aa88dd6"},{"url":"https://git.kernel.org/stable/c/1e440d5b25b7efccb3defe542a73c51005799a5f"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL"},"scenarios":[{"lang":"en","value":"AV:N - ksmbd is the in-kernel SMB server listening on TCP port 445; the vulnerable krb5_authenticate path is reached by processing an attacker-supplied SMB2 SESSION_SETUP request from a remote client.\nAC:L - The attacker deterministically forces the dangling pointer by sending a Kerberos SPNEGO blob that ksmbd_krb5_authenticate rejects before reinitializing sess->user; no race or uncontrolled condition is involved, and Kerberos-enabled ksmbd is a normal AD deployment.\nPR:N - In the most severe reasonable deployment (guest access enabled), the attacker establishes a VALID session with no credentials, then re-authenticates with a failing Kerberos blob; the failing krb5 exchange itself needs no valid credentials, so no privileges are required.\nUI:N - The entire attack is driven by the remote client sending crafted SMB2 packets; no action by any local user or victim is needed.\nS:U - The use-after-free and double-free corrupt kernel heap state within the kernel's own security authority, without crossing into a separate security scope such as a VM or IOMMU boundary.\nC:H - The dangling sess->user is read after being freed and its slab slot can be reallocated with attacker-controlled contents, yielding a use-after-free read primitive over kernel memory.\nI:H - The double-free plus freeing of pointer fields (name/passkey/sgid) read from a reallocatable freed object provides a controlled-free/heap-corruption primitive that can be leveraged into arbitrary write and control-flow hijack.\nA:H - The use-after-free and double-free readily cause slab corruption and a kernel oops/panic, taking down the system."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:57:29.622Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"5.15.203"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.1.135"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.6.88"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.12.25"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.14.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.15"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T19:54:55.466Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-37778","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:45:08.250417Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:51:59.708Z"}}]}}}