From: Siddharth <sdoshi@mvista.com>
To: openembedded-core@lists.openembedded.org
Cc: Siddharth Doshi <sdoshi@mvista.com>
Subject: [OE-core][wrynose][PATCHv2 6/6] vim: Security Fix for CVE-2026-57452
Date: Mon, 27 Jul 2026 11:48:17 +0530 [thread overview]
Message-ID: <20260727061817.8586-6-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://nvd.nist.gov/vuln/detail/CVE-2026-57452
[2] https://security-tracker.debian.org/tracker/CVE-2026-57452
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
---
.../vim/files/CVE-2026-57452.patch | 90 +++++++++++++++++++
meta/recipes-support/vim/vim.inc | 1 +
2 files changed, 91 insertions(+)
create mode 100644 meta/recipes-support/vim/files/CVE-2026-57452.patch
diff --git a/meta/recipes-support/vim/files/CVE-2026-57452.patch b/meta/recipes-support/vim/files/CVE-2026-57452.patch
new file mode 100644
index 0000000000..e87007c00a
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2026-57452.patch
@@ -0,0 +1,90 @@
+From c8777cec25dcfae89c42e9aff51af61f71c5745f Mon Sep 17 00:00:00 2001
+From: Christian Brabandt <cb@256bit.org>
+Date: Thu, 18 Jun 2026 18:41:16 +0000
+Subject: [PATCH] patch 9.2.0671: [security]: possible out-of-bounds read with
+ sodium encrypted files
+
+Problem: [security]: possible out-of-bounds read with sodium encrypted
+ files (cipher-creator)
+Solution: Verify that there is enough space before calling
+ crypto_secretstream_xchacha20poly1305_init_pull()
+
+Github Security Advisory:
+https://github.com/vim/vim/security/advisories/GHSA-c4j9-wr9j-4486
+
+Supported by AI
+
+Signed-off-by: Christian Brabandt <cb@256bit.org>
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/c8777cec25dcfae89c42e9aff51af61f71c5745f]
+CVE: CVE-2026-57452
+Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
+---
+ src/crypt.c | 3 ++-
+ src/testdir/test_crypt.vim | 24 ++++++++++++++++++++++++
+ src/version.c | 2 ++
+ 3 files changed, 28 insertions(+), 1 deletion(-)
+
+diff --git a/src/crypt.c b/src/crypt.c
+index 2fade5db9d..879ecbf6ce 100644
+--- a/src/crypt.c
++++ b/src/crypt.c
+@@ -1262,7 +1262,8 @@ crypt_sodium_buffer_decode(
+
+ if (sod_st->count == 0)
+ {
+- if (crypto_secretstream_xchacha20poly1305_init_pull(&sod_st->state,
++ if (len < crypto_secretstream_xchacha20poly1305_HEADERBYTES ||
++ crypto_secretstream_xchacha20poly1305_init_pull(&sod_st->state,
+ from, sod_st->key) != 0)
+ {
+ emsg(_(e_libsodium_decryption_failed_header_incomplete));
+diff --git a/src/testdir/test_crypt.vim b/src/testdir/test_crypt.vim
+index d540fbbd62..5c9dfe3baf 100644
+--- a/src/testdir/test_crypt.vim
++++ b/src/testdir/test_crypt.vim
+@@ -491,4 +491,28 @@ func Test_crypt_off_by_one()
+ bwipe!
+ endfunc
+
++func Test_crypt_sodium_short_body()
++ CheckFeature sodium
++ " A VimCrypt~04! file with a complete 36-byte header (12 magic + 16 salt +
++ " 8 seed) but a body shorter than one secretstream header (24 bytes) used to
++ " underflow the body length and crash with a wild out-of-bounds read in
++ " crypto_secretstream_xchacha20poly1305_pull(). It must now fail cleanly.
++ " Bytes: "VimCrypt~04!" + 16 salt + 8 seed + 8-byte body = 44 bytes.
++ call writefile(0z56696D43727970747E303421
++ \ + 0zA0A1A2A3A4A5A6A7A8A9AAABACADAEAF
++ \ + 0zB0B1B2B3B4B5B6B7
++ \ + 0z0000000000000000, 'Xtest_sodium_short')
++
++ let v:errmsg = ''
++ try
++ call feedkeys(":split Xtest_sodium_short\<CR>foobar\<CR>", "xt")
++ catch /^Vim\%((\S\+)\)\=:E1198:/
++ " no-op
++ endtry
++
++ bwipe!
++ call delete('Xtest_sodium_short')
++ set key=
++endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+diff --git a/src/version.c b/src/version.c
+index b40bd9be93..6eac3fc927 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 */
++/**/
++ 671,
+ /**/
+ 662,
+ /**/
+--
+2.34.1
+
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
index f423e4d5cb..20a5f7a054 100644
--- a/meta/recipes-support/vim/vim.inc
+++ b/meta/recipes-support/vim/vim.inc
@@ -28,6 +28,7 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https;tag=v${PV}
file://CVE-2026-47162.patch \
file://CVE-2026-47167.patch \
file://CVE-2026-55892.patch \
+ file://CVE-2026-57452.patch \
"
PV .= ".0340"
--
2.34.1
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 ` [OE-core][wrynose][PATCHv2 2/6] vim: Security Fix for CVE-2026-43961 Siddharth
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 ` Siddharth [this message]
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-6-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.