# CVE-2022-49058: cifs: potential buffer overflow in handling symlinks

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

- **Severity:** CRITICAL 9.1
- **CVSS:** 9.1 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.89% (percentile 57, 2026-11-28)
- **CWE:** CWE-120
- **Published:** 2025-02-26T01:54:29.195Z
- **Modified:** 2026-08-05T08:53:40.101Z

## Who should check

- Anyone running Linux \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 3e582749e742e662a8e9bb37cffac62dccaaa1e2; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 1316c28569a80ab3596eeab05bf5e01991e7e739; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< eb5f51756944735ac70cd8bb38637cc202e29c91; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 22d658c6c5affed10c8907e67160cef0b6c92186; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 4e166a41180be2f1e66bbb6d46448e80a9a5ec05; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 9901b07ba42b39266b34a888e48d7306fd707bee; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 515e7ba11ef043d6febe69389949c8ef5f25e9d0; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 64c4a37ac04eeb43c42d272f6e6c8c12bfcf4304
- Anyone running Linux 2.6.37

## Description

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

cifs: potential buffer overflow in handling symlinks

Smatch printed a warning:
	arch/x86/crypto/poly1305\_glue.c:198 poly1305\_update\_arch() error:
	\_\_memcpy() 'dctx-\>buf' too small (16 vs u32max)

It's caused because Smatch marks 'link\_len' as untrusted since it comes
from sscanf(). Add a check to ensure that 'link\_len' is not larger than
the size of the 'link\_str' buffer.

## Affected and fixed versions

- Linux: \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 3e582749e742e662a8e9bb37cffac62dccaaa1e2; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 1316c28569a80ab3596eeab05bf5e01991e7e739; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< eb5f51756944735ac70cd8bb38637cc202e29c91; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 22d658c6c5affed10c8907e67160cef0b6c92186; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 4e166a41180be2f1e66bbb6d46448e80a9a5ec05; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 9901b07ba42b39266b34a888e48d7306fd707bee; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 515e7ba11ef043d6febe69389949c8ef5f25e9d0; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 64c4a37ac04eeb43c42d272f6e6c8c12bfcf4304 (cvelist)
- Linux: 2.6.37 (cvelist)

## Mitigation

- Upgrade Linux to 64c4a37ac04eeb43c42d272f6e6c8c12bfcf4304 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-49058.md
Affected: Linux >= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, < 3e582749e742e662a8e9bb37cffac62dccaaa1e2; >= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, < 1316c28569a80ab3596eeab05bf5e01991e7e739; >= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, < eb5f51756944735ac70cd8bb38637cc202e29c91; >= c69c1b6eaea1b3e1eecf7ad…
Fixed in: Linux 3e582749e742e662a8e9bb37cffac62dccaaa1e2, Linux 1316c28569a80ab3596eeab05bf5e01991e7e739, Linux 22d658c6c5affed10c8907e67160cef0b6c92186, Linux 4e166a41180be2f1e66bbb6d46448e80a9a5ec05, Linux 9901b07ba42b39266b34a888e48d7306fd707bee, Linux 515e7ba11ef043d6febe69389949c8ef5f25e9d0, Linux 64c4a…

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-2022-49058 being exploited?

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

### How serious is CVE-2022-49058?

Critical: CVSS 9.1 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2022-49058?

Linux \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 3e582749e742e662a8e9bb37cffac62dccaaa1e2; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 1316c28569a80ab3596eeab05bf5e01991e7e739; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< eb5f51756944735ac70cd8bb38637cc202e29c91; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 22d658c6c5affed10c8907e67160cef0b6c92186; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 4e166a41180be2f1e66bbb6d46448e80a9a5ec05; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 9901b07ba42b39266b34a888e48d7306fd707bee; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 515e7ba11ef043d6febe69389949c8ef5f25e9d0; \>= c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131, \< 64c4a37ac04eeb43c42d272f6e6c8c12bfcf4304; Linux 2.6.37.

### Is there a fix for CVE-2022-49058?

Yes. Fixed in Linux 3e582749e742e662a8e9bb37cffac62dccaaa1e2, Linux 1316c28569a80ab3596eeab05bf5e01991e7e739, Linux 22d658c6c5affed10c8907e67160cef0b6c92186, Linux 4e166a41180be2f1e66bbb6d46448e80a9a5ec05, Linux 9901b07ba42b39266b34a888e48d7306fd707bee, Linux 515e7ba11ef043d6febe69389949c8ef5f25e9d0, Linux 64c4a37ac04eeb43c42d272f6e6c8c12bfcf4304. Upgrade Linux to 64c4a37ac04eeb43c42d272f6e6c8c12bfcf4304 or later.

### How do I check if I'm affected by CVE-2022-49058?

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

- patch: <https://git.kernel.org/stable/c/3e582749e742e662a8e9bb37cffac62dccaaa1e2>
- patch: <https://git.kernel.org/stable/c/1316c28569a80ab3596eeab05bf5e01991e7e739>
- patch: <https://git.kernel.org/stable/c/eb5f51756944735ac70cd8bb38637cc202e29c91>
- patch: <https://git.kernel.org/stable/c/22d658c6c5affed10c8907e67160cef0b6c92186>
- patch: <https://git.kernel.org/stable/c/4e166a41180be2f1e66bbb6d46448e80a9a5ec05>
- patch: <https://git.kernel.org/stable/c/9901b07ba42b39266b34a888e48d7306fd707bee>
- patch: <https://git.kernel.org/stable/c/515e7ba11ef043d6febe69389949c8ef5f25e9d0>
- patch: <https://git.kernel.org/stable/c/64c4a37ac04eeb43c42d272f6e6c8c12bfcf4304>

## 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-2022-49058>

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