CVE-2023-52464: EDAC/thunderx: Fix possible out-of-bounds string access
Enabling -Wstringop-overflow globally exposes a warning for a common bug in the usage of strncat():
drivers/edac/thunderxedac.c: In function 'thunderxocxcomthreadedisr': drivers/edac/thunderxedac.c:1136:17: error: 'strncat' specified bound 1024 equals destination size [-Werror=stringop-overflow=] 1136 | strncat(msg, other, OCXMESSAGESIZE); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... 1145 | strncat(msg, other, OCXMESSAGESIZE); ... 1150 | strncat(msg, other, OCXMESSAGESIZE);
...
Apparently the author of this driver expected strncat() to behave the way that strlcat() does, which uses the size of the destination buffer as its third argument rather than the length of the source buffer. The result is that there is no check on the size of the allocated buffer.
Change it to strlcat().
[ bp: Trim compiler output, fixup commit message. ]
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2023-52464?
CVE-2023-52464 has been categorized as a moderate severity vulnerability affecting specific versions of the Linux kernel.
How do I fix CVE-2023-52464?
To fix CVE-2023-52464, update your Linux kernel to a version that addresses this vulnerability, such as those provided by Debian and Red Hat.
What versions of Linux are affected by CVE-2023-52464?
CVE-2023-52464 affects multiple versions of the Linux kernel between 4.12.0 and 6.8.
What is the impact of CVE-2023-52464?
The impact of CVE-2023-52464 relates to potential string overflow issues that could lead to unexpected behavior or crashes.
Is there a patch available for CVE-2023-52464?
Yes, patches for CVE-2023-52464 are included in newer releases of the Linux kernel that users can apply.