CVE-2024-57925: ksmbd: fix a missing return value check bug
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix a missing return value check bug
In the smb2sendinterimresp(), if ksmbdallocworkstruct() fails to allocate a node, it returns a NULL pointer to the inwork pointer. This can lead to an illegal memory write of inwork->responsebuf when allocateinterimrspbuf() attempts to perform a kzalloc() on it.
To address this issue, incorporating a check for the return value of ksmbdallocworkstruct() ensures that the function returns immediately upon allocation failure, thereby preventing the aforementioned illegal memory access.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.27-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1 - Upgrade
Upgrade
Linux kernel (ksmbd)to a version that resolves this vulnerability.Patch ksmbd: fix a missing return value check bug
Event History
Frequently Asked Questions
What is the severity of CVE-2024-57925?
CVE-2024-57925 has a severity rating that indicates it poses a risk due to a missing return value check that could lead to illegal memory access.
How do I fix CVE-2024-57925?
The fix for CVE-2024-57925 involves updating to the latest version of the Linux kernel that addresses this allocation issue.
What systems are affected by CVE-2024-57925?
CVE-2024-57925 affects systems running the Linux kernel that utilize the ksmbd SMB server.
What conditions lead to the exploitation of CVE-2024-57925?
CVE-2024-57925 can potentially be exploited when the ksmbd_alloc_work_struct fails, resulting in a NULL pointer being used.
Is there a workaround for CVE-2024-57925?
While the best practice is to update the kernel, limiting access to the SMB functionality can serve as a temporary workaround for CVE-2024-57925.