# CVE-2025-22038: ksmbd: validate zero num_subauth before sub_auth is accessed

- Severity: High 8.3 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/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): 0.60%, higher than 50% of CVEs (2026-12-01)
- Published: 2025-04-16T14:11:56.316Z
- Modified: 2026-08-05T11:56:11.103Z
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

ksmbd: validate zero num_subauth before sub_auth is accessed

Access psid->sub_auth[psid->num_subauth - 1] without checking
if num_subauth is non-zero leads to an out-of-bounds read.
This patch adds a validation step to ensure num_subauth != 0
before sub_auth is accessed.

(As written by CVE List.)

## Affected

- Linux Linux: from 0626e6641f6b467447c81dd7678a69c66f7746cf before 3ac65de111c686c95316ade660f8ba7aea3cd3cc; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 0e36a3e080d6d8bd7a34e089345d043da4ac8283; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 56de7778a48560278c334077ace7b9ac4bfb2fd1; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 68c6c3142bfcdb049839d40a9a59ebe8ea865002; from 0626e6641f6b467447c81dd7678a69c66f7746cf before c8bfe1954a0b89e7b29b3a3e7f4c5e0ebd295e20; from 0626e6641f6b467447c81dd7678a69c66f7746cf before bf21e29d78cd2c2371023953d9c82dfef82ebb36; 5.15 (not affected: before 5.15; from 6.1.134 up to 6.1.*; from 6.6.87 up to 6.6.*; from 6.12.23 up to 6.12.*; from 6.13.11 up to 6.13.*; from 6.14.2 up to 6.14.*; from 6.15 up to *)
- linux linux_kernel: before 6.1.134; from 6.2 before 6.6.87; from 6.7 before 6.12.23; from 6.13 before 6.13.11; from 6.14 before 6.14.2

## Every score

- Linux: CVSS:3.1 8.3 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H`
- CISA-ADP: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- NVD: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/3ac65de111c686c95316ade660f8ba7aea3cd3cc> (patch)
- <https://git.kernel.org/stable/c/0e36a3e080d6d8bd7a34e089345d043da4ac8283> (patch)
- <https://git.kernel.org/stable/c/56de7778a48560278c334077ace7b9ac4bfb2fd1> (patch)
- <https://git.kernel.org/stable/c/68c6c3142bfcdb049839d40a9a59ebe8ea865002> (patch)
- <https://git.kernel.org/stable/c/c8bfe1954a0b89e7b29b3a3e7f4c5e0ebd295e20> (patch)
- <https://git.kernel.org/stable/c/bf21e29d78cd2c2371023953d9c82dfef82ebb36> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>

## Sources

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

---

Page: https://cve.day/CVE-2025-22038 · Whole record: https://cve.day/CVE-2025-22038.json · Rebuilt by cve.day 2026-11-25T22:58:56.578Z
