Skip to content

Commit 6675e17

Browse files
Patch emacs for CVE-2026-6861
1 parent 37923f6 commit 6675e17

2 files changed

Lines changed: 33 additions & 1 deletion

File tree

SPECS/emacs/CVE-2026-6861.patch

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From bf29cc85ce8cc77c0392887020f55d73bb0e0d18 Mon Sep 17 00:00:00 2001
2+
From: Eli Zaretskii <eliz@gnu.org>
3+
Date: Sat, 18 Apr 2026 10:35:05 +0300
4+
Subject: [PATCH] * src/image.c (svg_load_image): Fix off-by-one mistake
5+
(bug#80851).
6+
7+
Signed-off-by: Azure Linux Security Servicing Account <azurelinux-security@microsoft.com>
8+
Upstream-reference: https://cgit.git.savannah.gnu.org/cgit/emacs.git/patch/?id=8f535370b9efbc91673b20c6987a5cae4f6dc562
9+
---
10+
src/image.c | 2 +-
11+
1 file changed, 1 insertion(+), 1 deletion(-)
12+
13+
diff --git a/src/image.c b/src/image.c
14+
index 911dfc4..15e68d7 100644
15+
--- a/src/image.c
16+
+++ b/src/image.c
17+
@@ -11247,7 +11247,7 @@ svg_load_image (struct frame *f, struct image *img, char *contents,
18+
{
19+
css = xmalloc (SBYTES (lcss) + 1);
20+
strncpy (css, SSDATA (lcss), SBYTES (lcss));
21+
- *(css + SBYTES (lcss) + 1) = 0;
22+
+ *(css + SBYTES (lcss)) = 0;
23+
}
24+
#endif
25+
26+
--
27+
2.45.4
28+

SPECS/emacs/emacs.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: GNU Emacs text editor
22
Name: emacs
33
Version: 29.4
4-
Release: 3%{?dist}
4+
Release: 4%{?dist}
55
License: GPLv3+ AND CC0-1.0
66
Vendor: Microsoft Corporation
77
Distribution: Azure Linux
@@ -12,6 +12,7 @@ Source1: site-start.el
1212
Source2: default.el
1313
Patch0: CVE-2025-1244.patch
1414
Patch1: CVE-2024-53920.patch
15+
Patch2: CVE-2026-6861.patch
1516
BuildRequires: gcc
1617
BuildRequires: glibc-devel
1718
BuildRequires: gnutls-devel
@@ -130,6 +131,9 @@ rm -f *-filelist {common,el}-*-files
130131
%dir %{_datadir}/emacs/site-lisp/site-start.d
131132

132133
%changelog
134+
* Wed Apr 29 2026 Azure Linux Security Servicing Account <azurelinux-security@microsoft.com> - 29.4-4
135+
- Patch for CVE-2026-6861
136+
133137
* Mon Mar 17 2025 Henry Li <lihl@microsoft.com> - 29.4-3
134138
- Add patch to resolve CVE-2024-53920
135139

0 commit comments

Comments
 (0)