summaryrefslogtreecommitdiff
path: root/editors/emacs24
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2014-07-02 09:08:36 +0000
committertaca <taca@pkgsrc.org>2014-07-02 09:08:36 +0000
commitf1fce63a2a4565aa3fb7f4e90635388b4eeaa28d (patch)
tree96a7844b2e5bfe003a8804d7c4d666a584267284 /editors/emacs24
parent4c47c82cccd4a292c35e981f67c1e3a78b6d7336 (diff)
downloadpkgsrc-f1fce63a2a4565aa3fb7f4e90635388b4eeaa28d.tar.gz
Add fix for CVE-2014-3421, CVE-2014-3422 and CVE-2014-3424.
Bump PKGREVISION.
Diffstat (limited to 'editors/emacs24')
-rw-r--r--editors/emacs24/Makefile4
-rw-r--r--editors/emacs24/distinfo5
-rw-r--r--editors/emacs24/patches/patch-lisp_emacs-lisp_find-gc.el120
-rw-r--r--editors/emacs24/patches/patch-lisp_gnus_gnus-fun.el32
-rw-r--r--editors/emacs24/patches/patch-lisp_net_tramp-sh.el71
5 files changed, 229 insertions, 3 deletions
diff --git a/editors/emacs24/Makefile b/editors/emacs24/Makefile
index acce2ee6541..1a36d11238f 100644
--- a/editors/emacs24/Makefile
+++ b/editors/emacs24/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.27 2014/05/31 15:56:26 wiz Exp $
+# $NetBSD: Makefile,v 1.28 2014/07/02 09:08:36 taca Exp $
CONFLICTS+= emacs24-nox11-[0-9]*
-PKGREVISION= 13
+PKGREVISION= 14
.include "../../editors/emacs24/Makefile.common"
diff --git a/editors/emacs24/distinfo b/editors/emacs24/distinfo
index cafab3ee724..c19926c2ea1 100644
--- a/editors/emacs24/distinfo
+++ b/editors/emacs24/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2014/05/16 09:08:57 tron Exp $
+$NetBSD: distinfo,v 1.13 2014/07/02 09:08:36 taca Exp $
SHA1 (emacs-24.3.tar.gz) = 3c672a176df06e20d2661058ad49893f184b4956
RMD160 (emacs-24.3.tar.gz) = b67e847861002bbb76ae6588ff659408763313cf
@@ -8,4 +8,7 @@ SHA1 (patch-ab) = 3d6c52d2e9ae934d955ae5bea0ef346d9fa428b9
SHA1 (patch-ad) = 2dcb0f4b43c599d0c4af83b5f7e1f2797f96bdac
SHA1 (patch-ag) = 407d34e97356c2e8bee26f0fd90f116dd194afcb
SHA1 (patch-lib-careadlinkat.h) = f236d182e609bf7111c70e83e10806a75a220c29
+SHA1 (patch-lisp_emacs-lisp_find-gc.el) = e1264cd01c67d590e3ca5fa5d3dd55698e1e6de5
+SHA1 (patch-lisp_gnus_gnus-fun.el) = 19fabb133565ab2530eeb488d3383eabfb7748cc
+SHA1 (patch-lisp_net_tramp-sh.el) = e5f5fc41a083ee906c3e56cfdfdbeb491402a5c7
SHA1 (patch-src_image.c) = 5b98fbfd012437674533556229ee747000175dfa
diff --git a/editors/emacs24/patches/patch-lisp_emacs-lisp_find-gc.el b/editors/emacs24/patches/patch-lisp_emacs-lisp_find-gc.el
new file mode 100644
index 00000000000..fc4a7edba62
--- /dev/null
+++ b/editors/emacs24/patches/patch-lisp_emacs-lisp_find-gc.el
@@ -0,0 +1,120 @@
+$NetBSD: patch-lisp_emacs-lisp_find-gc.el,v 1.1 2014/07/02 09:08:36 taca Exp $
+
+Fix for CVE-2014-3422.
+
+--- lisp/emacs-lisp/find-gc.el.orig 2013-01-01 20:37:17.000000000 +0000
++++ lisp/emacs-lisp/find-gc.el
+@@ -23,14 +23,15 @@
+
+ ;; Produce in find-gc-unsafe-list the set of all functions that may invoke GC.
+ ;; This expects the Emacs sources to live in find-gc-source-directory.
+-;; It creates a temporary working directory /tmp/esrc.
+
+ ;;; Code:
+
+ (defvar find-gc-unsafe-list nil
+ "The list of unsafe functions is placed here by `find-gc-unsafe'.")
+
+-(defvar find-gc-source-directory)
++(defvar find-gc-source-directory
++ (file-name-as-directory (expand-file-name "src" source-directory))
++ "Directory containing Emacs C sources.")
+
+ (defvar find-gc-subrs-callers nil
+ "Alist of users of subrs, from GC testing.
+@@ -59,14 +60,14 @@ Each entry has the form (FUNCTION . FUNC
+ "indent.c" "search.c" "regex.c" "undo.c"
+ "alloc.c" "data.c" "doc.c" "editfns.c"
+ "callint.c" "eval.c" "fns.c" "print.c" "lread.c"
+- "abbrev.c" "syntax.c" "unexcoff.c"
++ "syntax.c" "unexcoff.c"
+ "bytecode.c" "process.c" "callproc.c" "doprnt.c"
+- "x11term.c" "x11fns.c"))
++ "xterm.c" "xfns.c"))
+
+
+ (defun find-gc-unsafe ()
+ "Return a list of unsafe functions--that is, which can call GC.
+-Also store it in `find-gc-unsafe'."
++Also store it in `find-gc-unsafe-list'."
+ (trace-call-tree nil)
+ (trace-use-tree)
+ (find-unsafe-funcs 'Fgarbage_collect)
+@@ -102,47 +103,38 @@ Also store it in `find-gc-unsafe'."
+
+
+
+-(defun trace-call-tree (&optional already-setup)
++(defun trace-call-tree (&optional ignored)
+ (message "Setting up directories...")
+- (or already-setup
+- (progn
+- ;; Gee, wouldn't a built-in "system" function be handy here.
+- (call-process "csh" nil nil nil "-c" "rm -rf /tmp/esrc")
+- (call-process "csh" nil nil nil "-c" "mkdir /tmp/esrc")
+- (call-process "csh" nil nil nil "-c"
+- (format "ln -s %s/*.[ch] /tmp/esrc"
+- find-gc-source-directory))))
+- (with-current-buffer (get-buffer-create "*Trace Call Tree*")
+- (setq find-gc-subrs-called nil)
+- (let ((case-fold-search nil)
+- (files find-gc-source-files)
+- name entry)
+- (while files
+- (message "Compiling %s..." (car files))
+- (call-process "csh" nil nil nil "-c"
+- (format "gcc -dr -c /tmp/esrc/%s -o /dev/null"
+- (car files)))
+- (erase-buffer)
+- (insert-file-contents (concat "/tmp/esrc/" (car files) ".rtl"))
+- (while (re-search-forward ";; Function \\|(call_insn " nil t)
+- (if (= (char-after (- (point) 3)) ?o)
+- (progn
+- (looking-at "[a-zA-Z0-9_]+")
+- (setq name (intern (buffer-substring (match-beginning 0)
+- (match-end 0))))
+- (message "%s : %s" (car files) name)
+- (setq entry (list name)
+- find-gc-subrs-called (cons entry find-gc-subrs-called)))
+- (if (looking-at ".*\n?.*\"\\([A-Za-z0-9_]+\\)\"")
++ (setq find-gc-subrs-called nil)
++ (let ((case-fold-search nil)
++ (default-directory find-gc-source-directory)
++ (files find-gc-source-files)
++ name entry rtlfile)
++ (dolist (file files)
++ (message "Compiling %s..." file)
++ (call-process "gcc" nil nil nil "-I" "." "-I" "../lib"
++ "-fdump-rtl-expand" "-o" null-device "-c" file)
++ (setq rtlfile
++ (file-expand-wildcards (format "%s.*.expand" file) t))
++ (if (/= 1 (length rtlfile))
++ (message "Error compiling `%s'?" file)
++ (with-temp-buffer
++ (insert-file-contents (setq rtlfile (car rtlfile)))
++ (delete-file rtlfile)
++ (while (re-search-forward ";; Function \\|(call_insn " nil t)
++ (if (= (char-after (- (point) 3)) ?o)
+ (progn
+- (setq name (intern (buffer-substring (match-beginning 1)
+- (match-end 1))))
+- (or (memq name (cdr entry))
+- (setcdr entry (cons name (cdr entry))))))))
+- (delete-file (concat "/tmp/esrc/" (car files) ".rtl"))
+- (setq files (cdr files)))))
+-)
+-
++ (looking-at "[a-zA-Z0-9_]+")
++ (setq name (intern (match-string 0)))
++ (message "%s : %s" (car files) name)
++ (setq entry (list name)
++ find-gc-subrs-called
++ (cons entry find-gc-subrs-called)))
++ (if (looking-at ".*\n?.*\"\\([A-Za-z0-9_]+\\)\"")
++ (progn
++ (setq name (intern (match-string 1)))
++ (or (memq name (cdr entry))
++ (setcdr entry (cons name (cdr entry)))))))))))))
+
+ (defun trace-use-tree ()
+ (setq find-gc-subrs-callers (mapcar 'list (mapcar 'car find-gc-subrs-called)))
diff --git a/editors/emacs24/patches/patch-lisp_gnus_gnus-fun.el b/editors/emacs24/patches/patch-lisp_gnus_gnus-fun.el
new file mode 100644
index 00000000000..804b4b34f98
--- /dev/null
+++ b/editors/emacs24/patches/patch-lisp_gnus_gnus-fun.el
@@ -0,0 +1,32 @@
+$NetBSD: patch-lisp_gnus_gnus-fun.el,v 1.1 2014/07/02 09:08:36 taca Exp $
+
+Fix for CVE-2014-3421.
+
+--- lisp/gnus/gnus-fun.el.orig 2013-01-01 20:37:17.000000000 +0000
++++ lisp/gnus/gnus-fun.el
+@@ -251,19 +251,21 @@ colors of the displayed X-Faces."
+ (shell-command "xawtv-remote snap ppm")
+ (let ((file nil)
+ result)
++ (tempfile (make-temp-file "gnus-face-" nil ".ppm"))
+ (while (null (setq file (directory-files "/tftpboot/sparky/tmp"
+ t "snap.*ppm")))
+ (sleep-for 1))
+ (setq file (car file))
+ (shell-command
+- (format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | pnmscale -width 48 -height 48 | ppmtopgm > /tmp/gnus.face.ppm"
+- file))
++ (format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | pnmscale
++-width 48 -height 48 | ppmtopgm >> %s"
++ file tempfile))
+ (let ((gnus-convert-image-to-face-command
+ (format "cat '%%s' | ppmquant %%d | ppmchange %s | pnmtopng"
+ (gnus-fun-ppm-change-string))))
+- (setq result (gnus-face-from-file "/tmp/gnus.face.ppm")))
++ (setq result (gnus-face-from-file tempfile)))
+ (delete-file file)
+- ;;(delete-file "/tmp/gnus.face.ppm")
++ ;;(delete-file tempfile) ; FIXME why are we not deleting it?!
+ result))
+
+ (defun gnus-fun-ppm-change-string ()
diff --git a/editors/emacs24/patches/patch-lisp_net_tramp-sh.el b/editors/emacs24/patches/patch-lisp_net_tramp-sh.el
new file mode 100644
index 00000000000..d04ab785643
--- /dev/null
+++ b/editors/emacs24/patches/patch-lisp_net_tramp-sh.el
@@ -0,0 +1,71 @@
+$NetBSD: patch-lisp_net_tramp-sh.el,v 1.1 2014/07/02 09:08:36 taca Exp $
+
+Fix for CVE-2014-3424.
+
+--- lisp/net/tramp-sh.el.orig 2013-02-18 19:49:26.000000000 +0000
++++ lisp/net/tramp-sh.el
+@@ -605,9 +605,9 @@ This list is used for copying/renaming w
+ See `tramp-actions-before-shell' for more info.")
+
+ (defconst tramp-uudecode
+- "(echo begin 600 /tmp/tramp.$$; tail +2) | uudecode
+-cat /tmp/tramp.$$
+-rm -f /tmp/tramp.$$"
++ "(echo begin 600 %t; tail -n +2) | uudecode
++cat %t
++rm -f %t"
+ "Shell function to implement `uudecode' to standard output.
+ Many systems support `uudecode -o /dev/stdout' or `uudecode -o -'
+ for this or `uudecode -p', but some systems don't, and for them
+@@ -3938,7 +3938,7 @@ Each item is a list that looks like this
+
+ \(FORMAT ENCODING DECODING [TEST]\)
+
+-FORMAT is symbol describing the encoding/decoding format. It can be
++FORMAT is a symbol describing the encoding/decoding format. It can be
+ `b64' for base64 encoding, `uu' for uu encoding, or `pack' for simple packing.
+
+ ENCODING and DECODING can be strings, giving commands, or symbols,
+@@ -3948,9 +3948,11 @@ filename will be put into the command li
+ specifier is not present, the input should be read from standard
+ input.
+
+-If they are variables, this variable is a string containing a Perl
+-implementation for this functionality. This Perl program will be transferred
+-to the remote host, and it is available as shell function with the same name.
++If they are variables, this variable is a string containing a
++Perl or Shell implementation for this functionality. This
++program will be transferred to the remote host, and it is
++available as shell function with the same name. A \"%t\" format
++specifier in the variable value denotes a temporary file.
+
+ The optional TEST command can be used for further tests, whether
+ ENCODING and DECODING are applicable.")
+@@ -4025,10 +4027,25 @@ Goes through the list `tramp-local-codin
+ (throw 'wont-work-remote nil))
+
+ (when (not (stringp rem-dec))
+- (let ((name (symbol-name rem-dec)))
++ (let ((name (symbol-name rem-dec))
++ (value (symbol-value rem-dec))
++ tmpfile)
+ (while (string-match (regexp-quote "-") name)
+ (setq name (replace-match "_" nil t name)))
+- (tramp-maybe-send-script vec (symbol-value rem-dec) name)
++ (when (string-match "%t" value)
++ (setq tmpfile
++ (make-temp-name
++ (expand-file-name
++ tramp-temp-name-prefix
++ (tramp-get-remote-tmpdir vec)))
++ value
++ (format-spec
++ value
++ (format-spec-make
++ ?t
++ (tramp-file-name-handler
++ 'file-remote-p tmpfile 'localname)))))
++ (tramp-maybe-send-script vec value name)
+ (setq rem-dec name)))
+ (tramp-message
+ vec 5