# CVE-2025-38562: ksmbd: fix null pointer dereference error in generate_encryptionkey

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 24.8%, higher than 97% of CVEs (2026-12-01)
- Published: 2025-08-19T17:02:39.450Z
- Modified: 2026-06-17T09:17:06.960Z
- Weaknesses: CWE-476
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

ksmbd: fix null pointer dereference error in generate_encryptionkey

If client send two session setups with krb5 authenticate to ksmbd,
null pointer dereference error in generate_encryptionkey could happen.
sess->Preauth_HashValue is set to NULL if session is valid.
So this patch skip generate encryption key if session is valid.

(As written by CVE List.)

## Affected

- Linux Linux: from 0626e6641f6b467447c81dd7678a69c66f7746cf before 922f85e6e88fdea723a26854c3a6dcb4beb8d0b9; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 96a82e19434a2522525baab59c33332658bc7653; from 0626e6641f6b467447c81dd7678a69c66f7746cf before d79c8bebaa622ee223128be7c66d8aaeeb634a57; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 2a30ed6428ce83afedca1a6c5c5c4247bcf12d0e; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 015ef163d65496ae3ba6192c96140a22743f0353; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 9c2dbbc959e1fcc6f603a1a843e9cf743ba383bb; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 9b493ab6f35178afd8d619800df9071992f715de; 5.15 (not affected: before 5.15; from 5.15.203 up to 5.15.*; from 6.1.148 up to 6.1.*; from 6.6.102 up to 6.6.*; from 6.12.42 up to 6.12.*; from 6.15.10 up to 6.15.*; from 6.16.1 up to 6.16.*; from 6.17 up to *)
- linux linux_kernel: from 5.15 before 6.1.148; from 6.2 before 6.6.102; from 6.7 before 6.12.42; from 6.13 before 6.15.10; from 6.16 before 6.16.1
- debian debian_linux: 11.0

## References

- <https://git.kernel.org/stable/c/922f85e6e88fdea723a26854c3a6dcb4beb8d0b9>
- <https://git.kernel.org/stable/c/96a82e19434a2522525baab59c33332658bc7653> (patch)
- <https://git.kernel.org/stable/c/d79c8bebaa622ee223128be7c66d8aaeeb634a57> (patch)
- <https://git.kernel.org/stable/c/2a30ed6428ce83afedca1a6c5c5c4247bcf12d0e> (patch)
- <https://git.kernel.org/stable/c/015ef163d65496ae3ba6192c96140a22743f0353> (patch)
- <https://git.kernel.org/stable/c/9c2dbbc959e1fcc6f603a1a843e9cf743ba383bb> (patch)
- <https://git.kernel.org/stable/c/9b493ab6f35178afd8d619800df9071992f715de> (patch)
- <https://www.zerodayinitiative.com/advisories/ZDI-25-917/> (mailing-list, third-party-advisory)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html> (mailing-list, third-party-advisory)

## Sources

- CVE List: [CVE-2025-38562](https://www.cve.org/CVERecord?id=CVE-2025-38562), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-38562](https://nvd.nist.gov/vuln/detail/CVE-2025-38562), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-38562 · Whole record: https://cve.day/CVE-2025-38562.json · Rebuilt by cve.day 2026-11-25T22:59:02.704Z
