Skip to main content
Vulnerability Database/CVE-2026-111152

CVE-2026-111152: Game Music Emu Buffer Overflow Vulnerability

CVE-2026-111152 is a heap out-of-bounds read flaw in Game Music Emu that allows attackers to crash applications through crafted ZXAYEMUL files. This post explains the technical details, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-111152 Overview

CVE-2026-111152 is a heap out-of-bounds read vulnerability in Game Music Emu (libgme) through version 0.6.5. The flaw resides in the AY loader's get_data function and stems from an integer underflow in the track-table bounds check. Attackers can craft a malicious ZXAYEMUL file with an oversized track table that triggers the underflow. Processing the file via gme_track_info or gme_start_track causes the library to read past the end of the file buffer, crashing applications that consume libgme. The weakness is classified as CWE-125 (Out-of-bounds Read).

Critical Impact

Crafted ZXAYEMUL files trigger out-of-bounds reads in libgme, crashing media players, converters, and other downstream consumers that parse untrusted AY files.

Affected Products

  • Game Music Emu (libgme) versions through 0.6.5
  • Applications and media players that embed libgme for AY/ZXAYEMUL file parsing
  • Downstream Linux distribution packages shipping unpatched libgme

Discovery Timeline

  • 2026-10-15 - CVE-2026-111152 published to NVD
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-111152

Vulnerability Analysis

The defect lives in gme/Ay_Emu.cpp within the AY emulator loader. The get_data helper validates that a pointer offset inside the parsed file does not exceed file_size - 2. Because file_size is treated as an unsigned value, a small or malformed file produces an integer underflow when 2 is subtracted. The resulting bounds check wraps to a very large unsigned value, so pointer comparisons that should fail will instead succeed. The loader then dereferences memory past the end of the heap-allocated file buffer. Downstream code paths reached through gme_track_info and gme_start_track propagate the invalid read, producing a crash in any process linking libgme.

Root Cause

The root cause is unchecked unsigned arithmetic in the track-table bounds verification. The original code used assert( (unsigned long) pos <= (unsigned long) file_size - 2 ). Assertions are typically compiled out in release builds, leaving no runtime guard. When file_size is less than 2, the subtraction underflows and the comparison yields an attacker-friendly result.

Attack Vector

An attacker supplies a crafted ZXAYEMUL file to any application that uses libgme to enumerate or start tracks. User interaction is required to open or process the file. Exploitation does not require authentication or elevated privileges on the target. The documented impact is a crash of the libgme consumer; information disclosure through the out-of-bounds read is not demonstrated in the public analysis.

cpp
// Patch from upstream commit ae10a8f05479e3c8f80429e7a59759fed06f8c13
// gme/Ay_Emu.cpp - Don't read farther than buffer allows
{
	long pos = ptr - (byte const*) file.header;
	long file_size = file.end - (byte const*) file.header;
-	assert( (unsigned long) pos <= (unsigned long) file_size - 2 );
+	// assert( (unsigned long) pos <= (unsigned long) file_size - 2 );
+	if ( (unsigned long) pos > (unsigned long) file_size - 2 )
+		return 0; // Don't read farther than buffer allows
	int offset = (int16_t) get_be16( ptr );
	if ( !offset || uint32_t (pos + offset) > uint32_t (file_size - min_size) )
		return 0;

Source: GitHub Commit ae10a8f

Detection Methods for CVE-2026-111152

Indicators of Compromise

  • Unexpected process crashes or segmentation faults in applications linking libgme immediately after opening an AY or ZXAYEMUL file.
  • Presence of ZXAYEMUL files with abnormally small sizes or oversized declared track tables arriving from untrusted sources (email, web downloads, shared storage).
  • Core dumps referencing Ay_Emu::get_data, gme_track_info, or gme_start_track call frames.

Detection Strategies

  • Scan file repositories for ZXAYEMUL/AY files and validate their headers against expected size ranges before passing them to media processing pipelines.
  • Run libgme consumers under AddressSanitizer during pre-production testing to surface the out-of-bounds read on sample inputs.
  • Inventory installed packages that depend on libgme (such as audio players and format converters) and flag versions at or below 0.6.5.

Monitoring Recommendations

  • Monitor endpoints for repeated crashes of media players or audio tooling, which may indicate crafted file delivery attempts.
  • Alert on process termination events tied to media handlers when the input file originates from a browser download or email attachment.
  • Correlate file-write events for .ay and ZXAYEMUL extensions with subsequent child process crashes.

How to Mitigate CVE-2026-111152

Immediate Actions Required

  • Apply the upstream fix from commit ae10a8f05479e3c8f80429e7a59759fed06f8c13 or upgrade to a libgme build that includes the patch.
  • Rebuild and redistribute any statically linked applications that embed libgme after applying the patch.
  • Restrict handling of untrusted AY and ZXAYEMUL files until patched builds are deployed.

Patch Information

The upstream maintainers of libgme replaced the removable assert with an explicit runtime bounds check that returns 0 when the position exceeds file_size - 2. The fix is tracked in the GitHub commit log. Additional analysis is available in the VulnCheck Security Advisory and the HackMD Security Analysis. The vulnerable code path is documented in the GitHub Code Snippet.

Workarounds

  • Block or quarantine ZXAYEMUL and AY files received from untrusted sources at the email gateway and web proxy.
  • Disable AY format handling in affected media applications where the format is not required.
  • Sandbox libgme-based processing in a restricted container or seccomp profile to contain crashes and limit blast radius.
bash
# Verify installed libgme version and locate the vulnerable library
dpkg -l | grep -i libgme
ldconfig -p | grep libgme

# Rebuild from source with the upstream patch applied
git clone https://github.com/libgme/game-music-emu.git
cd game-music-emu
git checkout ae10a8f05479e3c8f80429e7a59759fed06f8c13
mkdir build && cd build
cmake .. && make && sudo make install

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.