Browse code

zsh : Fix CVE-2018-7549

Change-Id: I11bd7d27d997706b9ecba69356a76c49c95964f2
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5013
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>

Xiaolin Li authored on 2018/04/18 05:37:41
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,20 @@
0
+--- a/Src/params.c
1
+@@ -549,10 +549,13 @@
2
+ HashTable
3
+ copyparamtable(HashTable ht, char *name)
4
+ {
5
+-    HashTable nht = newparamtable(ht->hsize, name);
6
+-    outtable = nht;
7
+-    scanhashtable(ht, 0, 0, 0, scancopyparams, 0);
8
+-    outtable = NULL;
9
++    HashTable nht = 0;
10
++    if (ht) {
11
++	nht = newparamtable(ht->hsize, name);
12
++	outtable = nht;
13
++	scanhashtable(ht, 0, 0, 0, scancopyparams, 0);
14
++	outtable = NULL;
15
++    }
16
+     return nht;
17
+ }
18
+ 
0 19
\ No newline at end of file
... ...
@@ -3,7 +3,7 @@
3 3
 Summary:      Z shell
4 4
 Name:         zsh
5 5
 Version:      5.3.1
6
-Release:      5%{?dist}
6
+Release:      6%{?dist}
7 7
 License:      MIT
8 8
 URL:          http://zsh.sourceforge.net/
9 9
 Group:        System Environment/Shells
... ...
@@ -14,6 +14,7 @@ Source0:      http://www.zsh.org/pub/%{name}-%{version}.tar.xz
14 14
 Source1:      zprofile.rhs
15 15
 Source2:      zshrc
16 16
 Patch0:       zsh-CVE-2018-7548.patch
17
+Patch1:       zsh-CVE-2018-7549.patch
17 18
 
18 19
 BuildRequires: coreutils
19 20
 BuildRequires: tar
... ...
@@ -60,6 +61,7 @@ This package contains the Zsh manual in html format.
60 60
 
61 61
 %setup -q
62 62
 %patch0 -p1
63
+%patch1 -p1
63 64
 
64 65
 %build
65 66
 # make loading of module's dependencies work again (#1277996)
... ...
@@ -146,6 +148,8 @@ fi
146 146
 %doc Doc/*.html
147 147
 
148 148
 %changelog
149
+*   Tue Apr 17 2018 Xiaolin Li <xiaolinl@vmware.com> 5.3.1-6
150
+-   Fix CVE-2018-7549
149 151
 *   Mon Mar 19 2018 Xiaolin Li <xiaolinl@vmware.com> 5.3.1-5
150 152
 -   Fix CVE-2018-7548
151 153
 *   Mon Sep 18 2017 Alexey Makhalov <amakhalov@vmware.com> 5.3.1-4