CVE-2022-49058 cifs: potential buffer overflow in handling symlinks
A buffer overflow in the Linux kernel's CIFS symlink handling allows attackers to potentially execute code or escalate privileges.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-49058?
CVE-2022-49058 is a critical memory corruption vulnerability in Linux kernel, published on 26 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-120
Which versions are affected by CVE-2022-49058?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2022-49058?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2022-49058 being exploited?
There is no known exploitation of CVE-2022-49058 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2022-49058, GHSA-8x6x-mcww-82p3, UBUNTU-CVE-2022-49058.