CVE-2023-0687
NixOS vulnerability analysis and mitigation

Overview

A vulnerability was identified in GNU C Library (glibc) 2.38, specifically affecting the __monstartup function in the gmon.c file of the Call Graph Monitor component. The issue was discovered on February 6, 2023, and was assigned CVE-2023-0687. The vulnerability relates to incorrect buffer size calculation that could potentially lead to buffer overflow (Red Hat CVE).

Technical details

The vulnerability stems from incorrect buffer size calculations in the __monstartup() function. Specifically, the hash table size calculation p->fromssize = p->textsize / HASHFRACTION was implemented incorrectly, as it should have been p->fromssize = ROUNDUP(p->textsize / HASHFRACTION, sizeof(*p->froms)). Additionally, there was a related typo in the calculation of kcountsize. These issues could result in writing beyond the allocated buffer when an arc corresponds to a call near the end of the monitored address range (Patchwork Sourceware).

Impact

The vulnerability could lead to buffer overflow conditions in specific scenarios where gmon is activated. However, the impact is limited as the inputs that could trigger this vulnerability are essentially trusted, coming from addresses of a profiled application that is built with gmon enabled (Rapid7 DB).

Mitigation and workarounds

The issue has been fixed in the GNU C Library through a patch that corrects the buffer size calculations. The fix involves proper implementation of ROUNDUP for the fromssize calculation and correction of the kcountsize calculation (Sourceware Bugzilla).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management