PT-2024-40510 · Glib · Glib

Published

2024-12-23

·

Updated

2024-12-23

CVSS v4.0

6.9

Medium

VectorAV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions glib versions 0.15.0 and later
Description The VariantStrIter::impl get function was unsound, resulting in undefined behavior due to an immutable reference being passed to a C function that mutates the pointer in-place. This caused crashes due to NULL pointer dereferences when calling std::ffi::CStr::from ptr. The issue was present since glib v0.15.0 and was fixed by passing the out-argument pointer explicitly as &mut p instead of &p.
Recommendations For glib versions 0.15.0 and later, update the VariantStrIter::impl get function to pass the out-argument pointer explicitly as &mut p instead of &p to fix the issue.

Fix

Found an issue in the description? Have something to add? Feel free to write us 👾

Related Identifiers

GHSA-WRW7-89JP-8Q8G

Affected Products

Glib