From: Siddharth <sdoshi@mvista.com>
To: openembedded-core@lists.openembedded.org
Cc: Siddharth Doshi <sdoshi@mvista.com>
Subject: [OE-core][scarthgap][PATCHv2 11/13] vim: Security Fix for CVE-2026-59856
Date: Thu, 23 Jul 2026 14:53:52 +0530 [thread overview]
Message-ID: <20260723092354.54697-11-sdoshi@mvista.com> (raw)
In-Reply-To: <20260723092354.54697-1-sdoshi@mvista.com>
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
next prev parent reply other threads:[~2026-07-23 9:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` [OE-core][scarthgap][PATCHv2 04/13] vim: Security Fix for CVE-2026-47162 Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 05/13] vim: Security Fix for CVE-2026-47167 Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 06/13] vim: Security Fix for CVE-2026-55693 Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 07/13] vim: Security Fix for CVE-2026-55892 Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 08/13] vim: Security Fix for CVE-2026-55895 Siddharth
2026-07-23 9:23 ` [OE-core][scarthgap][PATCHv2 09/13] vim: Security Fix for CVE-2026-57452 Siddharth
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260723092354.54697-11-sdoshi@mvista.com \
--to=sdoshi@mvista.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox