From 111a6062a152211941599125599d6a6fc41e0a83 Mon Sep 17 00:00:00 2001 From: AlmaLinux RelEng Bot Date: Mon, 13 Jul 2026 12:15:22 -0400 Subject: [PATCH] import UBI vim-9.1.083-9.el10_2.7 --- ...ecurity-runtime-tar-command-injectio.patch | 67 +++++++ ...security-runtime-netrw-code-injectio.patch | 63 +++++++ ...ecurity-Code-Injection-in-cucumber-f.patch | 52 ++++++ ...ecurity-possible-code-execution-with.patch | 163 ++++++++++++++++++ ...ythoncomplete-g-pythoncomplete_allow.patch | 87 ++++++++++ vim.spec | 44 ++++- 6 files changed, 475 insertions(+), 1 deletion(-) create mode 100644 0001-patch-9.2.0479-security-runtime-tar-command-injectio.patch create mode 100644 0001-patch-9.2.0495-security-runtime-netrw-code-injectio.patch create mode 100644 0001-patch-9.2.0496-security-Code-Injection-in-cucumber-f.patch create mode 100644 0001-patch-9.2.0561-security-possible-code-execution-with.patch create mode 100644 0001-patch-9.2.0568-pythoncomplete-g-pythoncomplete_allow.patch diff --git a/0001-patch-9.2.0479-security-runtime-tar-command-injectio.patch b/0001-patch-9.2.0479-security-runtime-tar-command-injectio.patch new file mode 100644 index 00000000..3c51ddfa --- /dev/null +++ b/0001-patch-9.2.0479-security-runtime-tar-command-injectio.patch @@ -0,0 +1,67 @@ +diff --git a/runtime/autoload/tar.vim b/runtime/autoload/tar.vim +index a3abbc7..c8d5d03 100644 +--- a/runtime/autoload/tar.vim ++++ b/runtime/autoload/tar.vim +@@ -780,9 +780,9 @@ fun! tar#Vimuntar(...) + " if necessary, decompress the tarball; then, extract it + if tartail =~ '\.tgz' + if executable("gunzip") +- silent exe "!gunzip ".shellescape(tartail) ++ silent exe "!gunzip ".shellescape(tartail, 1) + elseif executable("gzip") +- silent exe "!gzip -d ".shellescape(tartail) ++ silent exe "!gzip -d ".shellescape(tartail, 1) + else + echoerr "unable to decompress<".tartail."> on this system" + if simplify(curdir) != simplify(tarhome) +diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak +index 8dd04e7..2b3d16d 100644 +--- a/src/testdir/Make_all.mak ++++ b/src/testdir/Make_all.mak +@@ -227,6 +227,7 @@ NEW_TESTS = \ + test_partial \ + test_paste \ + test_perl \ ++ test_plugin_tar \ + test_plus_arg_edit \ + test_popup \ + test_popupwin \ +@@ -476,6 +477,7 @@ NEW_TESTS_RES = \ + test_partial.res \ + test_paste.res \ + test_perl.res \ ++ test_plugin_tar.res \ + test_plus_arg_edit.res \ + test_popup.res \ + test_popupwin.res \ +diff --git a/src/testdir/test_plugin_tar.vim b/src/testdir/test_plugin_tar.vim +new file mode 100644 +index 0000000..5e712df +--- /dev/null ++++ b/src/testdir/test_plugin_tar.vim +@@ -0,0 +1,25 @@ ++vim9script ++ ++source check.vim ++CheckNotMSWindows ++ ++runtime plugin/tarPlugin.vim ++ ++def g:Test_extract_command_injection() ++ CheckExecutable gunzip ++ CheckExecutable touch ++ var tgz = eval('0z1F8B08087795056A000364756D6D792E74617200EDCE2B12C2300004D01C254' .. ++ '7480269CE534080A8495BD1DBF3996106C3A08A7ACFACD8157B59A7690BFB4A0FC3707C666E357D' .. ++ 'E65BC8B5A47CC8A5D61A522EA5B510D3CEBF5ED679197B8CE17CEDB7F9D4C76FBB5F3D000000000' .. ++ '000000000FCD11D32415E2C00280000') ++ var dirname = tempname() ++ ++ mkdir(dirname, 'R') ++ var tar = dirname .. "/';%$(touch pwned)'.tgz" ++ writefile(tgz, tar) ++ new ++ exe "e " .. fnameescape(tar) ++ exe ":Vimuntar " .. dirname ++ assert_false(filereadable(dirname .. "/pwned")) ++ bw! ++enddef diff --git a/0001-patch-9.2.0495-security-runtime-netrw-code-injectio.patch b/0001-patch-9.2.0495-security-runtime-netrw-code-injectio.patch new file mode 100644 index 00000000..638add3d --- /dev/null +++ b/0001-patch-9.2.0495-security-runtime-netrw-code-injectio.patch @@ -0,0 +1,63 @@ +diff -up vim91/runtime/autoload/netrw.vim.netrw-hist-inject vim91/runtime/autoload/netrw.vim +--- vim91/runtime/autoload/netrw.vim.netrw-hist-inject 2026-07-01 14:34:45.906873026 +0200 ++++ vim91/runtime/autoload/netrw.vim 2026-07-01 14:34:45.945873081 +0200 +@@ -3803,7 +3803,7 @@ fun! s:NetrwBookHistSave() + while ( first || cnt != g:netrw_dirhistcnt ) + let lastline= lastline + 1 + if exists("g:netrw_dirhist_{cnt}") +- call setline(lastline,'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'") ++ call setline(lastline,'let g:netrw_dirhist_'.cnt.'='.string(g:netrw_dirhist_{cnt})) + " call Decho("..".lastline.'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'",'~'.expand("")) + endif + let first = 0 +diff -up vim91/src/testdir/Make_all.mak.netrw-hist-inject vim91/src/testdir/Make_all.mak +--- vim91/src/testdir/Make_all.mak.netrw-hist-inject 2026-07-01 14:34:45.943414655 +0200 ++++ vim91/src/testdir/Make_all.mak 2026-07-01 14:37:15.027745781 +0200 +@@ -227,6 +227,7 @@ NEW_TESTS = \ + test_partial \ + test_paste \ + test_perl \ ++ test_plugin_netrw \ + test_plugin_tar \ + test_plus_arg_edit \ + test_popup \ +@@ -477,6 +478,7 @@ NEW_TESTS_RES = \ + test_partial.res \ + test_paste.res \ + test_perl.res \ ++ test_plugin_netrw.res \ + test_plugin_tar.res \ + test_plus_arg_edit.res \ + test_popup.res \ +diff -up vim91/src/testdir/test_plugin_netrw.vim.netrw-hist-inject vim91/src/testdir/test_plugin_netrw.vim +--- vim91/src/testdir/test_plugin_netrw.vim.netrw-hist-inject 2026-07-01 14:34:45.947844274 +0200 ++++ vim91/src/testdir/test_plugin_netrw.vim 2026-07-01 14:34:45.947839295 +0200 +@@ -0,0 +1,28 @@ ++const s:testdir = expand("