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

- Severity: Critical 9.1 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/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): 0.87%, higher than 60% of CVEs (2026-12-01)
- Published: 2025-02-26T01:54:29.195Z
- Modified: 2026-08-05T08:53:40.101Z
- Weaknesses: CWE-120
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131 before 3e582749e742e662a8e9bb37cffac62dccaaa1e2; from c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131 before 1316c28569a80ab3596eeab05bf5e01991e7e739; from c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131 before eb5f51756944735ac70cd8bb38637cc202e29c91; from c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131 before 22d658c6c5affed10c8907e67160cef0b6c92186; from c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131 before 4e166a41180be2f1e66bbb6d46448e80a9a5ec05; from c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131 before 9901b07ba42b39266b34a888e48d7306fd707bee; from c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131 before 515e7ba11ef043d6febe69389949c8ef5f25e9d0; from c69c1b6eaea1b3e1eecf7ad2fba0208ac4a11131 before 64c4a37ac04eeb43c42d272f6e6c8c12bfcf4304; 2.6.37 (not affected: before 2.6.37; from 4.9.311 up to 4.9.*; from 4.14.276 up to 4.14.*; from 4.19.239 up to 4.19.*; from 5.4.190 up to 5.4.*; from 5.10.112 up to 5.10.*; from 5.15.35 up to 5.15.*; from 5.17.4 up to 5.17.*; from 5.18 up to *)
- linux linux_kernel: from 2.6.37 before 4.9.311; from 4.10 before 4.14.276; from 4.15 before 4.19.239; from 4.20 before 5.4.190; from 5.5 before 5.10.112; from 5.11 before 5.15.35; from 5.16 before 5.17.4; 5.18

## Every score

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

## References

- <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> (patch)

## Sources

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

---

Page: https://cve.day/CVE-2022-49058 · Whole record: https://cve.day/CVE-2022-49058.json · Rebuilt by cve.day 2026-11-25T22:58:20.127Z
