Headline
CVE-2022-2344: patch 9.0.0046: reading past end of completion with duplicate match · vim/vim@baefde1
Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.0045.
Permalink
Browse files
patch 9.0.0046: reading past end of completion with duplicate match
Problem: Reading past end of completion with duplicate match. Solution: Check string length
- Loading branch information
1 parent caea664 commit baefde14550231f6468ac2ed2ed495bc381c0c92
Showing 3 changed files with 14 additions and 1 deletion.
- insexpand.c
- test_ins_complete.vim
- version.c
@@ -786,7 +786,8 @@ ins_compl_add(
{
if (!match_at_original_text(match)
&& STRNCMP(match->cp_str, str, len) == 0
&& match->cp_str[len] == NUL)
&& ((int)STRLEN(match->cp_str) <= len
|| match->cp_str[len] == NUL))
return NOTDONE;
match = match->cp_next;
} while (match != NULL && !is_first_match(match));
@@ -2112,5 +2112,15 @@ func Test_infercase_very_long_line()
set noic noinfercase
endfunc
func Test_ins_complete_add()
" this was reading past the end of allocated memory
new
norm o
norm 7o
sil! norm o
bwipe!
endfunc
" vim: shiftwidth=2 sts=2 expandtab
@@ -735,6 +735,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
46,
/**/
45,
/**/
0 comments on commit baefde1
Please sign in to comment.
Related news
Gentoo Linux Security Advisory 202305-16 - Multiple vulnerabilities have been found in Vim, the worst of which could result in denial of service. Versions less than 9.0.1157 are affected.
Ubuntu Security Notice 5995-1 - It was discovered that Vim incorrectly handled memory when opening certain files. If an attacker could trick a user into opening a specially crafted file, it could cause Vim to crash, or possible execute arbitrary code. This issue only affected Ubuntu 14.04 ESM, Ubuntu 18.04 LTS, Ubuntu 20.04 LTS, and Ubuntu 22.04 LTS.
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.
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. […]
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.