* [OE-core][scarthgap][PATCHv2 02/13] vim: Security Fix for CVE-2026-42307
2026-07-23 9:23 [OE-core][scarthgap][PATCHv2 01/13] vim: Security Fix for CVE-2026-28422 Siddharth
@ 2026-07-23 9:23 ` Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 03/13] vim: Security Fix for CVE-2026-43961 Siddharth
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Siddharth @ 2026-07-23 9:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Siddharth Doshi
From: Siddharth Doshi <sdoshi@mvista.com>
Picking patch as per [1], and same patch is mentioned in [2]
References:
[1] https://nvd.nist.gov/vuln/detail/CVE-2026-42307
[2] https://security-tracker.debian.org/tracker/CVE-2026-42307
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
---
.../vim/files/CVE-2026-42307.patch | 121 ++++++++++++++++++
meta/recipes-support/vim/vim.inc | 1 +
2 files changed, 122 insertions(+)
create mode 100644 meta/recipes-support/vim/files/CVE-2026-42307.patch
diff --git a/meta/recipes-support/vim/files/CVE-2026-42307.patch b/meta/recipes-support/vim/files/CVE-2026-42307.patch
new file mode 100644
index 0000000000..03acd436a0
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2026-42307.patch
@@ -0,0 +1,121 @@
+From 936634660e3836e1a495965b48a0dc913e9d0deb Mon Sep 17 00:00:00 2001
+From: Christian Brabandt <cb@256bit.org>
+Date: Tue, 21 Apr 2026 19:03:02 +0000
+Subject: [PATCH 02/17] patch 9.2.0383: [security]: runtime(netrw):
+ shell-injection via sftp: and file: URLs
+
+Problem: runtime(netrw): shell-injection via sftp: and file: URLs
+ (Joshua Rogers)
+Solution: Escape temporary file names, harden filename suffix regex,
+ drop unused g:netrw_tmpfile_escape variable
+
+Supported by AI
+
+Signed-off-by: Christian Brabandt <cb@256bit.org>
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/405e2fb6d54d5653523809e2853d99d1c000a5fc]
+CVE: CVE-2026-42307
+Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
+---
+ runtime/doc/pi_netrw.txt | 4 ----
+ runtime/doc/tags | 1 -
+ runtime/pack/dist/opt/netrw/autoload/netrw.vim | 16 +++++++++-------
+ runtime/pack/dist/opt/netrw/doc/netrw.txt | 4 ----
+ 4 files changed, 9 insertions(+), 16 deletions(-)
+
+diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt
+index a86cac36ba..2d98a8407b 100644
+--- a/runtime/doc/pi_netrw.txt
++++ b/runtime/doc/pi_netrw.txt
+@@ -2854,10 +2854,6 @@ your browsing preferences. (see also: |netrw-settings|)
+ such as listing, file removal, etc.
+ default: ssh
+
+- *g:netrw_tmpfile_escape* =' &;'
+- escape() is applied to all temporary files
+- to escape these characters.
+-
+ *g:netrw_timefmt* specify format string to vim's strftime().
+ The default, "%c", is "the preferred date
+ and time representation for the current
+diff --git a/runtime/doc/tags b/runtime/doc/tags
+index 300dfd18a6..7ce3b63075 100644
+--- a/runtime/doc/tags
++++ b/runtime/doc/tags
+@@ -7863,7 +7863,6 @@ g:netrw_ssh_browse_reject pi_netrw.txt /*g:netrw_ssh_browse_reject*
+ g:netrw_ssh_cmd pi_netrw.txt /*g:netrw_ssh_cmd*
+ g:netrw_sshport pi_netrw.txt /*g:netrw_sshport*
+ g:netrw_timefmt pi_netrw.txt /*g:netrw_timefmt*
+-g:netrw_tmpfile_escape pi_netrw.txt /*g:netrw_tmpfile_escape*
+ g:netrw_uid pi_netrw.txt /*g:netrw_uid*
+ g:netrw_use_noswf pi_netrw.txt /*g:netrw_use_noswf*
+ g:netrw_use_nt_rcp pi_netrw.txt /*g:netrw_use_nt_rcp*
+diff --git a/runtime/pack/dist/opt/netrw/autoload/netrw.vim b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
+index 1c98104d00..805474616d 100644
+--- a/runtime/pack/dist/opt/netrw/autoload/netrw.vim
++++ b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
+@@ -378,7 +378,6 @@ else
+ call s:NetrwInit("g:netrw_glob_escape",'*[]?`{~$\')
+ endif
+ call s:NetrwInit("g:netrw_menu_escape",'.&? \')
+-call s:NetrwInit("g:netrw_tmpfile_escape",' &;')
+ call s:NetrwInit("s:netrw_map_escape","<|\n\r\\\<C-V>\"")
+ if has("gui_running") && (&enc == 'utf-8' || &enc == 'utf-16' || &enc == 'ucs-4')
+ let s:treedepthstring= "│ "
+@@ -1799,14 +1798,14 @@ function netrw#NetRead(mode,...)
+ ".........................................
+ " NetRead: (sftp) NetRead Method #9 {{{3
+ elseif b:netrw_method == 9
+- call netrw#os#Execute(s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".netrw#os#Escape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile)
++ call netrw#os#Execute(s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".netrw#os#Escape(g:netrw_machine.":".b:netrw_fname,1)." ".netrw#os#Escape(tmpfile,1))
+ let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
+ let b:netrw_lastfile = choice
+
+ ".........................................
+ " NetRead: (file) NetRead Method #10 {{{3
+ elseif b:netrw_method == 10 && exists("g:netrw_file_cmd")
+- call netrw#os#Execute(s:netrw_silentxfer."!".g:netrw_file_cmd." ".netrw#os#Escape(b:netrw_fname,1)." ".tmpfile)
++ call netrw#os#Execute(s:netrw_silentxfer."!".g:netrw_file_cmd." ".netrw#os#Escape(b:netrw_fname,1)." ".netrw#os#Escape(tmpfile,1))
+ let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
+ let b:netrw_lastfile = choice
+
+@@ -8927,14 +8926,17 @@ function s:GetTempfile(fname)
+ endif
+
+ " use fname's suffix for the temporary file
++ " Restrict the suffix to word characters so shell metacharacters in a
++ " remote filename (e.g. sftp://host/foo.txt;id) cannot ride along into
++ " the tempfile name and out into a downstream shell command.
+ if a:fname != ""
+- if a:fname =~ '\.[^./]\+$'
++ if a:fname =~ '\.\w\+$'
+ if a:fname =~ '\.tar\.gz$' || a:fname =~ '\.tar\.bz2$' || a:fname =~ '\.tar\.xz$'
+- let suffix = ".tar".substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e')
++ let suffix = ".tar".substitute(a:fname,'^.*\(\.\w\+\)$','\1','e')
+ elseif a:fname =~ '.txz$'
+- let suffix = ".txz".substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e')
++ let suffix = ".txz".substitute(a:fname,'^.*\(\.\w\+\)$','\1','e')
+ else
+- let suffix = substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e')
++ let suffix = substitute(a:fname,'^.*\(\.\w\+\)$','\1','e')
+ endif
+ let tmpfile= substitute(tmpfile,'\.tmp$','','e')
+ let tmpfile .= suffix
+diff --git a/runtime/pack/dist/opt/netrw/doc/netrw.txt b/runtime/pack/dist/opt/netrw/doc/netrw.txt
+index 01a5bda597..144bab5fb3 100644
+--- a/runtime/pack/dist/opt/netrw/doc/netrw.txt
++++ b/runtime/pack/dist/opt/netrw/doc/netrw.txt
+@@ -2854,10 +2854,6 @@ your browsing preferences. (see also: |netrw-settings|)
+ such as listing, file removal, etc.
+ default: ssh
+
+- *g:netrw_tmpfile_escape* =' &;'
+- escape() is applied to all temporary files
+- to escape these characters.
+-
+ *g:netrw_timefmt* specify format string to vim's strftime().
+ The default, "%c", is "the preferred date
+ and time representation for the current
+--
+2.44.4
+
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
index 485eedb061..7a865f122e 100644
--- a/meta/recipes-support/vim/vim.inc
+++ b/meta/recipes-support/vim/vim.inc
@@ -37,6 +37,7 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
file://CVE-2026-52859.patch \
file://CVE-2026-52860.patch \
file://CVE-2026-28422.patch \
+ file://CVE-2026-42307.patch \
"
PV .= ".1683"
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [OE-core][scarthgap][PATCHv2 03/13] vim: Security Fix for CVE-2026-43961
2026-07-23 9:23 [OE-core][scarthgap][PATCHv2 01/13] vim: Security Fix for CVE-2026-28422 Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 02/13] vim: Security Fix for CVE-2026-42307 Siddharth
@ 2026-07-23 9:23 ` Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 04/13] vim: Security Fix for CVE-2026-47162 Siddharth
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Siddharth @ 2026-07-23 9:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Siddharth Doshi
From: Siddharth Doshi <sdoshi@mvista.com>
Picking patch as per [1], and same patch is mentioned in [2]
References:
[1] https://github.com/vim/vim/commit/8af0f098c3a42a28661d0295364e
[2] https://security-tracker.debian.org/tracker/CVE-2026-43961
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
---
.../vim/files/CVE-2026-43961.patch | 65 +++++++++++++++++++
meta/recipes-support/vim/vim.inc | 1 +
2 files changed, 66 insertions(+)
create mode 100644 meta/recipes-support/vim/files/CVE-2026-43961.patch
diff --git a/meta/recipes-support/vim/files/CVE-2026-43961.patch b/meta/recipes-support/vim/files/CVE-2026-43961.patch
new file mode 100644
index 0000000000..f9e0fc0df4
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2026-43961.patch
@@ -0,0 +1,65 @@
+From f38c7cb2fcc9d5839386ea4722463ea921f0bbce Mon Sep 17 00:00:00 2001
+From: Christian Brabandt <cb@256bit.org>
+Date: Thu, 14 May 2026 16:43:15 +0000
+Subject: [PATCH 03/17] patch 9.2.0480: [security]: runtime(netrw): code
+ injection via mf command
+
+Problem: [security]: runtime(netrw): code injection via mf command
+ (Christopher Lusk, Zdenek Dohnal)
+Solution: Do not use string concatenation inside the filter() commands
+ (Zdenek Dohnal)
+
+Github Security Advisory:
+https://github.com/vim/vim/security/advisories/GHSA-66hr-7p6x-x5j3
+
+Signed-off-by: Christian Brabandt <cb@256bit.org>
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/8af0f098c3a42a28661d0295364e]
+CVE: CVE-2026-43961
+Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
+---
+ runtime/pack/dist/opt/netrw/autoload/netrw.vim | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/runtime/pack/dist/opt/netrw/autoload/netrw.vim b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
+index 805474616d..e484de5c93 100644
+--- a/runtime/pack/dist/opt/netrw/autoload/netrw.vim
++++ b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
+@@ -5155,7 +5155,7 @@ function s:NetrwMarkFile(islocal,fname)
+
+ else
+ " remove filename from buffer's markfilelist
+- call filter(s:netrwmarkfilelist_{curbufnr},'v:val != a:fname')
++ call filter(s:netrwmarkfilelist_{curbufnr}, {_, v -> v !=# a:fname})
+ if s:netrwmarkfilelist_{curbufnr} == []
+ " local markfilelist is empty; remove it entirely
+ call s:NetrwUnmarkList(curbufnr,curdir)
+@@ -5176,7 +5176,6 @@ function s:NetrwMarkFile(islocal,fname)
+
+ else
+ " initialize new markfilelist
+-
+ let s:netrwmarkfilelist_{curbufnr}= []
+ call add(s:netrwmarkfilelist_{curbufnr},substitute(a:fname,'[|@]$','',''))
+
+@@ -5196,7 +5195,7 @@ function s:NetrwMarkFile(islocal,fname)
+ call add(s:netrwmarkfilelist,netrw#fs#ComposePath(b:netrw_curdir,a:fname))
+ else
+ " remove new filename from global markfilelist
+- call filter(s:netrwmarkfilelist,'v:val != "'.dname.'"')
++ call filter(s:netrwmarkfilelist, {_, v -> v !=# dname})
+ if s:netrwmarkfilelist == []
+ unlet s:netrwmarkfilelist
+ endif
+@@ -7202,7 +7201,7 @@ function s:NetrwTreeDisplay(dir,depth)
+ " hide given patterns
+ let listhide= split(g:netrw_list_hide,',')
+ for pat in listhide
+- call filter(w:netrw_treedict[dir],'v:val !~ "'.escape(pat,'\\').'"')
++ call filter(w:netrw_treedict[dir], {_, v -> v !~# pat})
+ endfor
+
+ elseif g:netrw_hide == 2
+--
+2.44.4
+
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
index 7a865f122e..2175c5f9a8 100644
--- a/meta/recipes-support/vim/vim.inc
+++ b/meta/recipes-support/vim/vim.inc
@@ -38,6 +38,7 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
file://CVE-2026-52860.patch \
file://CVE-2026-28422.patch \
file://CVE-2026-42307.patch \
+ file://CVE-2026-43961.patch \
"
PV .= ".1683"
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [OE-core][scarthgap][PATCHv2 04/13] vim: Security Fix for CVE-2026-47162
2026-07-23 9:23 [OE-core][scarthgap][PATCHv2 01/13] vim: Security Fix for CVE-2026-28422 Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 02/13] vim: Security Fix for CVE-2026-42307 Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 03/13] vim: Security Fix for CVE-2026-43961 Siddharth
@ 2026-07-23 9:23 ` Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 05/13] vim: Security Fix for CVE-2026-47167 Siddharth
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Siddharth @ 2026-07-23 9:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Siddharth Doshi
From: Siddharth Doshi <sdoshi@mvista.com>
Picking patch as per [1], and same patch is mentioned in [2]
References:
[1] https://nvd.nist.gov/vuln/detail/CVE-2026-47162
[2] https://security-tracker.debian.org/tracker/CVE-2026-47162
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
---
.../vim/files/CVE-2026-47162.patch | 39 +++++++++++++++++++
meta/recipes-support/vim/vim.inc | 1 +
2 files changed, 40 insertions(+)
create mode 100644 meta/recipes-support/vim/files/CVE-2026-47162.patch
diff --git a/meta/recipes-support/vim/files/CVE-2026-47162.patch b/meta/recipes-support/vim/files/CVE-2026-47162.patch
new file mode 100644
index 0000000000..33f1ebbfd1
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2026-47162.patch
@@ -0,0 +1,39 @@
+From d254c3b584e19555f2aecc4886ae7c92c0acc199 Mon Sep 17 00:00:00 2001
+From: Christian Brabandt <cb@256bit.org>
+Date: Sun, 17 May 2026 18:53:48 +0000
+Subject: [PATCH 04/17] patch 9.2.0495: [security]: runtime(netrw): code
+ injection via NetrwBookHistSave()
+
+Problem: [security]: runtime(netrw): code injection via
+ NetrwBookHistSave()
+Solution: Properly quote the directory name using string() function
+ (Srinivas Piskala Ganesh Babu)
+
+Github Security Advisory:
+https://github.com/vim/vim/security/advisories/GHSA-crm5-rh6j-2c7c
+
+Signed-off-by: Christian Brabandt <cb@256bit.org>
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/f08ab2f4d7d2947c8dd6c179ae08ee6146a2694b]
+CVE: CVE-2026-47162
+Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
+---
+ runtime/pack/dist/opt/netrw/autoload/netrw.vim | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/runtime/pack/dist/opt/netrw/autoload/netrw.vim b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
+index e484de5c93..9014ca339b 100644
+--- a/runtime/pack/dist/opt/netrw/autoload/netrw.vim
++++ b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
+@@ -2921,7 +2921,7 @@ function 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}))
+ endif
+ let first = 0
+ let cnt = ( cnt - 1 ) % g:netrw_dirhistmax
+--
+2.44.4
+
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
index 2175c5f9a8..3fd0b66bf4 100644
--- a/meta/recipes-support/vim/vim.inc
+++ b/meta/recipes-support/vim/vim.inc
@@ -39,6 +39,7 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
file://CVE-2026-28422.patch \
file://CVE-2026-42307.patch \
file://CVE-2026-43961.patch \
+ file://CVE-2026-47162.patch \
"
PV .= ".1683"
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [OE-core][scarthgap][PATCHv2 05/13] vim: Security Fix for CVE-2026-47167
2026-07-23 9:23 [OE-core][scarthgap][PATCHv2 01/13] vim: Security Fix for CVE-2026-28422 Siddharth
` (2 preceding siblings ...)
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 04/13] vim: Security Fix for CVE-2026-47162 Siddharth
@ 2026-07-23 9:23 ` Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 06/13] vim: Security Fix for CVE-2026-55693 Siddharth
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Siddharth @ 2026-07-23 9:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Siddharth Doshi
From: Siddharth Doshi <sdoshi@mvista.com>
Picking patch as per [1], and same patch is mentioned in [2]
References:
[1] https://nvd.nist.gov/vuln/detail/CVE-2026-47167
[2] https://security-tracker.debian.org/tracker/CVE-2026-47167
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
---
.../vim/files/CVE-2026-47167.patch | 39 +++++++++++++++++++
meta/recipes-support/vim/vim.inc | 1 +
2 files changed, 40 insertions(+)
create mode 100644 meta/recipes-support/vim/files/CVE-2026-47167.patch
diff --git a/meta/recipes-support/vim/files/CVE-2026-47167.patch b/meta/recipes-support/vim/files/CVE-2026-47167.patch
new file mode 100644
index 0000000000..f0e493290c
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2026-47167.patch
@@ -0,0 +1,39 @@
+From e117fcc6f1c1973602c8e2c6529fba9ee1ce59b4 Mon Sep 17 00:00:00 2001
+From: Christian Brabandt <cb@256bit.org>
+Date: Sun, 17 May 2026 19:39:24 +0000
+Subject: [PATCH 05/17] patch 9.2.0496: [security]: Code Injection in cucumber
+ filetype plugin
+
+Problem: [security]: Code Injection in cucumber filetype plugin
+ (Christopher Lusk)
+Solution: Use rubys Regexp.new() with the untrusted pattern
+
+Github Security Advisory:
+https://github.com/vim/vim/security/advisories/GHSA-4473-94jm-w5x9
+
+Signed-off-by: Christian Brabandt <cb@256bit.org>
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/a65a52d684bc58535ad28a4ae824d22e76399934]
+CVE: CVE-2026-47167
+Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
+---
+ runtime/ftplugin/cucumber.vim | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/runtime/ftplugin/cucumber.vim b/runtime/ftplugin/cucumber.vim
+index f4848d1c60..3361f1db4a 100644
+--- a/runtime/ftplugin/cucumber.vim
++++ b/runtime/ftplugin/cucumber.vim
+@@ -96,7 +96,8 @@ function! s:stepmatch(receiver,target)
+ catch
+ endtry
+ if has("ruby") && pattern !~ '\\\@<!#{'
+- ruby VIM.command("return #{if (begin; Kernel.eval('/'+VIM.evaluate('pattern')+'/'); rescue SyntaxError; end) === VIM.evaluate('a:target') then 1 else 0 end}")
++ " Use Regexp.new, so the pattern stays untrusted data and cannot inject Ruby
++ ruby VIM.command("return #{if (begin; Regexp.new(VIM.evaluate('pattern')); rescue RegexpError; end) === VIM.evaluate('a:target') then 1 else 0 end}")
+ else
+ return 0
+ endif
+--
+2.44.4
+
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
index 3fd0b66bf4..ec2cedc965 100644
--- a/meta/recipes-support/vim/vim.inc
+++ b/meta/recipes-support/vim/vim.inc
@@ -40,6 +40,7 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
file://CVE-2026-42307.patch \
file://CVE-2026-43961.patch \
file://CVE-2026-47162.patch \
+ file://CVE-2026-47167.patch \
"
PV .= ".1683"
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [OE-core][scarthgap][PATCHv2 06/13] vim: Security Fix for CVE-2026-55693
2026-07-23 9:23 [OE-core][scarthgap][PATCHv2 01/13] vim: Security Fix for CVE-2026-28422 Siddharth
` (3 preceding siblings ...)
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 05/13] vim: Security Fix for CVE-2026-47167 Siddharth
@ 2026-07-23 9:23 ` Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 07/13] vim: Security Fix for CVE-2026-55892 Siddharth
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Siddharth @ 2026-07-23 9:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Siddharth Doshi
From: Siddharth Doshi <sdoshi@mvista.com>
Picking patch as per [1], and same patch is mentioned in [2]
References:
[1] https://nvd.nist.gov/vuln/detail/CVE-2026-55693
[2] https://security-tracker.debian.org/tracker/CVE-2026-55693
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
---
.../vim/files/CVE-2026-55693.patch | 88 +++++++++++++++++++
meta/recipes-support/vim/vim.inc | 1 +
2 files changed, 89 insertions(+)
create mode 100644 meta/recipes-support/vim/files/CVE-2026-55693.patch
diff --git a/meta/recipes-support/vim/files/CVE-2026-55693.patch b/meta/recipes-support/vim/files/CVE-2026-55693.patch
new file mode 100644
index 0000000000..d35b6f5fe5
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2026-55693.patch
@@ -0,0 +1,88 @@
+From 315b35adb406138c962bcc653db95acc3c87c8ab Mon Sep 17 00:00:00 2001
+From: Christian Brabandt <cb@256bit.org>
+Date: Mon, 15 Jun 2026 19:39:08 +0000
+Subject: [PATCH 09/17] patch 9.2.0653: [security]: out-of-bounds write in
+ tree_count_words()
+
+Problem: [security]: a crafted spell file can drive tree_count_words()
+ past the end of its MAXWLEN-sized depth arrays; the descent
+ loop has no depth bound.
+Solution: only descend while depth < MAXWLEN - 1, as the sibling trie
+ walkers already do; apply the same guard to sug_filltree().
+
+Github Security Advisory:
+https://github.com/vim/vim/security/advisories/GHSA-wgh4-64f7-q3jq
+
+Supported by AI.
+
+Signed-off-by: Christian Brabandt <cb@256bit.org>
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/a80874d9b84a01040e3d1aef2d4a59e1934dafb7]
+CVE: CVE-2026-55693
+Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
+---
+ src/spellfile.c | 4 ++--
+ src/testdir/test_spellfile.vim | 27 +++++++++++++++++++++++++++
+ 2 files changed, 29 insertions(+), 2 deletions(-)
+
+diff --git a/src/spellfile.c b/src/spellfile.c
+index 0b9536dc16..0010d9aa27 100644
+--- a/src/spellfile.c
++++ b/src/spellfile.c
+@@ -645,7 +645,7 @@ tree_count_words(char_u *byts, idx_T *idxs)
+ ++curi[depth];
+ }
+ }
+- else
++ else if (depth < MAXWLEN - 1)
+ {
+ // Normal char, go one level deeper to count the words.
+ ++depth;
+@@ -5648,7 +5648,7 @@ sug_filltree(spellinfo_T *spin, slang_T *slang)
+ ++curi[depth];
+ }
+ }
+- else
++ else if (depth < MAXWLEN - 1)
+ {
+ // Normal char, go one level deeper.
+ tword[depth++] = c;
+diff --git a/src/testdir/test_spellfile.vim b/src/testdir/test_spellfile.vim
+index b72974ed07..e5f8c5778f 100644
+--- a/src/testdir/test_spellfile.vim
++++ b/src/testdir/test_spellfile.vim
+@@ -1166,4 +1166,31 @@ func Test_mkspell_empty_dic()
+ 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/spell', 'pR')
++ " 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
+--
+2.44.4
+
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
index ec2cedc965..248160a82c 100644
--- a/meta/recipes-support/vim/vim.inc
+++ b/meta/recipes-support/vim/vim.inc
@@ -41,6 +41,7 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
file://CVE-2026-43961.patch \
file://CVE-2026-47162.patch \
file://CVE-2026-47167.patch \
+ file://CVE-2026-55693.patch \
"
PV .= ".1683"
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [OE-core][scarthgap][PATCHv2 07/13] vim: Security Fix for CVE-2026-55892
2026-07-23 9:23 [OE-core][scarthgap][PATCHv2 01/13] vim: Security Fix for CVE-2026-28422 Siddharth
` (4 preceding siblings ...)
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 06/13] vim: Security Fix for CVE-2026-55693 Siddharth
@ 2026-07-23 9:23 ` Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 08/13] vim: Security Fix for CVE-2026-55895 Siddharth
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Siddharth @ 2026-07-23 9:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Siddharth Doshi
From: Siddharth Doshi <sdoshi@mvista.com>
Picking patch as per [1], and same patch is mentioned in [2]
References:
[1] https://nvd.nist.gov/vuln/detail/CVE-2026-55892
[2] https://security-tracker.debian.org/tracker/CVE-2026-55892
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
---
.../vim/files/CVE-2026-55892.patch | 81 +++++++++++++++++++
meta/recipes-support/vim/vim.inc | 1 +
2 files changed, 82 insertions(+)
create mode 100644 meta/recipes-support/vim/files/CVE-2026-55892.patch
diff --git a/meta/recipes-support/vim/files/CVE-2026-55892.patch b/meta/recipes-support/vim/files/CVE-2026-55892.patch
new file mode 100644
index 0000000000..5f46c97cfa
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2026-55892.patch
@@ -0,0 +1,81 @@
+From f0df4a48a426bd67c0c2f5ad536000a4368cd4c0 Mon Sep 17 00:00:00 2001
+From: Yasuhiro Matsumoto <mattn.jp@gmail.com>
+Date: Tue, 16 Jun 2026 20:32:21 +0000
+Subject: [PATCH 10/17] patch 9.2.0662: [security] Stack out-of-bounds write in
+ dump_prefixes()
+
+Problem: [security]: a crafted spell file with a self-referential
+ BY_INDEX node in the prefix tree can drive dump_prefixes()
+ past the end of its MAXWLEN-sized depth arrays on :spelldump
+ (cipher-creator)
+Solution: only descend while depth < MAXWLEN - 1, as the sibling trie
+ walkers already do (Yasuhiro Matsumoto)
+
+Github Security Advisory:
+https://github.com/vim/vim/security/advisories/GHSA-qm9w-fmpj-879h
+
+Supported by AI
+
+Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
+Signed-off-by: Christian Brabandt <cb@256bit.org>
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/8325b193bba5f01e7a7d8241fc8633d93dff996b]
+CVE: CVE-2026-55892
+Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
+---
+ src/spell.c | 2 +-
+ src/testdir/test_spell.vim | 27 +++++++++++++++++++++++++++
+ 2 files changed, 28 insertions(+), 1 deletion(-)
+
+diff --git a/src/spell.c b/src/spell.c
+index 2281986435..6ef3fa899b 100644
+--- a/src/spell.c
++++ b/src/spell.c
+@@ -4328,7 +4328,7 @@ dump_prefixes(
+ }
+ }
+ }
+- else
++ else if (depth < MAXWLEN - 1)
+ {
+ // Normal char, go one level deeper.
+ prefix[depth++] = c;
+diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim
+index 170ea57926..2a3f0e3696 100644
+--- a/src/testdir/test_spell.vim
++++ b/src/testdir/test_spell.vim
+@@ -1567,4 +1567,31 @@ let g:test_data_aff_sal = [
+ \"SAL Z S",
+ \ ]
+
++" A crafted .spl with a self-referential BY_INDEX node in the PREFIXTREE drove
++" dump_prefixes() past its MAXWLEN-sized depth arrays (stack out-of-bounds
++" write). The tree parses cleanly (shared refs aren't recursed); the walk
++" happens on :spelldump. Reaching the assert means no OOB. Same class as the
++" tree_count_words() fix (9.2.0653).
++func Test_spelldump_prefixtree_overflow()
++ CheckUnix
++ call mkdir('Xrtp/spell', 'pR')
++ " VIMspell + v50, SN_PREFCOND(prefixcnt=1), SN_END,
++ " LWORDTREE word "a" with affixID=1 (so dump_prefixes runs),
++ " empty KWORDTREE, PREFIXTREE child BY_INDEX -> nodeidx 0 (self-cycle), 'A'
++ let spl = eval('0z56494D7370656C6C32030000000003000100FF00000004'
++ \ .. '0161010220010000000000000002010100000041')
++ call writefile(spl, 'Xrtp/spell/xx.utf-8.spl', 'b')
++
++ new
++ set runtimepath+=./Xrtp
++ set spelllang=xx
++ set spell
++ spelldump
++ call assert_true(line('$') > 1)
++
++ set spell& spelllang& runtimepath&
++ bwipe!
++ bwipe!
++endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+--
+2.44.4
+
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
index 248160a82c..07f7b7dd16 100644
--- a/meta/recipes-support/vim/vim.inc
+++ b/meta/recipes-support/vim/vim.inc
@@ -42,6 +42,7 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
file://CVE-2026-47162.patch \
file://CVE-2026-47167.patch \
file://CVE-2026-55693.patch \
+ file://CVE-2026-55892.patch \
"
PV .= ".1683"
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [OE-core][scarthgap][PATCHv2 08/13] vim: Security Fix for CVE-2026-55895
2026-07-23 9:23 [OE-core][scarthgap][PATCHv2 01/13] vim: Security Fix for CVE-2026-28422 Siddharth
` (5 preceding siblings ...)
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 07/13] vim: Security Fix for CVE-2026-55892 Siddharth
@ 2026-07-23 9:23 ` Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 09/13] vim: Security Fix for CVE-2026-57452 Siddharth
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Siddharth @ 2026-07-23 9:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Siddharth Doshi
From: Siddharth Doshi <sdoshi@mvista.com>
Picking patch as per [1], and same patch is mentioned in [2]
References:
[1] https://nvd.nist.gov/vuln/detail/CVE-2026-55895
[2] https://security-tracker.debian.org/tracker/CVE-2026-55895
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
---
.../vim/files/CVE-2026-55895.patch | 53 +++++++++++++++++++
meta/recipes-support/vim/vim.inc | 1 +
2 files changed, 54 insertions(+)
create mode 100644 meta/recipes-support/vim/files/CVE-2026-55895.patch
diff --git a/meta/recipes-support/vim/files/CVE-2026-55895.patch b/meta/recipes-support/vim/files/CVE-2026-55895.patch
new file mode 100644
index 0000000000..0084006b72
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2026-55895.patch
@@ -0,0 +1,53 @@
+From 0d286458d71ff7b4d759621dd9a567aa9354819a Mon Sep 17 00:00:00 2001
+From: Yasuhiro Matsumoto <mattn.jp@gmail.com>
+Date: Tue, 16 Jun 2026 21:00:28 +0000
+Subject: [PATCH 11/17] patch 9.2.0663: [security]: runtime(netrw): code
+ injection in local file deletion
+
+Problem: [security]: s:NetrwLocalRmFile() escapes only the backslash in
+ the file name before passing it to :execute, so a name
+ containing "|" injects arbitrary Ex commands when the file is
+ deleted (cipher-creator)
+Solution: Use fnameescape() to correctly escape the file name
+ (Yasuhiro Matsumoto).
+
+Github Security Advisory:
+https://github.com/vim/vim/security/advisories/GHSA-vhh8-v6wx-hjjh
+
+Supported by AI
+
+Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
+Signed-off-by: Christian Brabandt <cb@256bit.org>
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/55bc757a5d436e59d50fe43f7cda94b118f86cb2]
+CVE: CVE-2026-55895
+Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
+---
+ runtime/pack/dist/opt/netrw/autoload/netrw.vim | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/runtime/pack/dist/opt/netrw/autoload/netrw.vim b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
+index 9014ca339b..af43f469d1 100644
+--- a/runtime/pack/dist/opt/netrw/autoload/netrw.vim
++++ b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
+@@ -3025,7 +3025,7 @@ function s:NetrwBrowse(islocal,dirname)
+ elseif !a:islocal && dirname !~ '[\/]$' && dirname !~ '^"'
+ " s:NetrwBrowse : remote regular file handler {{{3
+ if bufname(dirname) != ""
+- exe "NetrwKeepj b ".bufname(dirname)
++ exe "NetrwKeepj b ".fnameescape(bufname(dirname))
+ else
+ " attempt transfer of remote regular file
+
+@@ -8737,7 +8737,7 @@ function s:NetrwLocalRmFile(path, fname, all)
+ call netrw#msg#Notify('ERROR', printf("unable to delete <%s>!", rmfile))
+ else
+ " Remove file only if there are no pending changes
+- execute printf('silent! bwipeout %s', rmfile)
++ execute printf('silent! bwipeout %s', fnameescape(rmfile))
+ endif
+
+ elseif dir && (all || empty(ok))
+--
+2.44.4
+
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
index 07f7b7dd16..bd1d52eaf6 100644
--- a/meta/recipes-support/vim/vim.inc
+++ b/meta/recipes-support/vim/vim.inc
@@ -43,6 +43,7 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
file://CVE-2026-47167.patch \
file://CVE-2026-55693.patch \
file://CVE-2026-55892.patch \
+ file://CVE-2026-55895.patch \
"
PV .= ".1683"
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [OE-core][scarthgap][PATCHv2 09/13] vim: Security Fix for CVE-2026-57452
2026-07-23 9:23 [OE-core][scarthgap][PATCHv2 01/13] vim: Security Fix for CVE-2026-28422 Siddharth
` (6 preceding siblings ...)
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 08/13] vim: Security Fix for CVE-2026-55895 Siddharth
@ 2026-07-23 9:23 ` Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 10/13] vim: Security Fix for CVE-2026-57455 Siddharth
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Siddharth @ 2026-07-23 9:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Siddharth Doshi
From: Siddharth Doshi <sdoshi@mvista.com>
Picking patch as per [1], and same patch is mentioned in [2]
References:
[1] https://nvd.nist.gov/vuln/detail/CVE-2026-57452
[2] https://security-tracker.debian.org/tracker/CVE-2026-57452
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
---
.../vim/files/CVE-2026-57452.patch | 76 +++++++++++++++++++
meta/recipes-support/vim/vim.inc | 1 +
2 files changed, 77 insertions(+)
create mode 100644 meta/recipes-support/vim/files/CVE-2026-57452.patch
diff --git a/meta/recipes-support/vim/files/CVE-2026-57452.patch b/meta/recipes-support/vim/files/CVE-2026-57452.patch
new file mode 100644
index 0000000000..aaefbe80eb
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2026-57452.patch
@@ -0,0 +1,76 @@
+From c8777cec25dcfae89c42e9aff51af61f71c5745f Mon Sep 17 00:00:00 2001
+From: Christian Brabandt <cb@256bit.org>
+Date: Thu, 18 Jun 2026 18:41:16 +0000
+Subject: [PATCH] patch 9.2.0671: [security]: possible out-of-bounds read with
+ sodium encrypted files
+
+Problem: [security]: possible out-of-bounds read with sodium encrypted
+ files (cipher-creator)
+Solution: Verify that there is enough space before calling
+ crypto_secretstream_xchacha20poly1305_init_pull()
+
+Github Security Advisory:
+https://github.com/vim/vim/security/advisories/GHSA-c4j9-wr9j-4486
+
+Supported by AI
+
+Signed-off-by: Christian Brabandt <cb@256bit.org>
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/c8777cec25dcfae89c42e9aff51af61f71c5745f]
+CVE: CVE-2026-57452
+Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
+---
+ src/crypt.c | 3 ++-
+ src/testdir/test_crypt.vim | 24 ++++++++++++++++++++++++
+ 2 files changed, 26 insertions(+), 1 deletion(-)
+
+diff --git a/src/crypt.c b/src/crypt.c
+index 55edd6c6de..a11d204e5e 100644
+--- a/src/crypt.c
++++ b/src/crypt.c
+@@ -1257,7 +1257,8 @@ crypt_sodium_buffer_decode(
+
+ if (sod_st->count == 0)
+ {
+- if (crypto_secretstream_xchacha20poly1305_init_pull(&sod_st->state,
++ if (len < crypto_secretstream_xchacha20poly1305_HEADERBYTES ||
++ crypto_secretstream_xchacha20poly1305_init_pull(&sod_st->state,
+ from, sod_st->key) != 0)
+ {
+ emsg(_(e_libsodium_decryption_failed_header_incomplete));
+diff --git a/src/testdir/test_crypt.vim b/src/testdir/test_crypt.vim
+index 4a96c30702..151a4dea17 100644
+--- a/src/testdir/test_crypt.vim
++++ b/src/testdir/test_crypt.vim
+@@ -459,4 +459,28 @@ func Test_crypt_set_key_disallow_append_subtract()
+ bwipe!
+ endfunc
+
++func Test_crypt_sodium_short_body()
++ CheckFeature sodium
++ " A VimCrypt~04! file with a complete 36-byte header (12 magic + 16 salt +
++ " 8 seed) but a body shorter than one secretstream header (24 bytes) used to
++ " underflow the body length and crash with a wild out-of-bounds read in
++ " crypto_secretstream_xchacha20poly1305_pull(). It must now fail cleanly.
++ " Bytes: "VimCrypt~04!" + 16 salt + 8 seed + 8-byte body = 44 bytes.
++ call writefile(0z56696D43727970747E303421
++ \ + 0zA0A1A2A3A4A5A6A7A8A9AAABACADAEAF
++ \ + 0zB0B1B2B3B4B5B6B7
++ \ + 0z0000000000000000, 'Xtest_sodium_short')
++
++ let v:errmsg = ''
++ try
++ call feedkeys(":split Xtest_sodium_short\<CR>foobar\<CR>", "xt")
++ catch /^Vim\%((\S\+)\)\=:E1198:/
++ " no-op
++ endtry
++
++ bwipe!
++ call delete('Xtest_sodium_short')
++ set key=
++endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+--
+2.44.4
+
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
index bd1d52eaf6..567da7be0c 100644
--- a/meta/recipes-support/vim/vim.inc
+++ b/meta/recipes-support/vim/vim.inc
@@ -44,6 +44,7 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
file://CVE-2026-55693.patch \
file://CVE-2026-55892.patch \
file://CVE-2026-55895.patch \
+ file://CVE-2026-57452.patch \
"
PV .= ".1683"
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [OE-core][scarthgap][PATCHv2 10/13] vim: Security Fix for CVE-2026-57455
2026-07-23 9:23 [OE-core][scarthgap][PATCHv2 01/13] vim: Security Fix for CVE-2026-28422 Siddharth
` (7 preceding siblings ...)
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 09/13] vim: Security Fix for CVE-2026-57452 Siddharth
@ 2026-07-23 9:23 ` Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 11/13] vim: Security Fix for CVE-2026-59856 Siddharth
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Siddharth @ 2026-07-23 9:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Siddharth Doshi
From: Siddharth Doshi <sdoshi@mvista.com>
Picking patch as per [1], and same patch is mentioned in [2]
References:
[1] https://nvd.nist.gov/vuln/detail/CVE-2026-57455
[2] https://security-tracker.debian.org/tracker/CVE-2026-57455
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
---
.../vim/files/CVE-2026-57455.patch | 72 +++++++++++++++++++
meta/recipes-support/vim/vim.inc | 1 +
2 files changed, 73 insertions(+)
create mode 100644 meta/recipes-support/vim/files/CVE-2026-57455.patch
diff --git a/meta/recipes-support/vim/files/CVE-2026-57455.patch b/meta/recipes-support/vim/files/CVE-2026-57455.patch
new file mode 100644
index 0000000000..722238c794
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2026-57455.patch
@@ -0,0 +1,72 @@
+From 497d2fb19b2af9bccf139bb910e4f91b583e769d Mon Sep 17 00:00:00 2001
+From: Christian Brabandt <cb@256bit.org>
+Date: Sun, 21 Jun 2026 19:20:03 +0000
+Subject: [PATCH 13/17] patch 9.2.0698: [security]: Out-of-bounds write with
+ soundfold()
+
+Problem: [security]: Out-of-bounds write with soundfold()
+ (cipher-creator)
+Solution: Add an abort condition to the for loop to validate the buffer
+ size.
+
+Github Security Advisory:
+https://github.com/vim/vim/security/advisories/GHSA-q8mh-6qm3-25g4
+
+Supported by AI
+
+Signed-off-by: Christian Brabandt <cb@256bit.org>
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/497f931f85339d175d7f69588dd249e8ccfed41b]
+CVE: CVE-2026-57455
+Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
+---
+ src/spell.c | 2 +-
+ src/testdir/test_spellfile.vim | 21 +++++++++++++++++++++
+ 2 files changed, 22 insertions(+), 1 deletion(-)
+
+diff --git a/src/spell.c b/src/spell.c
+index 6ef3fa899b..a7909ef46e 100644
+--- a/src/spell.c
++++ b/src/spell.c
+@@ -3273,7 +3273,7 @@ spell_soundfold_sofo(slang_T *slang, char_u *inword, char_u *res)
+ 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 --git a/src/testdir/test_spellfile.vim b/src/testdir/test_spellfile.vim
+index e5f8c5778f..d04d024911 100644
+--- a/src/testdir/test_spellfile.vim
++++ b/src/testdir/test_spellfile.vim
+@@ -1193,4 +1193,25 @@ func Test_spell_sug_tree_count_words_overflow()
+ 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
++ defer delete('Xtest.latin1.spl')
++ defer delete('Xtest.latin1.sug')
++ 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
++endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+--
+2.44.4
+
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
index 567da7be0c..8794f831b0 100644
--- a/meta/recipes-support/vim/vim.inc
+++ b/meta/recipes-support/vim/vim.inc
@@ -45,6 +45,7 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
file://CVE-2026-55892.patch \
file://CVE-2026-55895.patch \
file://CVE-2026-57452.patch \
+ file://CVE-2026-57455.patch \
"
PV .= ".1683"
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [OE-core][scarthgap][PATCHv2 11/13] vim: Security Fix for CVE-2026-59856
2026-07-23 9:23 [OE-core][scarthgap][PATCHv2 01/13] vim: Security Fix for CVE-2026-28422 Siddharth
` (8 preceding siblings ...)
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 10/13] vim: Security Fix for CVE-2026-57455 Siddharth
@ 2026-07-23 9:23 ` Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 12/13] vim: Security Fix for CVE-2026-59857 Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 13/13] vim: Security Fix for CVE-2026-59858 Siddharth
11 siblings, 0 replies; 13+ messages in thread
From: Siddharth @ 2026-07-23 9:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Siddharth Doshi
From: Siddharth Doshi <sdoshi@mvista.com>
Picking patch as per [1], and same patch is mentioned in [2]
References:
[1] https://nvd.nist.gov/vuln/detail/CVE-2026-59856
[2] https://security-tracker.debian.org/tracker/CVE-2026-59856
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
---
.../vim/files/CVE-2026-59856.patch | 103 ++++++++++++++++++
meta/recipes-support/vim/vim.inc | 1 +
2 files changed, 104 insertions(+)
create mode 100644 meta/recipes-support/vim/files/CVE-2026-59856.patch
diff --git a/meta/recipes-support/vim/files/CVE-2026-59856.patch b/meta/recipes-support/vim/files/CVE-2026-59856.patch
new file mode 100644
index 0000000000..01267460d1
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2026-59856.patch
@@ -0,0 +1,103 @@
+From 43afc581a37a35762dd0ef292f038b9dc5680a24 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>
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/43afc581a37a35762dd0ef292f038b9dc5680a24]
+CVE: CVE-2026-59856
+Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
+---
+ 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 5b4263ae45..93f7d8b450 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 0d4aeb0432..7d57b2e727 100644
+--- a/src/testdir/Make_all.mak
++++ b/src/testdir/Make_all.mak
+@@ -248,6 +248,7 @@ NEW_TESTS = \
+ test_plugin_man \
+ test_plugin_matchparen \
+ test_plugin_python3complete \
++ test_plugin_phpcomplete \
+ test_plugin_tar \
+ test_plugin_termdebug \
+ test_plugin_tohtml \
+@@ -522,6 +523,7 @@ NEW_TESTS_RES = \
+ test_plugin_man.res \
+ test_plugin_matchparen.res \
+ test_plugin_python3complete.res \
++ test_plugin_phpcomplete.res \
+ test_plugin_tar.res \
+ test_plugin_termdebug.res \
+ test_plugin_tohtml.res \
+
+diff --git a/src/testdir/test_plugin_phpcomplete.vim b/src/testdir/test_plugin_phpcomplete.vim
+new file mode 100644
+index 0000000000..7f66be47b7
+--- /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
+--
+2.44.4
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
index 8794f831b0..37a965429a 100644
--- a/meta/recipes-support/vim/vim.inc
+++ b/meta/recipes-support/vim/vim.inc
@@ -46,6 +46,7 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
file://CVE-2026-55895.patch \
file://CVE-2026-57452.patch \
file://CVE-2026-57455.patch \
+ file://CVE-2026-59856.patch \
"
PV .= ".1683"
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [OE-core][scarthgap][PATCHv2 12/13] vim: Security Fix for CVE-2026-59857
2026-07-23 9:23 [OE-core][scarthgap][PATCHv2 01/13] vim: Security Fix for CVE-2026-28422 Siddharth
` (9 preceding siblings ...)
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 11/13] vim: Security Fix for CVE-2026-59856 Siddharth
@ 2026-07-23 9:23 ` Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 13/13] vim: Security Fix for CVE-2026-59858 Siddharth
11 siblings, 0 replies; 13+ messages in thread
From: Siddharth @ 2026-07-23 9:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Siddharth Doshi
From: Siddharth Doshi <sdoshi@mvista.com>
Picking patch as per [1], and same patch is mentioned in [2]
References:
[1] https://nvd.nist.gov/vuln/detail/CVE-2026-59857
[2] https://security-tracker.debian.org/tracker/CVE-2026-59857
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
---
.../vim/files/CVE-2026-59857.patch | 110 ++++++++++++++++++
meta/recipes-support/vim/vim.inc | 1 +
2 files changed, 111 insertions(+)
create mode 100644 meta/recipes-support/vim/files/CVE-2026-59857.patch
diff --git a/meta/recipes-support/vim/files/CVE-2026-59857.patch b/meta/recipes-support/vim/files/CVE-2026-59857.patch
new file mode 100644
index 0000000000..ed92190a95
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2026-59857.patch
@@ -0,0 +1,110 @@
+From 48287480f53acfb5e6f9172e571ed2f0508dfab2 Mon Sep 17 00:00:00 2001
+From: Hirohito Higashi <h.east.727@gmail.com>
+Date: Mon, 22 Jun 2026 13:00:36 +0900
+Subject: [PATCH 16/17] patch 9.2.0725: [security]: Stack out-of-bounds write
+ in spell_soundfold_sal()
+
+Problem: [security]: A crafted spell file with non-collapsing SAL rules
+ can make soundfold() write one byte past the end of the
+ MAXWLEN result buffer. This is the same class of
+ out-of-bounds write as GHSA-q8mh-6qm3-25g4 (fixed in 9.2.0698
+ for the SOFO branch), found while auditing the surrounding
+ code.
+Solution: Bound the single-byte SAL result writes and the terminating
+ NUL to MAXWLEN - 1, matching the SOFO branch.
+
+The single-byte branch of spell_soundfold_sal() guarded its writes with
+"reslen < MAXWLEN", allowing reslen to reach MAXWLEN (254). The trailing
+"res[reslen] = NUL" then wrote at index 254 of the 254-byte stack buffer
+res[MAXWLEN], an off-by-one out-of-bounds write. Input is case-folded to
+about 253 characters, so a 253-character argument together with a SAL map
+that does not collapse (collapse_result false) reaches the boundary.
+
+Related to previous issue
+[GHSA-q8mh-6qm3-25g4](https://github.com/vim/vim/security/advisories/GHSA-q8mh-6qm3-25g4)
+(9.2.0698)
+
+Github Security Advisory:
+https://github.com/vim/vim/security/advisories/GHSA-m3hf-xcm3-xhm2
+
+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>
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/d22ff1c955ff87e8273210eae125aab0e85b6c30]
+CVE: CVE-2026-59857
+Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
+---
+ src/spell.c | 6 +++---
+ src/testdir/test_spellfile.vim | 24 ++++++++++++++++++++++++
+ 2 files changed, 27 insertions(+), 3 deletions(-)
+
+diff --git a/src/spell.c b/src/spell.c
+index a7909ef46e..05d6f0159d 100644
+--- a/src/spell.c
++++ b/src/spell.c
+@@ -3516,7 +3516,7 @@ spell_soundfold_sal(slang_T *slang, char_u *inword, char_u *res)
+ // no '<' rule used
+ i += k - 1;
+ z = 0;
+- while (*s != NUL && s[1] != NUL && reslen < MAXWLEN)
++ while (*s != NUL && s[1] != NUL && reslen < MAXWLEN - 1)
+ {
+ if (reslen == 0 || res[reslen - 1] != *s)
+ res[reslen++] = *s;
+@@ -3526,7 +3526,7 @@ spell_soundfold_sal(slang_T *slang, char_u *inword, char_u *res)
+ c = *s;
+ if (strstr((char *)pf, "^^") != NULL)
+ {
+- if (c != NUL)
++ if (c != NUL && reslen < MAXWLEN - 1)
+ res[reslen++] = c;
+ STRMOVE(word, word + i + 1);
+ i = 0;
+@@ -3545,7 +3545,7 @@ spell_soundfold_sal(slang_T *slang, char_u *inword, char_u *res)
+
+ if (z0 == 0)
+ {
+- if (k && !p0 && reslen < MAXWLEN && c != NUL
++ if (k && !p0 && reslen < MAXWLEN - 1 && c != NUL
+ && (!slang->sl_collapse || reslen == 0
+ || res[reslen - 1] != c))
+ // condense only double letters
+diff --git a/src/testdir/test_spellfile.vim b/src/testdir/test_spellfile.vim
+index d04d024911..c8c7ac2642 100644
+--- a/src/testdir/test_spellfile.vim
++++ b/src/testdir/test_spellfile.vim
+@@ -383,6 +383,30 @@ func Test_spellfile_format_error()
+ let &rtp = save_rtp
+ endfunc
+
++" An over-length soundfold() argument must not overflow the MAXWLEN result
++" buffer in the single-byte branch of spell_soundfold_sal().
++func Test_spellfile_soundfold_sal_overflow()
++ let save_enc = &encoding
++ set encoding=latin1
++ " A SAL map that appends without collapsing, so the result is not shorter
++ " than the input.
++ call writefile(['SET ISO8859-1', 'SAL collapse_result false',
++ \ 'SAL a aaaa', 'SAL b bbbb'], 'Xsal.aff')
++ call writefile(['2', 'hello', 'world'], 'Xsal.dic')
++ mkspell! Xsal Xsal
++ set spl=Xsal.latin1.spl spell
++
++ " 253 input characters hit the buffer boundary; the result must not exceed
++ " MAXWLEN - 1.
++ call assert_true(strlen(soundfold(repeat('a', 253))) <= 253)
++
++ set nospell spl& spelllang&
++ call delete('Xsal.aff')
++ call delete('Xsal.dic')
++ call delete('Xsal.latin1.spl')
++ let &encoding = save_enc
++endfunc
++
+ " Test for format errors in suggest file
+ func Test_sugfile_format_error()
+ let save_rtp = &rtp
+--
+2.44.4
+
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
index 37a965429a..a484a5c840 100644
--- a/meta/recipes-support/vim/vim.inc
+++ b/meta/recipes-support/vim/vim.inc
@@ -47,6 +47,7 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
file://CVE-2026-57452.patch \
file://CVE-2026-57455.patch \
file://CVE-2026-59856.patch \
+ file://CVE-2026-59857.patch \
"
PV .= ".1683"
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [OE-core][scarthgap][PATCHv2 13/13] vim: Security Fix for CVE-2026-59858
2026-07-23 9:23 [OE-core][scarthgap][PATCHv2 01/13] vim: Security Fix for CVE-2026-28422 Siddharth
` (10 preceding siblings ...)
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 12/13] vim: Security Fix for CVE-2026-59857 Siddharth
@ 2026-07-23 9:23 ` Siddharth
11 siblings, 0 replies; 13+ messages in thread
From: Siddharth @ 2026-07-23 9:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Siddharth Doshi
From: Siddharth Doshi <sdoshi@mvista.com>
Picking patch as per [1], and same patch is mentioned in [2]
References:
[1] https://nvd.nist.gov/vuln/detail/CVE-2026-59858
[2] https://security-tracker.debian.org/tracker/CVE-2026-59858
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
---
.../vim/files/CVE-2026-59858.patch | 134 ++++++++++++++++++
meta/recipes-support/vim/vim.inc | 1 +
2 files changed, 135 insertions(+)
create mode 100644 meta/recipes-support/vim/files/CVE-2026-59858.patch
diff --git a/meta/recipes-support/vim/files/CVE-2026-59858.patch b/meta/recipes-support/vim/files/CVE-2026-59858.patch
new file mode 100644
index 0000000000..0b754ec2d3
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2026-59858.patch
@@ -0,0 +1,134 @@
+From 6b611b0d15603c52ebdad17172b0232b4f65704e 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>
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/6b611b0d15603c52ebdad17172b0232b4f65704e]
+CVE: CVE-2026-59858
+Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
+---
+ 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 cb4bb2c167..248d6f2e60 100644
+--- a/runtime/autoload/ccomplete.vim
++++ b/runtime/autoload/ccomplete.vim
+@@ -593,7 +593,7 @@ def StructMembers( # {{{1
+ return []
+ endif
+ execute 'silent! keepjumps noautocmd '
+- .. n .. 'vimgrep ' .. '/\t' .. typename .. '\(\t\|$\)/j '
++ .. n .. 'vimgrep ' .. '/\t' .. escape(typename, '/\') .. '\(\t\|$\)/j '
+ .. fnames
+
+ qflist = getqflist()
+diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
+index 7d57b2e727..681e9b3b2a 100644
+--- a/src/testdir/Make_all.mak
++++ b/src/testdir/Make_all.mak
+@@ -242,6 +242,7 @@ NEW_TESTS = \
+ test_partial \
+ test_paste \
+ test_perl \
++ test_plugin_ccomplete \
+ test_plugin_comment \
+ test_plugin_glvs \
+ test_plugin_helptoc \
+@@ -516,6 +517,7 @@ NEW_TESTS_RES = \
+ test_partial.res \
+ test_paste.res \
+ test_perl.res \
++ test_plugin_ccomplete.res \
+ test_plugin_comment.res \
+ test_plugin_glvs.res \
+ test_plugin_helptoc.res \
+diff --git a/src/testdir/test_plugin_ccomplete.vim b/src/testdir/test_plugin_ccomplete.vim
+new file mode 100644
+index 0000000000..a635bd50bd
+--- /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
+--
+2.44.4
+
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
index a484a5c840..6ef9745b57 100644
--- a/meta/recipes-support/vim/vim.inc
+++ b/meta/recipes-support/vim/vim.inc
@@ -48,6 +48,7 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
file://CVE-2026-57455.patch \
file://CVE-2026-59856.patch \
file://CVE-2026-59857.patch \
+ file://CVE-2026-59858.patch \
"
PV .= ".1683"
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread