Fix CVE-2017-6508 (#1429986)
Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
parent
ea14f5739f
commit
9222fc4c05
37
wget-1.19.1-CVE-2017-6508.patch
Normal file
37
wget-1.19.1-CVE-2017-6508.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From 4d729e322fae359a1aefaafec1144764a54e8ad4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
|
||||
Date: Mon, 6 Mar 2017 10:04:22 +0100
|
||||
Subject: [PATCH] Fix CRLF injection in Wget host part
|
||||
|
||||
* src/url.c (url_parse): Reject control characters in host part of URL
|
||||
|
||||
Reported-by: Orange Tsai
|
||||
---
|
||||
src/url.c | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/src/url.c b/src/url.c
|
||||
index 8f8ff0b..7d36b27 100644
|
||||
--- a/src/url.c
|
||||
+++ b/src/url.c
|
||||
@@ -925,6 +925,17 @@ url_parse (const char *url, int *error, struct iri *iri, bool percent_encode)
|
||||
url_unescape (u->host);
|
||||
host_modified = true;
|
||||
|
||||
+ /* check for invalid control characters in host name */
|
||||
+ for (p = u->host; *p; p++)
|
||||
+ {
|
||||
+ if (c_iscntrl(*p))
|
||||
+ {
|
||||
+ url_free(u);
|
||||
+ error_code = PE_INVALID_HOST_NAME;
|
||||
+ goto error;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Apply IDNA regardless of iri->utf8_encode status */
|
||||
if (opt.enable_iri && iri)
|
||||
{
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,13 +1,15 @@
|
||||
Summary: A utility for retrieving files using the HTTP or FTP protocols
|
||||
Name: wget
|
||||
Version: 1.19.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv3+
|
||||
Group: Applications/Internet
|
||||
Url: http://www.gnu.org/software/wget/
|
||||
Source: ftp://ftp.gnu.org/gnu/wget/wget-%{version}.tar.xz
|
||||
|
||||
Patch1: wget-1.17-path.patch
|
||||
# http://git.savannah.gnu.org/cgit/wget.git/commit/?id=4d729e322fae359a1aefaafec1144764a54e8ad4
|
||||
patch2: wget-1.19.1-CVE-2017-6508.patch
|
||||
|
||||
Provides: webclient
|
||||
Provides: bundled(gnulib)
|
||||
@ -35,6 +37,7 @@ sed -i "s|\(PACKAGE_STRING='wget .*\)'|\1 (Red Hat modified)'|" configure
|
||||
grep "PACKAGE_STRING='wget .* (Red Hat modified)'" configure || exit 1
|
||||
|
||||
%patch1 -p1 -b .path
|
||||
%patch2 -p1 -b .CVE-2017-6508
|
||||
|
||||
%build
|
||||
%configure \
|
||||
@ -81,6 +84,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_infodir}/*
|
||||
|
||||
%changelog
|
||||
* Fri May 12 2017 Tomas Hozza <thozza@redhat.com> - 1.19.1-2
|
||||
- Fix CVE-2017-6508 (#1429986)
|
||||
|
||||
* Thu Feb 16 2017 Tomas Hozza <thozza@redhat.com> - 1.19.1-1
|
||||
- New upstream version 1.19.1 (#1421398)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user