summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorChee Yang Lee <chee.yang.lee@intel.com>2023-07-07 19:44:07 +0800
committerSteve Sakoman <steve@sakoman.com>2023-07-12 05:13:58 -1000
commitb994c2d4f5baed2b4227f14f0d653cdc28d9062b (patch)
tree0ba6dc705138cdbf02975dc0213d06f298f03977 /meta/recipes-extended
parenteb7bb5b5893ca6c19f8ab1830cfc661f15b3721c (diff)
downloadpoky-b994c2d4f5baed2b4227f14f0d653cdc28d9062b.tar.gz
sysstat: fix CVE-2023-33204
import patch from debian to fix CVE-2023-33204 http://security.debian.org/debian-security/pool/updates/main/s/sysstat/sysstat_12.0.3-2+deb10u2.debian.tar.xz upstream patch: https://github.com/sysstat/sysstat/commit/6f8dc568e6ab072bb8205b732f04e685bf9237c0 (From OE-Core rev: c6bc5cfbed71b65753e50aee5a640934e754858a) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-extended')
-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"