Headline
CVE-2022-0392: patch 8.2.4218: illegal memory access with bracketed paste in Ex mode · vim/vim@806d037
Heap-based Buffer Overflow in GitHub repository vim prior to 8.2.
Permalink
Browse files
patch 8.2.4218: illegal memory access with bracketed paste in Ex mode
Problem: Illegal memory access with bracketed paste in Ex mode. Solution: Reserve space for the trailing NUL.
- Loading branch information
1 parent 8d02ce1 commit 806d037671e133bd28a7864248763f643967973a
Showing 3 changed files with 7 additions and 1 deletion.
- edit.c
- test_paste.vim
- version.c
@@ -4452,7 +4452,8 @@ bracketed_paste(paste_mode_T mode, int drop, garray_T *gap)
break;
case PASTE_EX:
if (gap != NULL && ga_grow(gap, idx) == OK)
// add one for the NUL that is going to be appended
if (gap != NULL && ga_grow(gap, idx + 1) == OK)
{
mch_memmove((char *)gap->ga_data + gap->ga_len,
buf, (size_t)idx);
@@ -90,6 +90,9 @@ func Test_paste_ex_mode()
unlet! foo
call feedkeys("Qlet foo=\"\<Esc>[200~foo\<CR>bar\<Esc>[201~\"\<CR>vi\<CR>", ‘xt’)
call assert_equal("foo\rbar", foo)
" pasting more than 40 bytes
exe “norm Q\<PasteStart>0000000000000000000000000000000000000000000000000000000000000000000000\<C-C>”
endfunc
func Test_paste_onechar()
@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4218,
/**/
4217,
/**/
0 comments on commit 806d037
Please sign in to comment.
Related news
Dell Streaming Data Platform prior to 1.4 contains Open Redirect vulnerability. An attacker with privileges same as a legitimate user can phish the legitimate the user to redirect to malicious website leading to information disclosure and launch of phishing attacks.
Dell VxRail, versions prior to 7.0.410, contain a Container Escape Vulnerability. A local high-privileged attacker could potentially exploit this vulnerability, leading to the execution of arbitrary OS commands on the container's underlying OS. Exploitation may lead to a system take over by an attacker.
Ubuntu Security Notice 5801-1 - It was discovered that Vim makes illegal memory calls when pasting brackets in Ex mode. An attacker could possibly use this to crash Vim, access or modify memory, or execute arbitrary commands. This issue affected only Ubuntu 20.04 and 22.04 It was discovered that Vim makes illegal memory calls when making certain retab calls. An attacker could possibly use this to crash Vim, access or modify memory, or execute arbitrary commands.
Hello everyone! Great news for my open source Scanvus project! You can now perform vulnerability checks on Linux hosts and docker images not only using the Vulners.com API, but also with the Vulns.io VM API. It’s especially nice that all the code to support the new API was written and contributed by colleagues from Vulns.io. […]
A memory corruption issue existed in the processing of ICC profiles. This issue was addressed with improved input validation. This issue is fixed in macOS Ventura 13. Processing a maliciously crafted image may lead to arbitrary code execution.
Gentoo Linux Security Advisory 202208-32 - Multiple vulnerabilities have been discovered in Vim, the worst of which could result in denial of service. Versions less than 9.0.0060 are affected.