Skip to content

Commit 0ad1b22

Browse files
committed
Merge branch 'main' into 2.0
2 parents e592ed6 + 5591826 commit 0ad1b22

6 files changed

Lines changed: 440 additions & 3 deletions

File tree

SPECS/emacs/CVE-2025-1244.patch

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
From 820f0793f0b46448928905552726c1f1b999062f Mon Sep 17 00:00:00 2001
2+
From: Xi Lu <lx@shellcodes.org>
3+
Date: Tue, 10 Oct 2023 22:20:05 +0800
4+
Subject: [PATCH] Fix man.el shell injection vulnerability
5+
6+
* lisp/man.el (Man-translate-references): Fix shell injection
7+
vulnerability. (Bug#66390)
8+
* test/lisp/man-tests.el (man-tests-Man-translate-references): New
9+
test.
10+
---
11+
lisp/man.el | 6 +++++-
12+
test/lisp/man-tests.el | 12 ++++++++++++
13+
2 files changed, 17 insertions(+), 1 deletion(-)
14+
15+
diff --git a/lisp/man.el b/lisp/man.el
16+
index 55cb9383bec1..d96396483d39 100644
17+
--- a/lisp/man.el
18+
+++ b/lisp/man.el
19+
@@ -761,7 +761,11 @@ and the `Man-section-translations-alist' variables)."
20+
(setq name (match-string 2 ref)
21+
section (match-string 1 ref))))
22+
(if (string= name "")
23+
- ref ; Return the reference as is
24+
+ ;; see Bug#66390
25+
+ (mapconcat 'identity
26+
+ (mapcar #'shell-quote-argument
27+
+ (split-string ref "\\s-+"))
28+
+ " ") ; Return the reference as is
29+
(if Man-downcase-section-letters-flag
30+
(setq section (downcase section)))
31+
(while slist
32+
diff --git a/test/lisp/man-tests.el b/test/lisp/man-tests.el
33+
index 140482ee6222..11f5f805e43f 100644
34+
--- a/test/lisp/man-tests.el
35+
+++ b/test/lisp/man-tests.el
36+
@@ -161,6 +161,18 @@ DESCRIPTION
37+
(let ((button (button-at (match-beginning 0))))
38+
(should (and button (eq 'Man-xref-header-file (button-type button))))))))))
39+
40+
+(ert-deftest man-tests-Man-translate-references ()
41+
+ (should (equal (Man-translate-references "basename")
42+
+ "basename"))
43+
+ (should (equal (Man-translate-references "basename(3)")
44+
+ "3 basename"))
45+
+ (should (equal (Man-translate-references "basename(3v)")
46+
+ "3v basename"))
47+
+ (should (equal (Man-translate-references ";id")
48+
+ "\\;id"))
49+
+ (should (equal (Man-translate-references "-k basename")
50+
+ "-k basename")))
51+
+
52+
(provide 'man-tests)
53+
54+
;;; man-tests.el ends here

SPECS/emacs/emacs.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
Summary: GNU Emacs text editor
22
Name: emacs
33
Version: 29.4
4-
Release: 1%{?dist}
4+
Release: 2%{?dist}
55
License: GPLv3+ AND CC0-1.0
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
88
Group: Applications/Editors
99
URL: https://www.gnu.org/software/emacs/
1010
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
11+
Patch0: CVE-2025-1244.patch
1112
BuildRequires: gcc
1213
BuildRequires: glibc-devel
1314
BuildRequires: gnutls-devel
@@ -84,6 +85,9 @@ mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/site-start.d
8485
%dir %{_datadir}/emacs/site-lisp/site-start.d
8586

8687
%changelog
88+
* Sun Feb 16 2025 Kanishk Bansal <kanbansal@microsoft.com> - 29.4-2
89+
- Apply upstream patch to fix CVE-2025-1244
90+
8791
* Mon Jul 01 2024 Sharath Srikanth Chellappa <sharathsr@microsoft.com> - 29.4-1
8892
- Upgrade to 29.4 to fix CVE-2024-39331.
8993

SPECS/grpc/CVE-2024-25629.patch

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
From 664fc964bf2dac86c3adbedb5d9d9e0e46d1c79d Mon Sep 17 00:00:00 2001
2+
From: Sreenivasulu Malavathula <v-smalavathu@microsoft.com>
3+
Date: Sun, 9 Feb 2025 12:50:08 -0600
4+
Subject: [PATCH] Address CVE-2024-25629
5+
6+
---
7+
third_party/cares/cares/ares__read_line.c | 8 ++++++++
8+
1 file changed, 8 insertions(+)
9+
10+
diff --git a/third_party/cares/cares/ares__read_line.c b/third_party/cares/cares/ares__read_line.c
11+
index c62ad2a2..d6625a38 100644
12+
--- a/third_party/cares/cares/ares__read_line.c
13+
+++ b/third_party/cares/cares/ares__read_line.c
14+
@@ -49,6 +49,14 @@ int ares__read_line(FILE *fp, char **buf, size_t *bufsize)
15+
if (!fgets(*buf + offset, bytestoread, fp))
16+
return (offset != 0) ? 0 : (ferror(fp)) ? ARES_EFILE : ARES_EOF;
17+
len = offset + strlen(*buf + offset);
18+
+
19+
+ /* Probably means there was an embedded NULL as the first character in
20+
+ * the line, throw away line */
21+
+ if (len == 0) {
22+
+ offset = 0;
23+
+ continue;
24+
+ }
25+
+
26+
if ((*buf)[len - 1] == '\n')
27+
{
28+
(*buf)[len - 1] = 0;
29+
--
30+
2.45.2
31+

SPECS/grpc/grpc.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: Open source remote procedure call (RPC) framework
22
Name: grpc
33
Version: 1.42.0
4-
Release: 8%{?dist}
4+
Release: 9%{?dist}
55
License: ASL 2.0
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
@@ -11,6 +11,7 @@ Source0: https://github.com/grpc/grpc/archive/v%{version}/%{name}-%{versi
1111
Source1: %{name}-%{version}-submodules.tar.gz
1212

1313
Patch0: CVE-2023-32067.patch
14+
Patch1: CVE-2024-25629.patch
1415
BuildRequires: abseil-cpp-devel
1516
BuildRequires: c-ares-devel
1617
BuildRequires: cmake
@@ -151,6 +152,9 @@ export GRPC_PYTHON_BUILD_SYSTEM_ABSL=True
151152

152153

153154
%changelog
155+
* Wed Feb 12 2025 Sreeniavsulu Malavathula <v-smalavathu@microsoft.com> - 1.42.0-9
156+
- Patch to fix CVE-2024-25629.patch in the grpc submodules package
157+
154158
* Mon Dec 10 2024 Ankita Pareek <ankitapareek@microsoft.com> - 1.42.0-8
155159
- Address CVE-2023-32067 in the grpc submodules package
156160

0 commit comments

Comments
 (0)