summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-extended/sysstat/sysstat/CVE-2023-33204.patch46
-rw-r--r--meta/recipes-extended/sysstat/sysstat_12.2.1.bb1
2 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-extended/sysstat/sysstat/CVE-2023-33204.patch b/meta/recipes-extended/sysstat/sysstat/CVE-2023-33204.patch
new file mode 100644
index 0000000000..9a27945a8b
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat/CVE-2023-33204.patch
@@ -0,0 +1,46 @@
1Origin: https://github.com/opencontainers/runc/commit/6f8dc568e6ab072bb8205b732f04e685bf9237c0
2Reviewed-by: Sylvain Beucler <beuc@debian.org>
3Last-Update: 2023-02-18
4
5From 954ff2e2673cef48f0ed44668c466eab041db387 Mon Sep 17 00:00:00 2001
6From: Pavel Kopylov <pkopylov@cloudlinux.com>
7Date: Wed, 17 May 2023 11:33:45 +0200
8Subject: [PATCH] Fix an overflow which is still possible for some values.
9
10CVE: CVE-2023-33204
11Upstream-Status: Backport [ upstream: https://github.com/sysstat/sysstat/commit/6f8dc568e6ab072bb8205b732f04e685bf9237c0
12debian: http://security.debian.org/debian-security/pool/updates/main/s/sysstat/sysstat_12.0.3-2+deb10u2.debian.tar.xz ]
13Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
14
15---
16 common.c | 7 +++++--
17 1 file changed, 5 insertions(+), 2 deletions(-)
18
19Index: sysstat-12.0.3/common.c
20===================================================================
21--- sysstat-12.0.3.orig/common.c
22+++ sysstat-12.0.3/common.c
23@@ -1449,15 +1449,16 @@ int parse_values(char *strargv, unsigned
24 */
25 void check_overflow(size_t val1, size_t val2, size_t val3)
26 {
27- if ((unsigned long long) val1 *
28- (unsigned long long) val2 *
29- (unsigned long long) val3 > UINT_MAX) {
30+ if ((val1 != 0) && (val2 != 0) && (val3 != 0) &&
31+ (((unsigned long long) UINT_MAX / (unsigned long long) val1 <
32+ (unsigned long long) val2) ||
33+ ((unsigned long long) UINT_MAX / ((unsigned long long) val1 * (unsigned long long) val2) <
34+ (unsigned long long) val3))) {
35 #ifdef DEBUG
36- fprintf(stderr, "%s: Overflow detected (%llu). Aborting...\n",
37- __FUNCTION__,
38- (unsigned long long) val1 * (unsigned long long) val2 * (unsigned long long) val3);
39+ fprintf(stderr, "%s: Overflow detected (%u,%u,%u). Aborting...\n",
40+ __FUNCTION__, val1, val2, val3);
41 #endif
42- exit(4);
43+ exit(4);
44 }
45 }
46
diff --git a/meta/recipes-extended/sysstat/sysstat_12.2.1.bb b/meta/recipes-extended/sysstat/sysstat_12.2.1.bb
index 2c0d5c8136..ac7b898db9 100644
--- a/meta/recipes-extended/sysstat/sysstat_12.2.1.bb
+++ b/meta/recipes-extended/sysstat/sysstat_12.2.1.bb
@@ -4,6 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
4 4
5SRC_URI += "file://0001-configure.in-remove-check-for-chkconfig.patch \ 5SRC_URI += "file://0001-configure.in-remove-check-for-chkconfig.patch \
6 file://CVE-2022-39377.patch \ 6 file://CVE-2022-39377.patch \
7 file://CVE-2023-33204.patch \
7 " 8 "
8 9
9SRC_URI[md5sum] = "9dfff5fac24e35bd92fb7896debf2ffb" 10SRC_URI[md5sum] = "9dfff5fac24e35bd92fb7896debf2ffb"