!49 [sync] PR-47: fix CVE-2023-33204
From: @openeuler-sync-bot Reviewed-by: @yanan-rock Signed-off-by: @yanan-rock
This commit is contained in:
commit
33ecf3fbc7
41
backport-CVE-2023-33204.patch
Normal file
41
backport-CVE-2023-33204.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From 954ff2e2673cef48f0ed44668c466eab041db387 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Kopylov <pkopylov@cloudlinux.com>
|
||||||
|
Date: Wed, 17 May 2023 11:33:45 +0200
|
||||||
|
Subject: [PATCH] Fix an overflow which is still possible for some values.
|
||||||
|
|
||||||
|
Reference:https://github.com/sysstat/sysstat/commit/6f8dc568e6ab072bb8205b732f04e685bf9237c0
|
||||||
|
Conflict:Adaptation Context
|
||||||
|
---
|
||||||
|
common.c | 15 ++++++++-------
|
||||||
|
1 file changed, 8 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/common.c b/common.c
|
||||||
|
index 28d475e..85b2457 100644
|
||||||
|
--- a/common.c
|
||||||
|
+++ b/common.c
|
||||||
|
@@ -1541,15 +1541,16 @@ int parse_values(char *strargv, unsigned char bitmap[], int max_val, const char
|
||||||
|
*/
|
||||||
|
void check_overflow(size_t val1, size_t val2, size_t val3)
|
||||||
|
{
|
||||||
|
- if ((unsigned long long) val1 *
|
||||||
|
- (unsigned long long) val2 *
|
||||||
|
- (unsigned long long) val3 > UINT_MAX) {
|
||||||
|
+ if ((val1 != 0) && (val2 != 0) && (val3 != 0) &&
|
||||||
|
+ (((unsigned long long) UINT_MAX / (unsigned long long) val1 <
|
||||||
|
+ (unsigned long long) val2) ||
|
||||||
|
+ ((unsigned long long) UINT_MAX / ((unsigned long long) val1 * (unsigned long long) val2) <
|
||||||
|
+ (unsigned long long) val3))) {
|
||||||
|
#ifdef DEBUG
|
||||||
|
- fprintf(stderr, "%s: Overflow detected (%llu). Aborting...\n",
|
||||||
|
- __FUNCTION__,
|
||||||
|
- (unsigned long long) val1 * (unsigned long long) val2 * (unsigned long long) val3);
|
||||||
|
+ fprintf(stderr, "%s: Overflow detected (%u,%u,%u). Aborting...\n",
|
||||||
|
+ __FUNCTION__, val1, val2, val3);
|
||||||
|
#endif
|
||||||
|
- exit(4);
|
||||||
|
+ exit(4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
@ -1,12 +1,13 @@
|
|||||||
Name: sysstat
|
Name: sysstat
|
||||||
Version: 12.5.4
|
Version: 12.5.4
|
||||||
Release: 6
|
Release: 7
|
||||||
Summary: System performance tools for the Linux operating system
|
Summary: System performance tools for the Linux operating system
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://sebastien.godard.pagesperso-orange.fr/
|
URL: http://sebastien.godard.pagesperso-orange.fr/
|
||||||
Source0: https://github.com/sysstat/sysstat/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/sysstat/sysstat/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
Patch0000: backport-CVE-2022-39377.patch
|
Patch6000: backport-CVE-2022-39377.patch
|
||||||
|
Patch6001: backport-CVE-2023-33204.patch
|
||||||
|
|
||||||
BuildRequires: gcc, gettext, lm_sensors-devel, systemd
|
BuildRequires: gcc, gettext, lm_sensors-devel, systemd
|
||||||
|
|
||||||
@ -88,6 +89,9 @@ export compressafter="31"
|
|||||||
%{_mandir}/man*/*
|
%{_mandir}/man*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu May 25 2023 zhouwenpei <zhouwenpei1@h-partners.com> - 12.5.4-7
|
||||||
|
- fix CVE-2023-33204
|
||||||
|
|
||||||
* Fri Apr 14 2023 wangjiang <wangjiang37@h-partners.com> - 12.5.4-6
|
* Fri Apr 14 2023 wangjiang <wangjiang37@h-partners.com> - 12.5.4-6
|
||||||
- service auto start after install
|
- service auto start after install
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user