# CVE-2025-68219: cifs: fix memory leak in smb3\_fs\_context\_parse\_param error path

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.28% (percentile 13, 2026-11-26)
- **Published:** 2025-12-16T13:57:13.461Z
- **Modified:** 2026-10-30T13:18:19.167Z

## Who should check

- Anyone running Linux \>= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, \< a8071fd69df335362be5ecf5df5a167fd1eb5853; \>= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, \< 7627864dc3121f39e220f5253a227edf472de59e; \>= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, \< 48d69290270891f988e72edddd9688c20515421d; \>= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, \< 37010021d7e0341bb241ca00bcbae31f2c50b23f; \>= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, \< 7e4d9120cfa413dd34f4f434befc5dbe6c38b2e5
- Anyone running Linux 5.11

## Description

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

cifs: fix memory leak in smb3\_fs\_context\_parse\_param error path

Add proper cleanup of ctx-\>source and fc-\>source to the
cifs\_parse\_mount\_err error handler. This ensures that memory allocated
for the source strings is correctly freed on all error paths, matching
the cleanup already performed in the success path by
smb3\_cleanup\_fs\_context\_contents().
Pointers are also set to NULL after freeing to prevent potential
double-free issues.

This change fixes a memory leak originally detected by syzbot. The
leak occurred when processing Opt\_source mount options if an error
happened after ctx-\>source and fc-\>source were successfully
allocated but before the function completed.

The specific leak sequence was:
1. ctx-\>source = smb3\_fs\_context\_fullpath(ctx, '/') allocates memory
2. fc-\>source = kstrdup(ctx-\>source, GFP\_KERNEL) allocates more memory
3. A subsequent error jumps to cifs\_parse\_mount\_err
4. The old error handler freed passwords but not the source strings,
causing the memory to leak.

This issue was not addressed by commit e8c73eb7db0a ("cifs: client:
fix memory leak in smb3\_fs\_context\_parse\_param"), which only fixed
leaks from repeated fsconfig() calls but not this error path.

Patch updated with minor change suggested by kernel test robot

## Affected and fixed versions

- Linux: \>= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, \< a8071fd69df335362be5ecf5df5a167fd1eb5853; \>= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, \< 7627864dc3121f39e220f5253a227edf472de59e; \>= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, \< 48d69290270891f988e72edddd9688c20515421d; \>= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, \< 37010021d7e0341bb241ca00bcbae31f2c50b23f; \>= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, \< 7e4d9120cfa413dd34f4f434befc5dbe6c38b2e5 (cvelist)
- Linux: 5.11 (cvelist)

## Mitigation

- Upgrade Linux to 7e4d9120cfa413dd34f4f434befc5dbe6c38b2e5 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-68219. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-68219.md
Affected: Linux >= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, < a8071fd69df335362be5ecf5df5a167fd1eb5853; >= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, < 7627864dc3121f39e220f5253a227edf472de59e; >= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, < 48d69290270891f988e72edddd9688c20515421d; >= 24e0a1eff9e2b9835a6e7c1…
Fixed in: Linux 7627864dc3121f39e220f5253a227edf472de59e, Linux 48d69290270891f988e72edddd9688c20515421d, Linux 37010021d7e0341bb241ca00bcbae31f2c50b23f, Linux 7e4d9120cfa413dd34f4f434befc5dbe6c38b2e5

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-68219 being exploited?

There is no confirmed exploitation: CVE-2025-68219 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-68219?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2025-68219?

Linux \>= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, \< a8071fd69df335362be5ecf5df5a167fd1eb5853; \>= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, \< 7627864dc3121f39e220f5253a227edf472de59e; \>= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, \< 48d69290270891f988e72edddd9688c20515421d; \>= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, \< 37010021d7e0341bb241ca00bcbae31f2c50b23f; \>= 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f, \< 7e4d9120cfa413dd34f4f434befc5dbe6c38b2e5; Linux 5.11.

### Is there a fix for CVE-2025-68219?

Yes. Fixed in Linux 7627864dc3121f39e220f5253a227edf472de59e, Linux 48d69290270891f988e72edddd9688c20515421d, Linux 37010021d7e0341bb241ca00bcbae31f2c50b23f, Linux 7e4d9120cfa413dd34f4f434befc5dbe6c38b2e5. Upgrade Linux to 7e4d9120cfa413dd34f4f434befc5dbe6c38b2e5 or later.

### How do I check if I'm affected by CVE-2025-68219?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/a8071fd69df335362be5ecf5df5a167fd1eb5853>
- other: <https://git.kernel.org/stable/c/7627864dc3121f39e220f5253a227edf472de59e>
- other: <https://git.kernel.org/stable/c/48d69290270891f988e72edddd9688c20515421d>
- other: <https://git.kernel.org/stable/c/37010021d7e0341bb241ca00bcbae31f2c50b23f>
- other: <https://git.kernel.org/stable/c/7e4d9120cfa413dd34f4f434befc5dbe6c38b2e5>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-68219>

HTML: <https://flawdb.com/CVE-2025-68219> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-68219>
