Skip to navigation

Threat reportVulnerabilityTL-2026-6982

CVE-2026-107189: Integer overflow in GNU m4 reload_frozen_state() (all versions through 1.4.21)

lowTRACKING

CERT Polska reports an integer overflow or wraparound (CWE-190) in GNU m4's reload_frozen_state() in src/freeze.c. A malicious frozen-state file passed via the -R option triggers an oversized allocation request that crashes m4, causing denial of service. All versions through 1.4.21 are affected; fixed in upstream commit 69aef802fb25ab600d37210f44e5128633cbc432. First disclosed .

Key facts

IdentifiersTL-2026-6982, CVE-2026-107189
SeverityLOW
First disclosed
Affected productsGNU m4
Weaknesses (CWE)CWE-190
MalwareIndustroyer
ToolsGNU Autoconf
MITRE ATT&CK techniquesT1190 Exploit Public-Facing Application, T1195.001 Compromise Software Dependencies and Development Tools, T1204.002 Malicious File, T1499.004 Application or System Exploitation
MotivationUNKNOWN
Target sectorstechnology, software-development
Target regionsGlobal
Detection rules9 (1 shown free)
Sources8 cited sources

Detection coverage

As of 2026-11-27, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-6982 across Splunk SPL, Microsoft KQL and Sigma, covering 6 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.

Free detection: Exploitation — m4 Reloading Frozen-State File (-R / --reload-state) [Splunk SPL]

Process-creation detection of GNU m4 invoked with -R / --reload-state, the only path into reload_frozen_state() in src/freeze.c where the CVE-2026-107189 integer overflow (CWE-190, number[i] + 1 with 2147483647) is triggered. Extracts the frozen-state file (*.m4f) for triage. Technique mapping: T1190/T1204.002 come from the research; T1204 (parent) and T1203 (exploitation of a local application via a crafted file) are analyst-inferred. No in-the-wild exploitation is reported; use for exposure hunting and attempted-exploitation alerting on m4 through 1.4.21.

  • Languages: Splunk SPL, Microsoft KQL, Sigma
  • ATT&CK: T1190, T1204.002, T1204, T1203
  • Data sources: sysmon_for_linux, defender_for_endpoint_linux, linux_process_creation
  • Severity: low
  • Confidence: medium

Splunk SPL

index=linux sourcetype="sysmon:linux" EventCode=1 (Image="*/m4" OR Image="*/gm4")
| where match(CommandLine, "(^|\s)(-R\s*\S|--rel[a-z-]*)")
| rex field=CommandLine "(?:-R\s*|--rel[a-z-]*[=\s]+)(?<frozen_file>[^\s]+)"
| fillnull value="unparsed" frozen_file User ParentImage
| eval frozen_ext=if(match(frozen_file, "\.m4f$"), "m4f", "other")
| stats count min(_time) as first_seen max(_time) as last_seen values(CommandLine) as cmdlines values(ParentImage) as parent_processes values(frozen_ext) as frozen_ext by host User frozen_file
| convert ctime(first_seen) ctime(last_seen)
| sort - count

Microsoft KQL

DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("m4", "gm4")
| where ProcessCommandLine matches regex @"(^|\s)(-R\s*\S|--rel[a-z-]*)"
| extend FrozenFile = extract(@"(?:-R\s*|--rel[a-z-]*[=\s]+)(\S+)", 1, ProcessCommandLine)
| extend FrozenExt = iff(FrozenFile endswith ".m4f", "m4f", "other")
| project Timestamp, DeviceName, AccountName, FileName, FolderPath, ProcessCommandLine, FrozenFile, FrozenExt, InitiatingProcessFileName, InitiatingProcessCommandLine

Sigma

title: GNU m4 Frozen-State Reload via -R or --reload-state (CVE-2026-107189)
id: 7c1d4e9a-52b8-4f03-a6d1-9e3b8c2f4a71
status: experimental
description: Detects execution of GNU m4 with -R / --reload-state, the only code path that reaches the vulnerable reload_frozen_state() integer overflow (CWE-190) in m4 through 1.4.21.
references:
    - https://cert.pl/en/posts/2026/11/CVE-2026-107189/
    - https://www.cve.org/CVERecord?id=CVE-2026-107189
    - https://mid.mail-archive.com/bug-m4@gnu.org/msg03627.html
