Bug 2494872

Summary: CVE-2026-58011 glib2: out-of-bounds read in glib/gdatetime.c:g_date_time_get_ymd via invalid GDateTime [fedora-all]
Product: [Fedora] Fedora Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: glib2Assignee: Matthias Clasen <mclasen>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: gnome-sig, lpavan, mclasen, rhughes, rstrode
Target Milestone: ---Keywords: Security, SecurityTracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: {"flaws": ["d5dbd9e2-ac4b-4c60-89d5-2a510990ec24"]}
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-08-12 14:48:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2492245    

Description Guilherme de Almeida Suckevicz 2026-06-30 12:57:58 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

A global-buffer-overflow (out-of-bounds read) exists in GLib's g_date_time_get_ymd() function, triggered when operating on an invalid GDateTime object produced by g_date_time_add_full(). The g_date_time_add_full() function does not validate that the resulting date falls within the supported range (years 1–9999), allowing construction of a GDateTime with a negative or zero days field. When any getter function (e.g., g_date_time_get_month(), g_date_time_get_year()) is subsequently called, the internal g_date_time_get_ymd() routine computes a negative array index, causing a 2-byte OOB read from adjacent global data.

Comment 1 lpavan 2026-08-12 14:48:52 UTC
This was fixed upstream with the following releases:

- 2.86.5
- 2.88.1
- 2.89.0

Given that Fedora currently ships 2.86.5 or later across all releases, I'm going to close this.