CVE-2025-21946 ksmbd: fix out-of-bounds in parse_sec_desc()
An out-of-bounds read in the Linux kernel ksmbd module allows attackers to cause memory corruption, potentially leading to code execution or system crashes.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-21946?
CVE-2025-21946 is a high-severity memory corruption vulnerability in Linux kernel, published on 1 Apr 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix out-of-bounds in parse_sec_desc()
If osidoffset, gsidoffset and dacloffset could be greater than smb_ntsd struct size. If it is smaller, It could cause slab-out-of-bounds. And when validating sid, It need to check it included subauth array size.
Weakness: CWE-125
Which versions are affected by CVE-2025-21946?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-21946?
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-2025-21946 being exploited?
There is no known exploitation of CVE-2025-21946 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2025-21946, DEBIAN-CVE-2025-21946, GHSA-7qmx-chg2-w65c, ROOT-OS-DEBIAN-12-CVE-2025-21946, ROOT-OS-UBUNTU-2204-CVE-2025-21946, ROOT-OS-UBUNTU-2404-CVE-2025-21946 and 1 more.