author: Threadlinqs Team
date: 2026/11/27
tags:
    - attack.initial_access
    - attack.t1190
    - attack.execution
    - attack.t1204
    - attack.t1204.002
    - attack.t1203
    - cve.2026.107189
logsource:
    category: process_creation
    product: linux
detection:
    selection_img:
        Image|endswith:
            - '/m4'
            - '/gm4'
    selection_cli:
        CommandLine|re: '(^|\s)(-R\s*\S|--rel[a-z-]*)'
    condition: selection_img and selection_cli
falsepositives:
    - GNU Autoconf / autom4te legitimately reloading its own .m4f frozen files in build trees
    - Developers using frozen-state files for m4 macro libraries
level: low

Known false positives:

  • GNU Autoconf/autom4te reloading its own trusted .m4f frozen files in build trees
  • Developers using frozen-state files to speed up large m4 macro libraries

Tuning notes: Baseline m4 -R usage in build pipelines for 7-14 days and allowlist known build users, parent processes (autom4te, make) and trusted frozen-file paths. Regexes are case-sensitive so m4 -r (regexp-syntax) does not match. Combined short options (e.g. -PR file) are not covered. Adjust index/sourcetype to your Linux telemetry (Sysmon for Linux or auditd EXECVE).

8 more detection rules (Splunk SPL, Microsoft KQL, Sigma) · unlock with TL Creds. Sign up free to unlock the detection rules or query them with the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account)
  • Exploitation — m4 Reloading Frozen-State File (-R / --reload-state) [Sentinel KQL] · unlock with TL Creds
  • Impact — m4 Crash or Allocation Failure After Frozen-State Reload [Sentinel KQL] · unlock with TL Creds
  • Supply Chain / Untrusted Input — m4 -R from Untrusted Path, Service Parent, or Transferred .m4f [Sentinel KQL] · unlock with TL Creds
  • Exploitation — m4 Reloading Frozen-State File (-R / --reload-state) [Sigma] · unlock with TL Creds
  • Impact — m4 Crash or Allocation Failure After Frozen-State Reload [Sigma] · unlock with TL Creds
  • Supply Chain / Untrusted Input — m4 -R from Untrusted Path, Service Parent, or Transferred .m4f [Sigma] · unlock with TL Creds
  • Impact — m4 Crash or Allocation Failure After Frozen-State Reload [Splunk SPL] · unlock with TL Creds
  • Supply Chain / Untrusted Input — m4 -R from Untrusted Path, Service Parent, or Transferred .m4f [Splunk SPL] · unlock with TL Creds

Indicators of compromise

As of 2026-11-27, Threadlinqs Intelligence tracks 6 indicators of compromise for TL-2026-6982.

Sample indicators (1 of 6)

  • File hash: 69aef802fb25ab600d37210f44e5128633cbc432

Defanged, TLP:CLEAR. Full set of 6 indicators: unlock with TL Creds.

6 indicators of compromise · unlock with TL Creds. Compare plans

Technical analysis

GNU m4 is a macro processor used widely as a build-time dependency (notably by GNU Autoconf and by programs such as sendmail that run m4 over configuration rules). CERT Polska published advisory CVE-2026-107189 on 2026-11-27. It describes an integer overflow in reload_frozen_state() in src/freeze.c. When m4 processes a malicious frozen-state file supplied with the -R (--reload-state) option, an attacker can trigger an oversized allocation request that crashes the program, resulting in denial of service. The advisory states that all versions through 1.4.21 are affected and that the issue was fixed in commit 69aef802fb25ab600d37210f44e5128633cbc432. The advisory credits Michal Majchrowicz and Marcin Wyczechowski of the AFINE Team for the responsible report. CERT Polska did not publish a CVSS score or vector, a fixed release number, or any statement of in-the-wild exploitation.

