Memory Corruption Flaw in ncurses API Library Exposes Linux and macOS Systems

Multiple memory corruption vulnerabilities have been discovered in the ncurses library, which various programs use on multiple operating systems like Portable Operating System Interface (POSIX) OS, Linux OS, macOS, and FreeBSD. 

Threat actors can chain these vulnerabilities with environment variable poisoning attacks to gain escalated privileges and run codes under the name of the target program or perform other malicious actions.

Memory corruption is one of the common vulnerabilities found in modern programs that could allow threat actors to gain unauthorized access by modifying a program’s memory. The impact of this vulnerability ranges from leaking sensitive information to executing arbitrary code with escalated privileges.

However, Microsoft has disclosed these vulnerabilities with the ncurses maintainers, which have now been successfully patched.

Document
Get a Demo

Start protecting your SaaS data in just a few minutes!

With DoControl, you can keep your SaaS applications and data safe and secure by creating workflows tailored to your needs. It’s an easy and efficient way to identify and manage risks. You can mitigate the risk and exposure of your organization’s SaaS applications in just a few simple steps.

CVE-2023-29491: Memory Corruption via malformed data

This vulnerability exists in the ncurses library before 6.4 20230408, which could allow threat actors with local privileges to trigger security-based memory corruption. This can be done with the help of malformed data in the terminfo database file, which is found in $HOME/.terminfo, or with environment variables like TERMINFO or TERM.

This particular vulnerability is associated with several internal things, such as Heap out-of-bounds during terminfo database file parsing, parameterized string type confusion, stack information leak, and denial of service with canceled strings.

Terminfo database file consists of optional extended entries like Boolean, numeric, and strings. These entries are user-defined entries and are parsed by the _nc_read_termtype function, which was found to be capable of writing beyond the boundaries of a heap-allocated chunk.

The ncurses source code looks for CANCELLED_STRING and converts them to ABSENT_STRING, which is done only for ordinary strings, whereas extended strings do not get converted. Additionally, strings beginning with “k” are treated as keypad functionality, which can allow a threat actor to specify an extended string, resulting in ncurses dereference eventually causing a denial of service.

Microsoft has published a complete report about these vulnerabilities, providing detailed information about variable poisoning, exploitation, and other information.

Users are recommended to upgrade to the latest version of the ncurses library in order to prevent this vulnerability from getting exploited.

Keep informed about the latest Cyber Security News by following us on Google NewsLinkedinTwitter, and Facebook.

Guru baran

Recent Posts

BlueNoroff: New Malware Attacking MacOS Users

Researchers have uncovered a new Trojan-attacking macOS user that is associated with the BlueNoroff APT group and their ongoing RustBucket campaign.  As…

1 hour ago

Serpent Stealer Acquires Browser Passwords and Erases Intrusion Logs

Beneath the surface of the cyber realm, a silent menace emerges—crafted with the precision of the .NET framework, the Serpent…

2 hours ago

Doppelgänger: Hackers Employ AI to Launch Highly sophistication Attacks

It has been observed that threat actors are using AI technology to conduct illicit operations on social media platforms. These…

4 hours ago

Kali Linux 2023.4 Released – What’s New!

Kali Linux 2023.4, the latest version of Offensive Security's renowned operating system, has been released, and it includes the advanced…

9 hours ago

Trickbot Malware Developer Pleads Guilty & Faces 35 Years in Prison

A 40-year-old Russian national, Vladimir Dunaev, pleaded guilty for developing and deploying Trickbot malware. Trickbot, a suite of malware tools,…

11 hours ago

ICANN Launches RDRS to Assist Law Enforcement Agencies to Discover Private Info

ICANN is a non-profit organization that is responsible for coordinating the global internet's- DNS IP address allocation This organization manages…

15 hours ago