Added a patch to fix the CVE
- used %configure
Change-Id: Ib82986f8fc5f549131e29df51afa9f4a463c77e8
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/6721
Tested-by: michellew <michellew@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,33 @@ |
| 0 |
+From 6010c0303a422a9c5fa8860c061bf7105eb7f8b2 Mon Sep 17 00:00:00 2001 |
|
| 1 |
+From: "djm@openbsd.org" <djm@openbsd.org> |
|
| 2 |
+Date: Fri, 16 Nov 2018 03:03:10 +0000 |
|
| 3 |
+Subject: [PATCH] upstream: disallow empty incoming filename or ones that refer |
|
| 4 |
+ to the |
|
| 5 |
+ |
|
| 6 |
+current directory; based on report/patch from Harry Sintonen |
|
| 7 |
+ |
|
| 8 |
+OpenBSD-Commit-ID: f27651b30eaee2df49540ab68d030865c04f6de9 |
|
| 9 |
+--- |
|
| 10 |
+ scp.c | 5 +++-- |
|
| 11 |
+ 1 file changed, 3 insertions(+), 2 deletions(-) |
|
| 12 |
+ |
|
| 13 |
+diff --git a/scp.c b/scp.c |
|
| 14 |
+index 60682c687..4f3fdcd3d 100644 |
|
| 15 |
+--- a/scp.c |
|
| 16 |
+@@ -1,4 +1,4 @@ |
|
| 17 |
+-/* $OpenBSD: scp.c,v 1.197 2018/06/01 04:31:48 dtucker Exp $ */ |
|
| 18 |
++/* $OpenBSD: scp.c,v 1.198 2018/11/16 03:03:10 djm Exp $ */ |
|
| 19 |
+ /* |
|
| 20 |
+ * scp - secure remote copy. This is basically patched BSD rcp which |
|
| 21 |
+ * uses ssh to do the data transfer (instead of using rcmd). |
|
| 22 |
+@@ -1106,7 +1106,8 @@ sink(int argc, char **argv) |
|
| 23 |
+ SCREWUP("size out of range");
|
|
| 24 |
+ size = (off_t)ull; |
|
| 25 |
+ |
|
| 26 |
+- if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) {
|
|
| 27 |
++ if (*cp == '\0' || strchr(cp, '/') != NULL || |
|
| 28 |
++ strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) {
|
|
| 29 |
+ run_err("error: unexpected filename: %s", cp);
|
|
| 30 |
+ exit(1); |
|
| 31 |
+ } |
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
Summary: Free version of the SSH connectivity tools |
| 2 | 2 |
Name: openssh |
| 3 | 3 |
Version: 7.8p1 |
| 4 |
-Release: 1%{?dist}
|
|
| 4 |
+Release: 2%{?dist}
|
|
| 5 | 5 |
License: BSD |
| 6 | 6 |
URL: https://www.openssh.com/ |
| 7 | 7 |
Group: System Environment/Security |
| ... | ... |
@@ -16,6 +16,7 @@ Source3: sshd-keygen.service |
| 16 | 16 |
Patch0: blfs_systemd_fixes.patch |
| 17 | 17 |
Patch1: openssh-7.8p1-fips.patch |
| 18 | 18 |
Patch2: openssh-7.8p1-configure-fips.patch |
| 19 |
+Patch3: openssh-CVE-2018-20685.patch |
|
| 19 | 20 |
BuildRequires: openssl-devel |
| 20 | 21 |
BuildRequires: Linux-PAM-devel |
| 21 | 22 |
BuildRequires: krb5-devel |
| ... | ... |
@@ -52,13 +53,9 @@ tar xf %{SOURCE1} --no-same-owner
|
| 52 | 52 |
%patch0 -p0 |
| 53 | 53 |
%patch1 -p1 |
| 54 | 54 |
%patch2 -p1 |
| 55 |
+%patch3 -p1 |
|
| 55 | 56 |
%build |
| 56 |
-./configure \ |
|
| 57 |
- CFLAGS="%{optflags}" \
|
|
| 58 |
- CXXFLAGS="%{optflags}" \
|
|
| 59 |
- --prefix=%{_prefix} \
|
|
| 60 |
- --bindir=%{_bindir} \
|
|
| 61 |
- --libdir=%{_libdir} \
|
|
| 57 |
+%configure \ |
|
| 62 | 58 |
--sysconfdir=/etc/ssh \ |
| 63 | 59 |
--datadir=/usr/share/sshd \ |
| 64 | 60 |
--with-md5-passwords \ |
| ... | ... |
@@ -179,6 +176,9 @@ rm -rf %{buildroot}/*
|
| 179 | 179 |
%{_mandir}/man8/ssh-pkcs11-helper.8.gz
|
| 180 | 180 |
|
| 181 | 181 |
%changelog |
| 182 |
+* Thu Feb 14 2019 Ankit Jain <ankitja@vmware.comm> 7.8p1-2 |
|
| 183 |
+- Fix CVE-2018-20685. |
|
| 184 |
+- Use %configure |
|
| 182 | 185 |
* Tue Sep 11 2018 Him Kalyan Bordoloi <bordoloih@vmware.com> 7.8p1-1 |
| 183 | 186 |
- Update version |
| 184 | 187 |
* Tue Nov 28 2017 Xiaolin Li <xiaolinl@vmware.comm> 7.5p1-11 |