Technical background from the public bug-m4 mailing list: on 2026-03-16 a researcher (Zhihan Zheng, Beijing Institute of Technology, who said the finding came from an automated vulnerability discovery framework) reported a related issue in the frozen-state reload path of m4 1.4.21. The report states that the length parsed from the frozen file is stored in an int; a crafted value such as 2147483647 makes the expression number[i] + 1 overflow in the check 'if (number[i] + 1 > allocated[i])', followed by allocated[i] = number[i] + 1 and string[i] = xcharalloc((size_t) allocated[i]), leading to abnormal allocation and a deterministic crash during 'm4 -R'. Locations cited were src/freeze.c lines 205-217, 245-259 and 323-325. This mailing-list report does not itself reference CVE-2026-107189, so its mapping to the CERT Polska CVE is inferred from the matching component and weakness, not confirmed by the advisory.

Impact is limited. Maintainer Eric Blake noted on the list that because m4 offers syscmd(), m4 is usually not a security boundary; the notable exception is programs such as sendmail that run m4 on user-supplied rules. The reporter noted that autoconf uses frozen files but assumes they are not malicious. Exploitation requires that an attacker can get m4 to reload an attacker-controlled frozen-state file. No public PoC file, exploitation in the wild, threat actor, or network infrastructure is reported in any source. The severity of LOW is an analyst placeholder (availability-only impact, no published score).

MITRE ATT&CK techniques by tactic:

Initial Access

T1190 Exploit Public-Facing Application; T1195.001 Compromise Software Dependencies and Development Tools

Execution

T1204.002 Malicious File

Impact

T1499.004 Application or System Exploitation

Remediation

Patches

  • Upstream fix: GNU m4 commit 69aef802fb25ab600d37210f44e5128633cbc432 (CERT Polska); no fixed release number has been published in the advisory
  • Apply distribution packages that backport this commit once available

Immediate actions

  • Do not run m4 -R (--reload-state) on frozen-state files from untrusted or unverified sources
  • Inventory systems and build pipelines that invoke m4 with -R or process frozen files (.m4f)
  • Treat any service that feeds user-controlled input or state files to m4 (for example sendmail-style rule processing) as in scope and restrict that input

Workarounds

  • Avoid the -R option and frozen-state files from untrusted origins
  • Verify integrity (hash/signature) of any frozen-state file before reloading

Longer-term hardening

  • Track distribution security trackers for packaged m4 updates carrying commit 69aef802fb25ab600d37210f44e5128633cbc432
  • Run m4 in build pipelines under resource limits (memory cgroup/ulimit) and as an unprivileged user so a crash or oversized allocation is contained

Affected and fixed versions

  • GNU — m4
    Vulnerable versions: all versions through 1.4.21
    Fixed in: upstream commit 69aef802fb25ab600d37210f44e5128633cbc432 (no release number published)

Timeline

  • Earlier upstream commit b5fe50a4 ('Detect integer overflow when loading frozen file', reported by Jim Meyering) rewrote the GET_NUMBER macro in reload_frozen_state() to reject out-of-range values; the 2026 advisory concerns a remaining overflow in the same reload path.
  • GNU m4 1.4.21 released (per NEWS); this is the last version listed as affected.
  • Researcher Zhihan Zheng posts a report on the public bug-m4 list describing an int overflow in the locked-ioc-2 frozen-state reload path (number[i] + 1 with value 2147483647) causing a crash with m4 -R.
  • Maintainer Eric Blake comments on a related report that m4 is generally not a security boundary, except where programs such as sendmail run m4 on user rules.
  • Reporter apologizes for public posting and states future reports will use private channels.
  • CERT Polska publishes advisory for CVE-2026-107189: integer overflow (CWE-190) in reload_frozen_state() in locked-ioc-2, all versions through 1.4.21 affected; fixed in commit locked-ioc-1; credits Michal Majchrowicz and Marcin Wyczechowski (AFINE Team).

Sources cited

Drafted by the Threadlinqs research pipeline from 8 sources; published ; last updated —.

Threadlinqs Intelligence — Real-Time Threat Detection Platform

// threat_feed
$ sort --newest
Showing all threats

Live intelligence console

Threat level

Latest Threats