CVE-2025-21994: ksmbd: fix incorrect validation for num_aces field of smb_acl
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix incorrect validation for numaces field of smbacl
parsedcal() validate numaces to allocate posixacestatearray.
if (numaces > ULONGMAX / sizeof(struct smbace ))
It is an incorrect validation that we can create an array of size ULONGMAX. smbacl has ->size field to calculate actual number of aces in request buffer size. Use this to check invalid numaces.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Fix incorrect validation for the smb_acl field by checking: if (num_aces > ULONG_MAX / sizeof(struct smb_ace *)) then treat num_aces as invalid and reject/handle the request before allocating posix_ace_state_array.
ksmbd (parse_dcal / smb_acl allocation) num_aces validation = Validate that num_aces does not exceed ULONG_MAX / sizeof(struct smb_ace *) before allocating posix_ace_state_array
Event History
Frequently Asked Questions
What is the severity of CVE-2025-21994?
CVE-2025-21994 is classified as a high-severity vulnerability affecting the Linux kernel.
How do I fix CVE-2025-21994?
To address CVE-2025-21994, update your Linux kernel to the latest available version that contains the fix.
What are the consequences of exploiting CVE-2025-21994?
Exploiting CVE-2025-21994 could lead to unauthorized access or modification of ACLs within the kernel.
Which versions of the Linux kernel are affected by CVE-2025-21994?
CVE-2025-21994 affects various versions of the Linux kernel up to the fixed release.
Is CVE-2025-21994 related to SMB functionality in the Linux kernel?
Yes, CVE-2025-21994 involves a fix related to incorrect validation within the SMB ACL handling of the Linux kernel.