From: Siddharth <sdoshi@mvista.com>
To: openembedded-core@lists.openembedded.org
Cc: Siddharth Doshi <sdoshi@mvista.com>
Subject: [OE-core][wrynose][PATCHv2 2/6] vim: Security Fix for CVE-2026-43961
Date: Mon, 27 Jul 2026 11:48:13 +0530 [thread overview]
Message-ID: <20260727061817.8586-2-sdoshi@mvista.com> (raw)
In-Reply-To: <20260727061817.8586-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://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 | 104 ++++++++++++++++++
meta/recipes-support/vim/vim.inc | 1 +
2 files changed, 105 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..e2633ac04f
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2026-43961.patch
@@ -0,0 +1,104 @@
+From 8af0f098c3a42a28661d0295364e6e0fd7dbc92c Mon Sep 17 00:00:00 2001
+From: Christian Brabandt <cb@256bit.org>
+Date: Thu, 14 May 2026 16:43:15 +0000
+Subject: [PATCH] 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 +++----
+ src/testdir/test_plugin_netrw.vim | 15 +++++++++++++++
+ src/version.c | 2 ++
+ 3 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/runtime/pack/dist/opt/netrw/autoload/netrw.vim b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
+index 78ce0cbc3c..3a460e675b 100644
+--- a/runtime/pack/dist/opt/netrw/autoload/netrw.vim
++++ b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
+@@ -5175,7 +5175,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)
+@@ -5196,7 +5196,6 @@ function s:NetrwMarkFile(islocal,fname)
+
+ else
+ " initialize new markfilelist
+-
+ let s:netrwmarkfilelist_{curbufnr}= []
+ call add(s:netrwmarkfilelist_{curbufnr},substitute(a:fname,'[|@]$','',''))
+
+@@ -5216,7 +5215,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
+@@ -7235,7 +7234,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
+diff --git a/src/testdir/test_plugin_netrw.vim b/src/testdir/test_plugin_netrw.vim
+index 6be32911ce..7b34b52562 100644
+--- a/src/testdir/test_plugin_netrw.vim
++++ b/src/testdir/test_plugin_netrw.vim
+@@ -639,4 +639,19 @@ func Test_netrw_RFC2396()
+ call assert_equal('a b', netrw#RFC2396(fname))
+ endfunc
+
++func Test_netrw_mf_command_injection()
++ CheckUnix
++ CheckExecutable touch
++ let path = tempname()
++ let fname = 'x" . execute("silent! !touch poc") . "'
++ call mkdir(path, 'R')
++ exe "cd " path
++ call writefile([], fname)
++ Explore .
++ call search('^x')
++ :norm mf
++ :norm mf
++ call assert_false(filereadable('poc'), 'Command injection via mf command')
++endfunc
++
+ " vim:ts=8 sts=2 sw=2 et
+diff --git a/src/version.c b/src/version.c
+index 4508ae3f18..64008e0f37 100644
+--- a/src/version.c
++++ b/src/version.c
+@@ -734,6 +734,8 @@ static char *(features[]) =
+
+ static int included_patches[] =
+ { /* Add new patch number below this line */
++/**/
++ 480,
+ /**/
+ 383,
+ /**/
+--
+2.34.1
+
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
index 0ad78ab4f0..fd835a3cdb 100644
--- a/meta/recipes-support/vim/vim.inc
+++ b/meta/recipes-support/vim/vim.inc
@@ -24,6 +24,7 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https;tag=v${PV}
file://CVE-2026-52859.patch \
file://CVE-2026-52860.patch \
file://CVE-2026-42307.patch \
+ file://CVE-2026-43961.patch \
"
PV .= ".0340"
--
2.34.1
next prev parent reply other threads:[~2026-07-27 6:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 6:18 [OE-core][wrynose][PATCHv2 1/6] vim: Security Fix for CVE-2026-42307 Siddharth
2026-07-27 6:18 ` Siddharth [this message]
2026-07-27 6:18 ` [OE-core][wrynose][PATCHv2 3/6] vim: Security Fix for CVE-2026-47162 Siddharth
2026-07-27 6:18 ` [OE-core][wrynose][PATCHv2 4/6] vim: Security Fix for CVE-2026-47167 Siddharth
2026-07-27 6:18 ` [OE-core][wrynose][PATCHv2 5/6] vim: Security Fix for CVE-2026-55892 Siddharth
2026-07-27 6:18 ` [OE-core][wrynose][PATCHv2 6/6] vim: Security Fix for CVE-2026-57452 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=20260727061817.8586-2-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