[Security] MacVim affected by CVE-2026-45130 — spell file heap buffer overflow (vim < 9.2.0450)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 64/100
Direzione di ricerca
Inizia in src/spellfile.c, da read_compound(), e confronta la logica di allocazione attuale con il commit upstream di Vim 92993329178cb1f72d700fff45ca86e1c2d369f8. Verifica che il fix per Vim 9.2.0450 sia integrato in MacVim e che l’aritmetica con segno vulnerabile non sia più presente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
[Security] MacVim affected by CVE-2026-45130 — spell file heap buffer overflow (vim < 9.2.0450)
Summary
MacVim bundles the vim source at version 9.2 (patches 1-332 in the current build), which is
below the patched version 9.2.0450 that fixes CVE-2026-45130.
Vulnerability Details
- Upstream CVE: CVE-2026-45130
- Inherited from:
vim/vim - Affected code:
src/spellfile.c, functionread_compound() - Vulnerability type: CWE-122 — Heap-Based Buffer Overflow
- Fixed in: vim 9.2.0450 (commit
92993329178cb1f72d700fff45ca86e1c2d369f8)
Root Cause
In read_compound() in src/spellfile.c, the buffer size for the compound pattern is
computed as:
int c;
int todo = len; // len is the 4-byte section length from the .spl file
c = todo * 2 + 7;
if (enc_utf8)
c += todo * 2; // total: todo * 4 + 7
pat = alloc(c);
When enc_utf8 is active, todo * 4 + 7 is computed using signed 32-bit arithmetic.
For certain values of len (e.g., 0x40000002), the multiplication overflows the signed
32-bit integer, producing a small positive c. The subsequent alloc(c) returns an
undersized buffer. The loop that follows then writes up to todo * 4 bytes into this
tiny buffer, causing a heap-based buffer overflow.
The fix (commit 92993329) changes the computation to use size_t arithmetic:
size_t patsize = (size_t)todo * 2 + 7;
patsize += (size_t)todo * 2;
Affected MacVim Code
MacVim's src/spellfile.c (merged from vim/vim) contains the vulnerable code:
// src/spellfile.c around line 1278 (macvim r183)
c = todo * 2 + 7;
if (enc_utf8)
c += todo * 2;
pat = alloc(c);
Affected MacVim Version
MacVim r183 (vim 9.2 patches 1-332) — current HEAD as of 2026-05-18.
The fix commit 92993329178cb1f72d700fff45ca86e1c2d369f8 from vim/vim is not present
in the macvim-dev/macvim repository:
git log --all --oneline | grep 92993329 # returns no output
Suggested Fix
Merge or cherry-pick vim/vim patches up to at least 9.2.0450:
References
- Lingua principale
- Vim Script
- Stelle
- 7.9k
- Fork
- 691
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di macvim-dev/macvim
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
macvim-dev/macvim#1697 · 4 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
macvim-dev/macvim#1658 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
macvim-dev/macvim#1657 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
macvim-dev/macvim#1655 ·
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 72/100
macvim-dev/macvim#1653 ·
Tutte le issue di macvim-dev/macvim
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
avniproject/avni-client#2135 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
api7/lua-resty-saml#63 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
NousResearch/hermes-agent#117848 ·
-
Bug Rust
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
getsentry/sentry-rust#1323 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
getgrav/grav-plugin-api#45 ·