fix CVE-2023-28617
This commit is contained in:
parent
b49f903c6b
commit
f2344182df
46
backport-CVE-2023-28617.patch
Normal file
46
backport-CVE-2023-28617.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
From a8006ea580ed74f27f974d60b598143b04ad1741 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Xi Lu <lx@shellcodes.org>
|
||||||
|
Date: Sat, 11 Mar 2023 18:53:37 +0800
|
||||||
|
Subject: * lisp/ob-latex.el: Fix command injection vulnerability
|
||||||
|
|
||||||
|
(org-babel-execute:latex):
|
||||||
|
Replaced the `(shell-command "mv BAR NEWBAR")' with `rename-file'.
|
||||||
|
|
||||||
|
TINYCHANGE
|
||||||
|
|
||||||
|
Reference:https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a8006ea580ed74f27f974d60b598143b04ad1741
|
||||||
|
Conflict:NA
|
||||||
|
|
||||||
|
---
|
||||||
|
lisp/org/ob-latex.el | 13 +++++--------
|
||||||
|
1 file changed, 5 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lisp/org/ob-latex.el b/lisp/org/ob-latex.el
|
||||||
|
index a2c24b3..ce39628 100644
|
||||||
|
--- a/lisp/org/ob-latex.el
|
||||||
|
+++ b/lisp/org/ob-latex.el
|
||||||
|
@@ -218,17 +218,14 @@ This function is called by `org-babel-execute-src-block'."
|
||||||
|
(if (string-suffix-p ".svg" out-file)
|
||||||
|
(progn
|
||||||
|
(shell-command "pwd")
|
||||||
|
- (shell-command (format "mv %s %s"
|
||||||
|
- (concat (file-name-sans-extension tex-file) "-1.svg")
|
||||||
|
- out-file)))
|
||||||
|
+ (rename-file (concat (file-name-sans-extension tex-file) "-1.svg")
|
||||||
|
+ out-file t))
|
||||||
|
(error "SVG file produced but HTML file requested")))
|
||||||
|
((file-exists-p (concat (file-name-sans-extension tex-file) ".html"))
|
||||||
|
(if (string-suffix-p ".html" out-file)
|
||||||
|
- (shell-command "mv %s %s"
|
||||||
|
- (concat (file-name-sans-extension tex-file)
|
||||||
|
- ".html")
|
||||||
|
- out-file)
|
||||||
|
- (error "HTML file produced but SVG file requested")))))
|
||||||
|
+ (rename-file (concat (file-name-sans-extension tex-file) ".html")
|
||||||
|
+ out-file t)
|
||||||
|
+ (error "HTML file produced but SVG file requested")))))
|
||||||
|
((or (string= "pdf" extension) imagemagick)
|
||||||
|
(with-temp-file tex-file
|
||||||
|
(require 'ox-latex)
|
||||||
|
--
|
||||||
|
cgit v1.1
|
||||||
@ -8,7 +8,7 @@
|
|||||||
Name: emacs
|
Name: emacs
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 27.2
|
Version: 27.2
|
||||||
Release: 9
|
Release: 10
|
||||||
Summary: An extensible GNU text editor
|
Summary: An extensible GNU text editor
|
||||||
License: GPLv3+ and CC0-1.0
|
License: GPLv3+ and CC0-1.0
|
||||||
URL: http://www.gnu.org/software/emacs
|
URL: http://www.gnu.org/software/emacs
|
||||||
@ -29,6 +29,7 @@ Patch6004: backport-CVE-2022-45939.patch
|
|||||||
Patch6005: backport-CVE-2022-48337.patch
|
Patch6005: backport-CVE-2022-48337.patch
|
||||||
Patch6006: backport-CVE-2022-48338.patch
|
Patch6006: backport-CVE-2022-48338.patch
|
||||||
Patch6007: backport-CVE-2022-48339.patch
|
Patch6007: backport-CVE-2022-48339.patch
|
||||||
|
Patch6008: backport-CVE-2023-28617.patch
|
||||||
Patch9000: emacs-deal-taboo-words.patch
|
Patch9000: emacs-deal-taboo-words.patch
|
||||||
|
|
||||||
BuildRequires: gcc atk-devel cairo-devel freetype-devel fontconfig-devel dbus-devel giflib-devel
|
BuildRequires: gcc atk-devel cairo-devel freetype-devel fontconfig-devel dbus-devel giflib-devel
|
||||||
@ -411,6 +412,9 @@ fi
|
|||||||
%{_mandir}/*/*
|
%{_mandir}/*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Mar 24 2023 zhangpan <zhangpan103@h-partners.com> - 1:27.2-10
|
||||||
|
- fix CVE-2023-28617
|
||||||
|
|
||||||
* Thu Feb 23 2023 zhangpan <zhangpan103@h-partners.com> - 1:27.2-9
|
* Thu Feb 23 2023 zhangpan <zhangpan103@h-partners.com> - 1:27.2-9
|
||||||
- fix CVE-2022-48337 CVE-2022-48338 CVE-2022-48339
|
- fix CVE-2022-48337 CVE-2022-48338 CVE-2022-48339
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user