Miggo Logo

CVE-2022-24684: Nomad Spread Job Stanza May Trigger Panic in Servers

6.5

CVSS Score
3.1

Basic Information

EPSS Score
0.70434%
Published
2/16/2022
Updated
2/3/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/hashicorp/nomadgo>= 0.9.0, < 1.0.181.0.18
github.com/hashicorp/nomadgo>= 1.1.0, < 1.1.121.1.12
github.com/hashicorp/nomadgo>= 1.2.0, < 1.2.61.2.6

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper state management in the spread iterator when processing job updates. The key functions are:

  1. SetJob() - Failed to reset internal maps (tgSpreadInfo/groupPropertySets) when switching job versions, allowing stale spread configuration data to persist
  2. Next() - Attempted to access spreadDetails without nil checking, causing panic when processing jobs that removed spread configurations

These functions would appear in stack traces when:

  • Processing job updates with spread->no-spread configuration changes
  • Handling allocation stops while maintaining canary deployments
  • Accessing uninitialized spreadAttributeMap entries during node ranking

The added map resets in SetJob and nil checks in Next() directly correspond to the vulnerability's root cause (CWE-400) by preventing resource exhaustion through panic-induced server crashes.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

Nom** *n* Nom** *nt*rpris* *llows op*r*tors wit* jo*-su*mit **p**iliti*s to us* t** spr*** st*nz* in * w*y su** t**t it **n **us* p*ni* in Nom** s*rv*rs. T*is vuln*r**ility, *V*-****-*****, w*s *ix** in Nom** *.*.**, *.*.**, *n* *.*.*.

Reasoning

T** vuln*r**ility st*ms *rom improp*r st*t* m*n***m*nt in t** spr*** it*r*tor w**n pro**ssin* jo* up**t*s. T** k*y *un*tions *r*: *. S*tJo*() - **il** to r*s*t int*rn*l m*ps (t*Spr***In*o/*roupProp*rtyS*ts) w**n swit**in* jo* v*rsions, *llowin* st*l*