Browse code

Fix systemd link disable nullptr access

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

Vinay Kulkarni authored on 2017/11/08 05:40:38
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+diff -uNr systemd-228-orig/src/network/networkd-link.c systemd-228-fix/src/network/networkd-link.c
1
+--- systemd-228-orig/src/network/networkd-link.c	2017-11-07 11:07:43.366280859 -0800
2
+@@ -147,8 +147,10 @@
3
+         p = strjoina("/proc/sys/net/ipv6/conf/", link->ifname, "/disable_ipv6");
4
+         _cleanup_free_ char *val = NULL;
5
+         r = read_one_line_file(p, &val);
6
+-        if (r < 0)
7
++        if (r < 0) {
8
+                 log_link_warning_errno(link, r, "Cannot read ipv6 state for interface: %m");
9
++                return false;
10
++        }
11
+ 	if (streq(val, "0"))
12
+                 return false;
13
+         
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:          Systemd-228
2 2
 Name:             systemd
3 3
 Version:          228
4
-Release:          41%{?dist}
4
+Release:          42%{?dist}
5 5
 License:          LGPLv2+ and GPLv2+ and MIT
6 6
 URL:              http://www.freedesktop.org/wiki/Software/systemd/
7 7
 Group:            System Environment/Security
... ...
@@ -41,6 +41,7 @@ Patch24:          systemd-228-CVE-2017-9445-dns-oob.patch
41 41
 Patch25:          systemd-228-logind-disconnect.patch
42 42
 Patch26:          systemd-228-CVE-2015-7510-long-machinename.patch
43 43
 Patch27:          systemd-228-resolved-null-deferencing-fix.patch
44
+Patch28:          systemd-228-link-disabled-nullptr-fix.patch
44 45
 Requires:         Linux-PAM
45 46
 Requires:         libcap
46 47
 Requires:         xz
... ...
@@ -102,6 +103,7 @@ sed -i "s:blkid/::" $(grep -rl "blkid/blkid.h")
102 102
 %patch25 -p1
103 103
 %patch26 -p1
104 104
 %patch27 -p1
105
+%patch28 -p1
105 106
 sed -i "s#\#DefaultTasksMax=512#DefaultTasksMax=infinity#g" src/core/system.conf
106 107
 
107 108
 %build
... ...
@@ -241,6 +243,8 @@ rm -rf %{buildroot}/*
241 241
 
242 242
 
243 243
 %changelog
244
+*    Tue Nov 07 2017 Vinay Kulkarni <kulkarniv@vmware.com>  228-42
245
+-    Fix nullptr access during link disable.
244 246
 *    Thu Nov 03 2017 Anish Swaminathan <anishs@vmware.com> 228-41
245 247
 -    Fix null pointer dereferencing in resolved - CVE-2017-9217
246 248
 *    Thu Nov 03 2017 Vinay Kulkarni <kulkarniv@vmware.com>  228-40