vim: Security Fix for CVE-2026-43961

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

(From OE-Core rev: 333839503766bdb995092b09546922a3f4ec968e)

Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Paul Barker <paul@pbarker.dev>
This commit is contained in:
Siddharth Doshi
2026-07-23 14:53:44 +05:30
committed by Paul Barker
parent 0939d72e83
commit 0623e8b986
2 changed files with 66 additions and 0 deletions

View File

@@ -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

View File

@@ -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"