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).
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.
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.
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.