Resolves: CVE-2021-22898 - fix TELNET stack contents disclosure
This commit is contained in:
parent
2461a58681
commit
aa689a0f22
31
0002-curl-7.76.1-CVE-2021-22898.patch
Normal file
31
0002-curl-7.76.1-CVE-2021-22898.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 886f7458bbf005299f3f8224103d1903cd6fa7a4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harry Sintonen <sintonen@iki.fi>
|
||||||
|
Date: Fri, 7 May 2021 13:09:57 +0200
|
||||||
|
Subject: [PATCH] telnet: check sscanf() for correct number of matches
|
||||||
|
|
||||||
|
CVE-2021-22898
|
||||||
|
|
||||||
|
Bug: https://curl.se/docs/CVE-2021-22898.html
|
||||||
|
|
||||||
|
Upstream-commit: 39ce47f219b09c380b81f89fe54ac586c8db6bde
|
||||||
|
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
---
|
||||||
|
lib/telnet.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lib/telnet.c b/lib/telnet.c
|
||||||
|
index f96a4cb..4551435 100644
|
||||||
|
--- a/lib/telnet.c
|
||||||
|
+++ b/lib/telnet.c
|
||||||
|
@@ -921,7 +921,7 @@ static void suboption(struct Curl_easy *data)
|
||||||
|
size_t tmplen = (strlen(v->data) + 1);
|
||||||
|
/* Add the variable only if it fits */
|
||||||
|
if(len + tmplen < (int)sizeof(temp)-6) {
|
||||||
|
- if(sscanf(v->data, "%127[^,],%127s", varname, varval)) {
|
||||||
|
+ if(sscanf(v->data, "%127[^,],%127s", varname, varval) == 2) {
|
||||||
|
msnprintf((char *)&temp[len], sizeof(temp) - len,
|
||||||
|
"%c%s%c%s", CURL_NEW_ENV_VAR, varname,
|
||||||
|
CURL_NEW_ENV_VALUE, varval);
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
@ -1,13 +1,16 @@
|
|||||||
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
|
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
|
||||||
Name: curl
|
Name: curl
|
||||||
Version: 7.76.1
|
Version: 7.76.1
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
Source: https://curl.se/download/%{name}-%{version}.tar.xz
|
Source: https://curl.se/download/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
# http2: fix resource leaks detected by Coverity
|
# http2: fix resource leaks detected by Coverity
|
||||||
Patch1: 0001-curl-7.76.1-resource-leaks.patch
|
Patch1: 0001-curl-7.76.1-resource-leaks.patch
|
||||||
|
|
||||||
|
# fix TELNET stack contents disclosure (CVE-2021-22898)
|
||||||
|
Patch2: 0002-curl-7.76.1-CVE-2021-22898.patch
|
||||||
|
|
||||||
# patch making libcurl multilib ready
|
# patch making libcurl multilib ready
|
||||||
Patch101: 0101-curl-7.32.0-multilib.patch
|
Patch101: 0101-curl-7.32.0-multilib.patch
|
||||||
|
|
||||||
@ -184,6 +187,7 @@ be installed.
|
|||||||
|
|
||||||
# upstream patches
|
# upstream patches
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
# Fedora patches
|
# Fedora patches
|
||||||
%patch101 -p1
|
%patch101 -p1
|
||||||
@ -364,6 +368,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
|
|||||||
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
|
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed May 26 2021 Kamil Dudka <kdudka@redhat.com> - 7.76.1-3
|
||||||
|
- fix TELNET stack contents disclosure (CVE-2021-22898)
|
||||||
|
|
||||||
* Mon May 03 2021 Kamil Dudka <kdudka@redhat.com> - 7.76.1-2
|
* Mon May 03 2021 Kamil Dudka <kdudka@redhat.com> - 7.76.1-2
|
||||||
- http2: fix resource leaks detected by Coverity
|
- http2: fix resource leaks detected by Coverity
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user