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-105839 Overview
CVE-2026-105839 is an integer overflow vulnerability [CWE-190] in libmikmod versions prior to 3.3.14. The flaw resides in the Oktalyzer loader function OKT_doPBOD() within libmikmod/loaders/load_okt.c. Attackers craft an OKT module whose SLEN chunk causes the 16-bit numtrk value to wrap during a multiplication of pattern count and channel count. The wrapped value leads to under-allocation of track pointers, and subsequent PBOD writes overflow the heap buffer. Exploitation can produce application crashes or arbitrary code execution in processes that load untrusted OKT files.
Critical Impact
A crafted Oktalyzer module processed by a vulnerable libmikmod build triggers a heap buffer overflow that can lead to code execution in the host application.
Affected Products
- libmikmod versions before 3.3.14
- Applications linking the vulnerable libmikmod for OKT module playback
- Downstream distributions packaging libmikmod 3.3.13 or earlier
Discovery Timeline
- 2026-10-06 - CVE-2026-105839 published to the National Vulnerability Database (NVD)
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-105839
Vulnerability Analysis
The vulnerability lives in the Oktalyzer loader at load_okt.c line 286. The loader computes of.numtrk = of.numpat * of.numchn and stores the result in a UWORD (16-bit unsigned) field. When the product of pattern count (numpat) and channel count (numchn) exceeds 65535, the value silently wraps. The loader then calls AllocTracks() with the truncated count, under-allocating the track pointer array. Later, OKT_doPBOD() iterates using the untruncated logical count and writes PBOD data past the end of the allocated track pointer region, corrupting adjacent heap metadata and chunks.
Root Cause
The root cause is the absence of an overflow check prior to narrowing a 32-bit multiplication result into a 16-bit field. The loader trusts attacker-controlled dimensions from the module header without validating that their product fits in UWORD range. This is a classic numeric truncation error that produces a size-vs-use mismatch between allocator and writer.
Attack Vector
Exploitation requires an attacker to deliver a crafted OKT file to a user or service that parses it with a vulnerable libmikmod. Processing is local, but the file itself can originate from any channel: email, web download, media library import, or embedded game assets. User interaction (opening the file in a player) is typically required, consistent with the CVSS vector AV:L/UI:P.
// Vendor patch: libmikmod/loaders/load_okt.c
// Fix: validate the 32-bit product before narrowing to UWORD
int u;
if (!patnum) {
- of.numtrk = of.numpat * of.numchn;
+ const unsigned int numtrk = of.numpat * of.numchn;
+ if (numtrk > 65535) {
+ _mm_errno = MMERR_LOADING_PATTERN;
+ return 0;
+ }
+ of.numtrk = (UWORD)numtrk;
if (!AllocTracks() || !AllocPatterns())
return 0;
Source: sezero/mikmod commit 097b692
Detection Methods for CVE-2026-105839
Indicators of Compromise
- OKT module files whose numpat * numchn product exceeds 65535
- Crashes in processes linking libmikmod with stack frames inside OKT_doPBOD or AllocTracks
- Heap corruption reports (glibc malloc assertions, ASan heap-buffer-overflow) during media import or playback
Detection Strategies
- Inventory binaries and packages that embed or link libmikmod and flag versions below 3.3.14
- Parse OKT files at the gateway and reject headers where pattern count multiplied by channel count exceeds the 16-bit range
- Build fuzzing harnesses for OKT_Load and run them under AddressSanitizer to confirm patch status
Monitoring Recommendations
- Alert on repeated crashes of media players, converters, or game engines that process user-supplied modules
- Collect core dumps from affected hosts and inspect for libmikmod frames in the fault chain
- Track file-type telemetry for .okt and related tracker formats arriving from untrusted sources
How to Mitigate CVE-2026-105839
Immediate Actions Required
- Upgrade libmikmod to 3.3.14 or later across all systems and container images
- Rebuild and redistribute downstream applications that statically link libmikmod
- Block or quarantine untrusted OKT files until patched builds are deployed
Patch Information
The fix is published in libmikmod 3.3.14. The commit 097b69281fad6ba38a553569e6f55dbfdd71dc2a adds an explicit bounds check that rejects OKT modules whose computed numtrk exceeds 65535 and returns MMERR_LOADING_PATTERN. See the libmikmod 3.3.14 NEWS entry and the VulnCheck advisory for additional context.
Workarounds
- Disable the OKT loader in applications that expose a per-format configuration option
- Restrict module loading to trusted directories and known-good files via application sandboxing
- Run media processing in isolated, low-privilege processes with heap hardening (MALLOC_CHECK_, ASLR, hardened allocators) enabled
# Verify installed version and upgrade on Debian/Ubuntu
dpkg -l | grep libmikmod
apt-get update && apt-get install --only-upgrade libmikmod3
# Build from source
git clone https://github.com/sezero/mikmod.git
cd mikmod/libmikmod
git checkout libmikmod-3.3.14
./configure && 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

