import UBI vim-8.2.2637-26.el9_8.13

This commit is contained in:
AlmaLinux RelEng Bot 2026-07-29 17:03:15 -04:00
parent 1faf7f879c
commit 076f43620f
6 changed files with 552 additions and 2 deletions

View File

@ -0,0 +1,57 @@
diff -up vim82/src/spellfile.c.tree-count-words-oob vim82/src/spellfile.c
--- vim82/src/spellfile.c.tree-count-words-oob 2026-07-14 18:07:38.246526185 +0200
+++ vim82/src/spellfile.c 2026-07-14 18:07:38.315790683 +0200
@@ -648,7 +648,7 @@ tree_count_words(char_u *byts, idx_T *id
++curi[depth];
}
}
- else
+ else if (depth < MAXWLEN - 1)
{
// Normal char, go one level deeper to count the words.
++depth;
@@ -5627,7 +5627,7 @@ sug_filltree(spellinfo_T *spin, slang_T
++curi[depth];
}
}
- else
+ else if (depth < MAXWLEN - 1)
{
// Normal char, go one level deeper.
tword[depth++] = c;
diff -up vim82/src/testdir/test_spellfile.vim.tree-count-words-oob vim82/src/testdir/test_spellfile.vim
--- vim82/src/testdir/test_spellfile.vim.tree-count-words-oob 2021-03-22 10:02:42.000000000 +0100
+++ vim82/src/testdir/test_spellfile.vim 2026-07-14 18:12:41.350342946 +0200
@@ -874,4 +874,32 @@ func Test_mkspellmem_opt()
call assert_fails('set mkspellmem=1000,50,0', 'E474:')
endfunc
+func Test_spell_sug_tree_count_words_overflow()
+ " A crafted .spl/.sug pair with a BY_INDEX self-cycle in the fold word tree
+ " parses cleanly (shared refs aren't recursed, so read_tree_node()'s depth
+ " cap never trips), but drove tree_count_words() past its MAXWLEN-sized depth
+ " arrays -> stack out-of-bounds write. The walk only happens when
+ " spellsuggest() loads the matching .sug. Reaching the assert == no OOB.
+ call mkdir('Xrtp', 'p')
+ call mkdir('Xrtp/spell', 'p')
+ " VIMspell + v50, SN_SUGFILE(ts), SN_END, LWORDTREE{node:1,BY_INDEX->0,'A'},
+ " empty KWORDTREE/PREFIXTREE
+ let spl = eval('0z56494D7370656C6C320B0000000008000000001234'
+ \ .. '5678FF000000020101000000410000000000000000')
+ " VIMsug + v1, matching ts, SUGWORDTREE word "a", empty SUGTABLE
+ let sug = 0z56494D737567010000000012345678000000040161010000000000
+ call writefile(spl, 'Xrtp/spell/xx.utf-8.spl', 'b')
+ call writefile(sug, 'Xrtp/spell/xx.utf-8.sug', 'b')
+
+ new
+ set runtimepath+=./Xrtp
+ set spelllang=xx
+ set spell
+ " Unpatched: OOB write here (ASan abort, or crash). Patched: returns a list.
+ call assert_equal(v:t_list, type(spellsuggest('helloo')))
+
+ set spell& spelllang& runtimepath&
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab

View File

@ -0,0 +1,44 @@
diff -up vim82/src/spell.c.soundfold-oob-write vim82/src/spell.c
--- vim82/src/spell.c.soundfold-oob-write 2021-03-22 10:02:42.000000000 +0100
+++ vim82/src/spell.c 2026-07-15 18:49:22.297746594 +0200
@@ -3167,7 +3167,7 @@ spell_soundfold_sofo(slang_T *slang, cha
else
{
// The sl_sal_first[] table contains the translation.
- for (s = inword; (c = *s) != NUL; ++s)
+ for (s = inword; (c = *s) != NUL && ri < MAXWLEN - 1; ++s)
{
if (VIM_ISWHITE(c))
c = ' ';
diff -up vim82/src/testdir/test_spellfile.vim.soundfold-oob-write vim82/src/testdir/test_spellfile.vim
--- vim82/src/testdir/test_spellfile.vim.soundfold-oob-write 2026-07-15 18:49:22.296430165 +0200
+++ vim82/src/testdir/test_spellfile.vim 2026-07-15 18:56:16.399710213 +0200
@@ -902,4 +902,28 @@ func Test_spell_sug_tree_count_words_ove
bwipe!
endfunc
+" A word longer than MAXWLEN must not overflow the soundfold result buffer in
+" the single-byte SOFO branch of spell_soundfold_sofo().
+func Test_soundfold_overflow()
+ let _enc=&enc
+ set enc=latin1
+ call writefile(['SOFOFROM ab', 'SOFOTO xy'], 'Xtest.aff', 'D')
+ call writefile(['1', 'foo'], 'Xtest.dic', 'D')
+ mkspell! Xtest Xtest
+ try
+ setl spelllang=Xtest.latin1.spl spell
+
+ " Before the fix the copy loop wrote one byte per input byte into a
+ " MAXWLEN (254) stack buffer with no upper bound, smashing the stack.
+ let sound = soundfold(repeat('ab', 300))
+ call assert_true(strlen(sound) < 254, 'soundfold result exceeds MAXWLEN')
+
+ set spell& spelllang&
+ let &enc = _enc
+ finally
+ call delete('Xtest.latin1.spl')
+ call delete('Xtest.latin1.sug')
+ endtry
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab

View File

@ -0,0 +1,176 @@
From d60a837ff56db73a21639424f6443345c3e763bb Mon Sep 17 00:00:00 2001
From: Christian Brabandt <cb@256bit.org>
Date: Sun, 21 Jun 2026 19:50:56 +0000
Subject: [PATCH] patch 9.2.0699: [security]: possible code execution with
python complete
Problem: [security]: possible code execution with python complete
(morningbread)
Solution: Use repr() to quote the doc strings correctly
Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-ppj8-wqjf-6fp3
Supported by AI
Signed-off-by: Christian Brabandt <cb@256bit.org>
---
runtime/autoload/python3complete.vim | 7 ++--
runtime/autoload/pythoncomplete.vim | 7 ++--
src/testdir/Make_all.mak | 2 +
src/testdir/test_plugin_python3complete.vim | 48 +++++++++++++++++++++++++
4 files changed, 58 insertions(+), 6 deletions(-)
create mode 100644 src/testdir/test_plugin_python3complete.vim
diff --git a/runtime/autoload/python3complete.vim b/runtime/autoload/python3complete.vim
index 279094f44..bc5f96c46 100644
--- a/runtime/autoload/python3complete.vim
+++ b/runtime/autoload/python3complete.vim
@@ -14,6 +14,7 @@
" i.e. "import url<c-x,c-o>"
" Continue parsing on invalid line??
"
+
" v 0.9
" * Fixed docstring parsing for classes and functions
" * Fixed parsing of *args and **kwargs type arguments
@@ -308,7 +309,7 @@ class Scope(object):
def get_code(self):
str = ""
- if len(self.docstr) > 0: str += '"""'+self.docstr+'"""\n'
+ if len(self.docstr) > 0: str += repr(self.docstr)+'\n'
str += 'class _PyCmplNoType:\n def __getattr__(self,name):\n return None\n'
for sub in self.subscopes:
str += sub.get_code()
@@ -345,7 +346,7 @@ class Class(Scope):
str = '%sclass %s' % (self.currentindent(),self.name)
if len(self.supers) > 0: str += '(%s)' % ','.join(self.supers)
str += ':\n'
- if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n'
+ if len(self.docstr) > 0: str += self.childindent()+repr(self.docstr)+'\n'
if len(self.subscopes) > 0:
for s in self.subscopes: str += s.get_code()
else:
@@ -362,7 +363,7 @@ class Function(Scope):
def get_code(self):
str = "%sdef %s(%s):\n" % \
(self.currentindent(),self.name,','.join(self.params))
- if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n'
+ if len(self.docstr) > 0: str += self.childindent()+repr(self.docstr)+'\n'
str += "%spass\n" % self.childindent()
return str
diff --git a/runtime/autoload/pythoncomplete.vim b/runtime/autoload/pythoncomplete.vim
index 8986edffc..56b48a34c 100644
--- a/runtime/autoload/pythoncomplete.vim
+++ b/runtime/autoload/pythoncomplete.vim
@@ -12,6 +12,7 @@
" i.e. "import url<c-x,c-o>"
" Continue parsing on invalid line??
"
+
" v 0.9
" * Fixed docstring parsing for classes and functions
" * Fixed parsing of *args and **kwargs type arguments
@@ -326,7 +327,7 @@ class Scope(object):
def get_code(self):
str = ""
- if len(self.docstr) > 0: str += '"""'+self.docstr+'"""\n'
+ if len(self.docstr) > 0: str += repr(self.docstr)+'\n'
str += 'class _PyCmplNoType:\n def __getattr__(self,name):\n return None\n'
for sub in self.subscopes:
str += sub.get_code()
@@ -363,7 +364,7 @@ class Class(Scope):
str = '%sclass %s' % (self.currentindent(),self.name)
if len(self.supers) > 0: str += '(%s)' % ','.join(self.supers)
str += ':\n'
- if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n'
+ if len(self.docstr) > 0: str += self.childindent()+repr(self.docstr)+'\n'
if len(self.subscopes) > 0:
for s in self.subscopes: str += s.get_code()
else:
@@ -380,7 +381,7 @@ class Function(Scope):
def get_code(self):
str = "%sdef %s(%s):\n" % \
(self.currentindent(),self.name,','.join(self.params))
- if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n'
+ if len(self.docstr) > 0: str += self.childindent()+repr(self.docstr)+'\n'
str += "%spass\n" % self.childindent()
return str
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
index 1709886b4..9abf5c929 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -210,6 +210,7 @@ NEW_TESTS = \
test_paste \
test_perl \
test_plugin_netrw \
+ test_plugin_python3complete \
test_plugin_tar \
test_plus_arg_edit \
test_popup \
@@ -450,6 +451,7 @@ NEW_TESTS_RES = \
test_paste.res \
test_perl.res \
test_plugin_netrw.res \
+ test_plugin_python3complete.res \
test_plugin_tar.res \
test_plus_arg_edit.res \
test_popup.res \
diff --git a/src/testdir/test_plugin_python3complete.vim b/src/testdir/test_plugin_python3complete.vim
new file mode 100644
index 000000000..d83f65f3b
--- /dev/null
+++ b/src/testdir/test_plugin_python3complete.vim
@@ -0,0 +1,48 @@
+" Tests for the Python omni-completion plugin (runtime/autoload/python3complete.vim).
+"
+source check.vim
+CheckFeature python3
+
+" Run omni-completion against the given buffer contents and assert that the
+" marker file was not created. Pre-patch behaviour exec()s reconstructed
+" def/class headers, which evaluates the buffer-supplied expression and
+" creates the marker file. Post-patch, the expressions are stripped.
+func s:CompleteAndExpectNoMarker(buffer_lines, marker_path, msg)
+ call delete(a:marker_path)
+ let g:pythoncomplete_allow_import = 0
+ try
+ new
+ setfiletype python
+ call setline(1, a:buffer_lines)
+ call cursor(line('$'), col([line('$'), '$']))
+
+ " The PoC trigger -- direct invocation of the omnifunc with an empty base.
+ " This is the same path Vim takes for CTRL-X CTRL-O.
+ silent! call python3complete#Complete(0, '')
+
+ call assert_false(filereadable(a:marker_path),
+ \ a:msg . ' (marker ' . a:marker_path . ' was created)')
+
+ bwipe!
+ finally
+ call delete(a:marker_path)
+ unlet! g:pythoncomplete_allow_import
+ endtry
+endfunc
+
+func Test_python3complete_no_exec_via_class_docstring()
+ " A class-body docstring is emitted verbatim between triple quotes by
+ " get_code() and runs at class-definition time during exec(). A single-
+ " quoted source docstring lets an embedded """ survive doc()'s leading/
+ " trailing quote strip and break out of the generated literal.
+ let marker = tempname()
+ call s:CompleteAndExpectNoMarker([
+ \ 'class Foo:',
+ \ ' ''x"""+open("' . marker . '", "w").close()+"""y''',
+ \ ' pass',
+ \ 'Foo.',
+ \ ], marker,
+ \ 'class docstring expression was evaluated during omni-completion')
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab

View File

@ -0,0 +1,126 @@
From f10e812d754ee9988ff292b574ff0f7c1c1f1739 Mon Sep 17 00:00:00 2001
From: Hirohito Higashi <h.east.727@gmail.com>
Date: Fri, 26 Jun 2026 15:41:24 +0900
Subject: [PATCH] patch 9.2.0735: [security]: arbitrary Ex command execution
during C omni-completion
Problem: [security]: With C omni-completion, a crafted tags file can execute
arbitrary Ex commands when completing a struct/union member
(cipher-creator)
Solution: Escape the type field before inserting it into the :vimgrep
pattern so it cannot close the pattern and start a new command
(Hirohito Higashi).
Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-mf92-v4xw-j45x
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>"
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
---
runtime/autoload/ccomplete.vim | 2 +-
src/testdir/Make_all.mak | 2 +
src/testdir/test_plugin_ccomplete.vim | 62 +++++++++++++++++++++++++++
3 files changed, 65 insertions(+), 1 deletion(-)
create mode 100644 src/testdir/test_plugin_ccomplete.vim
diff --git a/runtime/autoload/ccomplete.vim b/runtime/autoload/ccomplete.vim
index 95a20e16b..ae1fcf7d6 100644
--- a/runtime/autoload/ccomplete.vim
+++ b/runtime/autoload/ccomplete.vim
@@ -514,7 +514,7 @@ func s:StructMembers(typename, items, all)
endif
if !cached
while 1
- exe 'silent! keepj noautocmd ' . n . 'vimgrep /\t' . typename . '\(\t\|$\)/j ' . fnames
+ exe 'silent! keepj noautocmd ' . n . 'vimgrep /\t' . escape(typename, '/\') . '\(\t\|$\)/j ' . fnames
let qflist = getqflist()
if len(qflist) > 0 || match(typename, "::") < 0
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -209,6 +209,7 @@ NEW_TESTS = \
test_partial \
test_paste \
test_perl \
+ test_plugin_ccomplete \
test_plugin_netrw \
test_plugin_python3complete \
test_plugin_tar \
@@ -449,6 +450,7 @@ NEW_TESTS_RES = \
test_partial.res \
test_paste.res \
test_perl.res \
+ test_plugin_ccomplete.res \
test_plugin_netrw.res \
test_plugin_python3complete.res \
test_plugin_tar.res \
diff --git a/src/testdir/test_plugin_ccomplete.vim b/src/testdir/test_plugin_ccomplete.vim
new file mode 100644
index 000000000..a635bd50b
--- /dev/null
+++ b/src/testdir/test_plugin_ccomplete.vim
@@ -0,0 +1,62 @@
+" Tests for the C omni-completion plugin (runtime/autoload/ccomplete.vim).
+
+func s:WriteTags(lines)
+ " Mark unsorted so lookup is a linear scan regardless of entry order.
+ let tagsfile = tempname()
+ call writefile(["!_TAG_FILE_SORTED\t0\t/0/"] + a:lines, tagsfile)
+ return tagsfile
+endfunc
+
+" A crafted typeref field is interpolated into the :vimgrep pattern in
+" StructMembers(). Without escaping, "/" closes the pattern and "|" starts a
+" new Ex command, so the field runs as an Ex command during completion.
+func Test_ccomplete_no_exec_via_typeref()
+ unlet! g:ccomplete_injected
+ let tagsfile = s:WriteTags([
+ \ "myvar\tmain.c\t/^x$/;\"\tv\ttyperef:x/|let g:ccomplete_injected = 1|\"",
+ \ ])
+
+ let save_tags = &tags
+ let &tags = tagsfile
+
+ new
+ call ccomplete#Complete(1, '')
+ call ccomplete#Complete(0, 'myvar.x')
+
+ call assert_false(exists('g:ccomplete_injected'),
+ \ 'typeref field was executed as an Ex command during omni-completion')
+
+ bwipe!
+ let &tags = save_tags
+ unlet! g:ccomplete_injected
+endfunc
+
+" A legitimate typeref must still drive struct-member completion: escaping the
+" field value must not break the normal path.
+func Test_ccomplete_typeref_completion_still_works()
+ let tagsfile = s:WriteTags([
+ \ "myvar\tmain.c\t/^x$/;\"\tv\ttyperef:struct:mystruct",
+ \ "alpha\tmain.c\t/^x$/;\"\tm\tstruct:mystruct",
+ \ "beta\tmain.c\t/^x$/;\"\tm\tstruct:mystruct",
+ \ ])
+
+ let save_tags = &tags
+ let &tags = tagsfile
+
+ new
+ call ccomplete#Complete(1, '')
+ let items = ccomplete#Complete(0, 'myvar.')
+
+ call assert_equal(type([]), type(items),
+ \ 'ccomplete#Complete did not return a list')
+ let names = map(copy(items), 'v:val.word')
+ call assert_true(index(names, 'alpha') >= 0,
+ \ 'struct member "alpha" missing from completion: ' . string(names))
+ call assert_true(index(names, 'beta') >= 0,
+ \ 'struct member "beta" missing from completion: ' . string(names))
+
+ bwipe!
+ let &tags = save_tags
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab

View File

@ -0,0 +1,94 @@
From be5d5b4e66b18c20d477c0ce614ad17a892cac8c Mon Sep 17 00:00:00 2001
From: Hirohito Higashi <h.east.727@gmail.com>
Date: Fri, 26 Jun 2026 20:07:01 +0900
Subject: [PATCH] patch 9.2.0736: potential command execution in PHP
omni-completion
Problem: With PHP omni-completion, a crafted file can potentially
execute arbitrary commands when completing a class member.
Solution: Quote the class name before inserting it into the search()
pattern run via win_execute().
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
---
runtime/autoload/phpcomplete.vim | 3 ++-
src/testdir/Make_all.mak | 2 ++
src/testdir/test_plugin_phpcomplete.vim | 35 +++++++++++++++++++++++++
3 files changed, 39 insertions(+), 1 deletion(-)
create mode 100644 src/testdir/test_plugin_phpcomplete.vim
diff --git a/runtime/autoload/phpcomplete.vim b/runtime/autoload/phpcomplete.vim
index 4041a80bd..38dc1b024 100644
--- a/runtime/autoload/phpcomplete.vim
+++ b/runtime/autoload/phpcomplete.vim
@@ -2082,7 +2082,8 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
let result = []
let popup_id = popup_create(a:file_lines, {'hidden': v:true})
- call win_execute(popup_id, 'call search(''\c\(class\|interface\|trait\)\_s\+'.a:class_name.'\(\>\|$\)'')')
+ call win_execute(popup_id, 'call search('
+ \ . string('\c\(class\|interface\|trait\)\_s\+' . a:class_name . '\(\>\|$\)') . ')')
call win_execute(popup_id, "let cfline = line('.')")
call win_execute(popup_id, "call search('{')")
call win_execute(popup_id, "let endline = line('.')")
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
index 1709886b4..98affcf54 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -213,5 +213,6 @@ NEW_TESTS = \
test_plugin_ccomplete \
test_plugin_netrw \
+ test_plugin_phpcomplete \
test_plugin_python3complete \
test_plugin_tar \
test_plus_arg_edit \
@@ -453,5 +454,6 @@ NEW_TESTS_RES = \
test_plugin_ccomplete.res \
test_plugin_netrw.res \
+ test_plugin_phpcomplete.res \
test_plugin_python3complete.res \
test_plugin_tar.res \
test_plus_arg_edit.res \
diff --git a/src/testdir/test_plugin_phpcomplete.vim b/src/testdir/test_plugin_phpcomplete.vim
new file mode 100644
index 000000000..7f66be47b
--- /dev/null
+++ b/src/testdir/test_plugin_phpcomplete.vim
@@ -0,0 +1,35 @@
+" Tests for the PHP omni-completion plugin (runtime/autoload/phpcomplete.vim).
+
+" A buffer class name is interpolated into a search() pattern run via
+" win_execute(). Without escaping, "'" closes the string and "|" starts a new
+" Ex command, so the name runs as an Ex command during completion.
+func Test_phpcomplete_no_exec_via_class_name()
+ unlet! g:phpcomplete_injected
+ let lines = ['<?php', 'class x {}', '']
+ let payload = "x')|let g:phpcomplete_injected = 1|call search('"
+
+ try
+ call phpcomplete#GetClassContentsStructure('x.php', lines, payload)
+ catch
+ endtry
+
+ call assert_false(exists('g:phpcomplete_injected'),
+ \ 'class name was executed as an Ex command during completion')
+
+ unlet! g:phpcomplete_injected
+endfunc
+
+func Test_phpcomplete_class_lookup_still_works()
+ let lines = ['<?php', 'class Foo {', ' public $bar;', '}', '']
+ let result = phpcomplete#GetClassContentsStructure('Foo.php', lines, 'Foo')
+
+ call assert_equal(type([]), type(result),
+ \ 'GetClassContentsStructure did not return a list')
+ call assert_true(len(result) > 0, 'no class structure returned')
+ call assert_match('class Foo', result[0].content,
+ \ 'class body missing from returned content')
+ call assert_match('bar', result[0].content,
+ \ 'class member missing from returned content')
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab

View File

@ -27,7 +27,7 @@ Summary: The VIM editor
URL: http://www.vim.org/
Name: vim
Version: %{baseversion}.%{patchlevel}
Release: 26%{?dist}.10
Release: 26%{?dist}.13
License: Vim and MIT
Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2
Source1: virc
@ -231,7 +231,40 @@ Patch3075: 0001-patch-9.2.0568-pythoncomplete-g-pythoncomplete_allow.patch
# Created new test file test_plugin_netrw.vim with minimal test
# Added test_plugin_netrw to Make_all.mak
Patch3076: 0001-patch-9.2.0495-security-runtime-netrw-code-injection.patch
# RHEL-194062 CVE-2026-55693 out-of-bounds write in tree_count_words()
# https://redhat.atlassian.net/browse/RHEL-194062
# https://github.com/vim/vim/commit/a80874d9b84a01040e3d1aef2d4a59e1934dafb7
# Omitted src/version.c changes per downstream policy
# Dropped unrelated upstream test functions from test_spellfile.vim conflict resolution
# Dropped 'R' from mkdir, because not present in Vim < 9.0
Patch3077: 0001-patch-9.2.0653-security-out-of-bounds-write-in-tree_.patch
# RHEL-191367 CVE-2026-57455 vim: Out-of-bounds write with soundfold()
# https://redhat.atlassian.net/browse/RHEL-191367
# https://github.com/vim/vim/commit/497f931f85339d175d7f69588dd249e8ccfed41b
# Omitted src/version.c changes per downstream policy
# defer is not in Vim 8.2
Patch3078: 0001-patch-9.2.0698-security-Out-of-bounds-write-with-sou.patch
# RHEL-192113 CVE-2026-57456 [security]: possible code execution with python complete
# https://redhat.atlassian.net/browse/RHEL-192113
# https://github.com/vim/vim/commit/cce141c42740f122dd8486ae04e21c2a81016ba8
# Omitted src/version.c changes per downstream policy
# Omitted 'Last Changes' comments in python3complete.vim and pythoncomplete.vim per downstream policy
# Created new test file test_plugin_python3complete.vim with minimal test (source check.vim for CheckFeature)
# Added test_plugin_python3complete to Make_all.mak
# Substitute defer for try:+:finally
Patch3079: 0001-patch-9.2.0699-security-possible-code-execution-with.patch
# RHEL-203985 CVE-2026-59858 arbitrary Ex command execution during C omni-completion
# https://redhat.atlassian.net/browse/RHEL-203985
# https://github.com/vim/vim/commit/6b611b0d15603c52ebdad17172b0232b4f65704e
# Omitted src/version.c changes per downstream policy
# Adapted escape() fix to old-style Vim script syntax (exe/keepj vs execute/keepjumps)
Patch3080: 0001-patch-9.2.0735-security-arbitrary-Ex-command-executi.patch
# RHEL-201197 CVE-2026-59856 potential command execution in PHP omni-completion
# https://redhat.atlassian.net/browse/RHEL-201197
# https://github.com/vim/vim/commit/43afc581a37a35762dd0ef292f038b9dc5680a24
# Omitted src/version.c changes per downstream policy
# Resolved conflicts in src/testdir/Make_all.mak for older codebase
Patch3081: 0001-patch-9.2.0736-potential-command-execution-in-PHP-omn.patch
# gcc is no longer in buildroot by default
BuildRequires: gcc
@ -495,6 +528,11 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk
%patch -P 3074 -p1 -b .python3complete-code-exec
%patch -P 3075 -p1 -b .pythoncomplete-allow-import
%patch -P 3076 -p1 -b .netrw-code-inject
%patch -P 3077 -p1 -b .tree-count-words-oob
%patch -P 3078 -p1 -b .soundfold-oob-write
%patch -P 3079 -p1 -b .python3complete-repr-docstr
%patch -P 3080 -p1 -b .ccomplete-cmd-exec
%patch -P 3081 -p1 -b .phpcomplete-cmd-exec
%build
cd src
@ -1047,6 +1085,21 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags
%endif
%changelog
* Wed Jul 22 2026 RHEL Packaging Agent <redhat-ymir-agent@redhat.com> - 2:8.2.2637-26.13
- RHEL-203985 CVE-2026-59858 vim: arbitrary Ex command execution
in C omni-completion
- RHEL-201197 CVE-2026-59856 vim: potential command execution in
PHP omni-completion
* Tue Jul 14 2026 RHEL Packaging Agent <redhat-ymir-agent@redhat.com> - 2:8.2.2637-26.12
- RHEL-191367 CVE-2026-57455 vim: Out-of-bounds write with soundfold()
- RHEL-192113 CVE-2026-57456 vim: possible code execution with
python complete via crafted docstrings
* Sun Jul 12 2026 RHEL Packaging Agent <redhat-ymir-agent@redhat.com> - 2:8.2.2637-26.11
- RHEL-194062 CVE-2026-55693 vim: out-of-bounds write in
tree_count_words() and sug_filltree()
* Wed Jul 01 2026 RHEL Packaging Agent <redhat-ymir-agent@redhat.com> - 2:8.2.2637-26.10
- RHEL-186659 CVE-2026-47162 vim: code injection via
NetrwBookHistSave()