Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Medium] Patch ceph to fix CVE-2020-22217 #12105

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions SPECS/ceph/CVE-2020-22217.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 97568ddb836a9680c93335a3f8ca0f2c0616ccdc Mon Sep 17 00:00:00 2001
From: Kevin Lockwood <[email protected]>
Date: Mon, 27 Jan 2025 16:19:53 -0800
Subject: [PATCH] Fix CVE-2020-22217 in c-ares

Link: https://github.com/c-ares/c-ares/pull/332
---
src/c-ares/ares_parse_soa_reply.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/src/c-ares/ares_parse_soa_reply.c b/src/c-ares/ares_parse_soa_reply.c
index 35af0a75c..5924bbca9 100644
--- a/src/c-ares/ares_parse_soa_reply.c
+++ b/src/c-ares/ares_parse_soa_reply.c
@@ -65,6 +65,9 @@ ares_parse_soa_reply(const unsigned char *abuf, int alen,
status = ares__expand_name_for_response(aptr, abuf, alen, &qname, &len);
if (status != ARES_SUCCESS)
goto failed_stat;
+
+ if (alen <= len + HFIXEDSZ + 1)
+ goto failed;
aptr += len;

/* skip qtype & qclass */
--
2.34.1

10 changes: 7 additions & 3 deletions SPECS/ceph/ceph.spec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#disable debuginfo because ceph-debuginfo rpm is too large
%define debug_package %{nil}
%define _unpackaged_files_terminate_build 0

Summary: User space components of the Ceph file system
Name: ceph
Version: 18.2.2
Release: 3%{?dist}
Release: 4%{?dist}
License: LGPLv2 and LGPLv3 and CC-BY-SA and GPLv2 and Boost and BSD and MIT and Public Domain and GPLv3 and ASL-2.0
URL: https://ceph.io/
Vendor: Microsoft Corporation
Expand All @@ -14,6 +14,7 @@ Source0: https://download.ceph.com/tarballs/%{name}-%{version}.tar.gz
Patch0: 0034-src-pybind-rbd-rbd.pyx.patch
Patch1: 0032-cmake-modules-BuildBoost.cmake.patch
Patch2: CVE-2024-52338.patch
Patch3: CVE-2020-22217.patch
#
# Copyright (C) 2004-2019 The Ceph Project Developers. See COPYING file
# at the top-level directory of this distribution and at
Expand Down Expand Up @@ -895,7 +896,7 @@ This package provides a Ceph hardware monitoring agent.
# common
#################################################################################
%prep
%autosetup -p1
%autosetup -p1

%build
pwd
Expand Down Expand Up @@ -2004,6 +2005,9 @@ exit 0


%changelog
* Mon Jan 27 2025 Kevin Lockwood <[email protected]> - 18.2.2-4
- Fix for CVE-2020-22217

* Tue Jan 01 2025 Sandeep Karambelkar <[email protected]> - 18.2.2-3
- Based on the package build logs, opentelemetry-cpp submodule is not being built
- Removing opentelemetry-cpp to address below CVEs as this submodule is not relevant
Expand Down
Loading