A heap-buffer-overflow READ of 1 byte occurs in gkeyfilegetlocalestringlist() at gkeyfile.c:2464 when the resolved locale string value is an empty string (""). The function computes len = strlen(value) which yields 0, then accesses value[len - 1]. Since len is gsize(unsigned), len - 1 wraps to SIZEMAX, causing a read of 1 byte before the heap allocation (under-read). Any application that loads a key file from untrusted input and calls gkeyfilegetlocalestringlist() on a key whose value is empty is affected. The key file format is commonly used for .desktop files and application configuration.
A flaw was found in glib. Missing validation of offset and count parameters in the gbufferedinputstreampeek() function can lead to an integer overflow during length calculation. When specially crafted values are provided, this overflow results in an incorrect size being passed to memcpy(), triggering a buffer overflow. This can cause application crashes, leading to a Denial of Service (DoS).
DISPUTED GLib 2.31.8 and earlier, when the gstrhash function is used, computes hash values without restricting the ability to trigger hash collisions predictably, which allows context-dependent attackers to cause a denial of service (CPU consumption) via crafted input to an application that maintains a hash table. NOTE: this issue may be disputed by the vendor; the existence of the gstrhash function is not a vulnerability in the library, because callers of ghashtablenew and ghashtablenewfull can specify an arbitrary hash function that is appropriate for the application.
gio/gsocketclient.c in GNOME GLib 2.59.2 does not ensure that a parent GTask remains alive during the execution of a connection-attempting enumeration, which allows remote attackers to cause a denial of service (gsocketclientconnectedcallback mishandling and application crash) via a crafted web site, as demonstrated by GNOME Web (aka Epiphany).
An integer wraparound was discovered in glib due to passing a 64 bit sized value to function gmemdup() which accepts a 32 bits number as argument. An attacker may abuse this flaw when an application linked against the glib library uses gbytesnew() function or possibly other functions that use gmemdup() underneath and accept a 64 bits argument as size. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.
Multiple integer overflows in glib/gbase64.c in GLib before 2.20 allow context-dependent attackers to execute arbitrary code via a long string that is converted either (1) from or (2) to a base64 representation.
The gfilecopy function in glib 2.0 sets the permissions of a target file to the permissions of a symbolic link (777), which allows user-assisted local users to modify files of other users, as demonstrated by using Nautilus to modify the permissions of the user home directory.
GNOME Display Manager (gdm) before 2.32.2, when glib 2.28 is used, enables execution of a web browser with the uid of the gdm account, which allows local users to gain privileges via vectors involving the x-scheme-handler/http MIME type.
Integer overflow in the loadimage function in file-xwd.c in the X Window Dump (XWD) plug-in in GIMP 2.6.9 and earlier, when used with glib before 2.24, allows remote attackers to cause a denial of service (crash) and possibly execute arbitrary code via a large color entries value in an X Window System (XWD) image dump.
Heap-based buffer overflow in the readxwdcols function in file-xwd.c in the X Window Dump (XWD) plug-in in GIMP 2.6.9 and earlier allows remote attackers to cause a denial of service (crash) and possibly execute arbitrary code via an X Window System (XWD) image dump with more colors than color map entries.
Eye of GNOME (aka eog) 3.16.5, 3.17.x, 3.18.x before 3.18.3, 3.19.x, and 3.20.x before 3.20.4, when used with glib before 2.44.1, allow remote attackers to cause a denial of service (out-of-bounds write and crash) via vectors involving passing invalid UTF-8 to GMarkup.
DISPUTED GNOME GLib before 2.65.3 has an integer overflow, that might lead to an out-of-bounds write, in goptiongroupaddentries. NOTE: the vendor's position is "Realistically this is not a security issue. The standard pattern is for callers to provide a static list of option entries in a fixed number of calls to goptiongroupaddentries()." The researcher states that this pattern is undocumented.
An issue was discovered in GNOME GLib before 2.66.8. When gfilereplace() is used with GFILECREATEREPLACEDESTINATION to replace a path that is a dangling symlink, it incorrectly also creates the target of the symlink as an empty file, which could conceivably have security relevance if the symlink is attacker-controlled. (If the path is a symlink to a file that already exists, then the contents of that file correctly remain unchanged.)
An issue was discovered in GNOME GLib before 2.66.7 and 2.67.x before 2.67.4. If gbytearraynewtake() was called with a buffer of 4GB or more on a 64-bit platform, the length would be truncated modulo 232, causing unintended length truncation.
A flaw was found in glib before version 2.63.6. Due to random charset alias, pkexec can leak content from files owned by privileged users to unprivileged ones under the right condition.
A flaw was found in GLib. The GVariant deserialization code is vulnerable to a heap buffer overflow introduced by the fix for CVE-2023-32665. This bug does not affect any released version of GLib, but does affect GLib distributors who followed the guidance of GLib developers to backport the initial fix for CVE-2023-32665.
Henne Vogelsang discovered that, as of glib 2.28, it was possible to run the default web browser (usually Firefox) in the GDM session, as the gdm user. This resulted in uncontrolled access to the local file system and possibly other resources as the gdm user. This is because glib 2.28 has changed the way URI handlers are registered; while it used to be controlled via gconf settings, it now is controlled via x-scheme-handler/<scheme> mime types (e.g. x-scheme-handler/http).
Statement:
Not vulnerable. This issue did not affect the versions of gdm as shipped with Red Hat Enterprise Linux 4, 5, or 6.