Skip to content

Commit

Permalink
[Medium] patch vim to fix CVE-2025-24014 (#12057)
Browse files Browse the repository at this point in the history
  • Loading branch information
jykanase authored Jan 27, 2025
1 parent 2096fc2 commit 67a5571
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
35 changes: 35 additions & 0 deletions SPECS/vim/CVE-2025-24014.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From a37c69c15cc3ea6b2e67336748a578d2c2c549db Mon Sep 17 00:00:00 2001
From: jykanase <[email protected]>
Date: Thu, 23 Jan 2025 09:19:12 +0000
Subject: [PATCH] CVE-CVE-2025-24014

Source Link : https://github.com/vim/vim/commit/9d1bed5eccdbb46a26b8a484f5e9163c40e63919
---
src/gui.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gui.c b/src/gui.c
index 8e7b079..86c40de 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -4478,13 +4478,15 @@ gui_do_scroll(void)
/*
* Don't call updateWindow() when nothing has changed (it will overwrite
* the status line!).
+ *
+ * Check for ScreenLines, because in ex-mode, we don't have a valid display.
*/
- if (old_topline != wp->w_topline
+ if (ScreenLines != NULL && (old_topline != wp->w_topline
|| wp->w_redr_type != 0
#ifdef FEAT_DIFF
|| old_topfill != wp->w_topfill
#endif
- )
+ ))
{
int type = UPD_VALID;

--
2.45.2

6 changes: 5 additions & 1 deletion SPECS/vim/vim.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
Summary: Text editor
Name: vim
Version: 9.1.0791
Release: 2%{?dist}
Release: 3%{?dist}
License: Vim
Vendor: Microsoft Corporation
Distribution: Mariner
Group: Applications/Editors
URL: https://www.vim.org
Source0: https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: CVE-2025-22134.patch
Patch1: CVE-2025-24014.patch

BuildRequires: ncurses-devel
BuildRequires: python3-devel
Expand Down Expand Up @@ -200,6 +201,9 @@ fi
%{_bindir}/vimdiff

%changelog
* Thu Jan 23 2025 Jyoti Kanase <[email protected]> - 9.1.0791-3
- Patch to fix CVE-2025-24014.

* Thu Jan 16 2025 Bhagyashri Pathak <[email protected]> - 9.1.0791-2
- Patch for fixing CVE-2025-22134

Expand Down

0 comments on commit 67a5571

Please sign in to comment.