In the standard C library Glibc identified vulnerability (CVE-2024-2961), leading to a buffer overflow when converting specially formatted strings in ISO-2022-CN-EXT encoding using the iconv() function. The researcher who identified the problem plans On May 10, give a presentation at the OffensiveCon conference, the announcement of which mentions the possibility of exploiting the vulnerability through applications in PHP. The issue is stated to affect the entire PHP ecosystem and some applications.
When converting UCS4-encoded strings, as required by RFC 1922, the library adds some escape characters to highlight parts of the string where the encoding has been changed. The vulnerability is caused by incorrect boundary checking of internal buffers by the iconv function, which can lead to a buffer overflow of up to 4 bytes containing certain fixed values, such as '$+I', '$+J', '$+K', '$+L ', '$+M' and '$*H'. Despite the fact that meaningful exploitation of such a vulnerability seems unlikely, according to the researcher who identified the problem, this was enough to prepare several prototype exploits for a remote attack on PHP applications, leading to code execution.
Vulnerability manifests itself since 2000 and eliminated in the in-development Glibc 2.40 branch. Correction also available as patches for branches starting with Glibc 2.32. In distributions, you can track the correction of the vulnerability on the following pages: Debian, Ubuntu, Gentoo, RHEL, SUSE, Fedora, Arch.
Thanks for reading: