Unfound 24yr old glibc Exploit turns into a PHP exploit - buffer overflow
by Dev - Sunday April 21, 2024 at 09:58 PM
#1
This is a 24 year old exploit that was only recently found.


Quote:... a flaw in the GNU C Library’s (glibc) iconv function (CVE-2024-2961) carries severe implications for web applications built on PHP. ...

Well shit. Please note, you actually have to have a php application that uses the exploitable functions to be at risk.

Quote:... The vulnerability, cataloged under CVE-2024-2961 and rated 8.8 on the CVSS scale, resides in the ISO-2022-CN-EXT plugin of the glibc’s iconv library. This critical flaw occurs during the charset conversion process from UCS4, where specific escape characters are required to signify changes in the charset to the library. However, due to insufficient boundary checks on internal buffers, an out-of-bounds write can occur, allowing up to three bytes to be written outside the intended memory area. ...

Quote:...
> The iconv() function in the GNU C Library versions 2.39 and older may
> overflow the output buffer passed to it by up to 4 bytes when converting
> strings to the ISO-2022-CN-EXT character set, which may be used to
> crash an application or overwrite a neighbouring variable.
>
> ISO-2022-CN-EXT uses escape sequences to indicate character set changes
> (as specified by RFC 1922).  While the SOdesignation has the expected
> bounds checks, neither SS2designation nor SS3designation have its;
> allowing a write overflow of 1, 2, or 3 bytes with fixed values:
> '$+I', '$+J', '$+K', '$+L', '$+M', or '$*H'.
...

For an actual write up on how it operates, refer to this

source Spoiler
Buffer Overlord
Deploying Precision in Every Line.
PGP Fingerprint: C1F5 5935 4992 A77B 69E1 B626 7556 1F6B 453C B36F
https://pastebin.com/raw/6k1RJQie
Reply
#2
But you need to be able to control the output format of iconv, right? I don't know if that's really a common thing tbh
Reply
#3
Buffer overflows never get old, literally
Reply
#4
(04-21-2024, 10:00 PM)Kurumi Wrote: But you need to be able to control the output format of iconv, right? I don't know if that's really a common thing tbh

Pretty much, the application has to change character encoding from any time to ISO-2022-CN-EXT character set, which is fairly specific in nature
Buffer Overlord
Deploying Precision in Every Line.
PGP Fingerprint: C1F5 5935 4992 A77B 69E1 B626 7556 1F6B 453C B36F
https://pastebin.com/raw/6k1RJQie
Reply
#5
Whooow this is good stuff! TY for sharing.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Chinese hackers exploit Fortinet VPN zero-day to steal credentials KingDice 3 1,061 02-05-2025, 07:28 AM
Last Post: fset
  New PhishWP Plugin on Russian Forum Turns Sites into Phishing Pages Fringustavo 0 649 01-06-2025, 10:19 PM
Last Post: Fringustavo
  New Linux Kernel Exploit Technique 'SLUBStick' Discovered by Researchers v12run 0 591 08-08-2024, 05:18 AM
Last Post: v12run
  New Windows Rootkit "MagicDot" - DOS-to-NT path conversion exploit Dev 7 1,001 07-15-2024, 01:44 PM
Last Post: Jenc1
  A WhatsApp zero-day exploit can cost several million dollars ssveCY008 0 1,552 10-06-2023, 07:47 AM
Last Post: ssveCY008

Forum Jump:


 Users browsing this thread: 1 Guest(s)