mirror of
https://git.yoctoproject.org/poky
synced 2026-04-17 00:32:13 +02:00
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:
6f8dc568e6
(From OE-Core rev: c6bc5cfbed71b65753e50aee5a640934e754858a)
Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
committed by
Steve Sakoman
parent
eb7bb5b589
commit
b994c2d4f5
46
meta/recipes-extended/sysstat/sysstat/CVE-2023-33204.patch
Normal file
46
meta/recipes-extended/sysstat/sysstat/CVE-2023-33204.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
Origin: https://github.com/opencontainers/runc/commit/6f8dc568e6ab072bb8205b732f04e685bf9237c0
|
||||
Reviewed-by: Sylvain Beucler <beuc@debian.org>
|
||||
Last-Update: 2023-02-18
|
||||
|
||||
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.
|
||||
|
||||
CVE: CVE-2023-33204
|
||||
Upstream-Status: Backport [ upstream: https://github.com/sysstat/sysstat/commit/6f8dc568e6ab072bb8205b732f04e685bf9237c0
|
||||
debian: http://security.debian.org/debian-security/pool/updates/main/s/sysstat/sysstat_12.0.3-2+deb10u2.debian.tar.xz ]
|
||||
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
|
||||
|
||||
---
|
||||
common.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: sysstat-12.0.3/common.c
|
||||
===================================================================
|
||||
--- sysstat-12.0.3.orig/common.c
|
||||
+++ sysstat-12.0.3/common.c
|
||||
@@ -1449,15 +1449,16 @@ int parse_values(char *strargv, unsigned
|
||||
*/
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
|
||||
|
||||
SRC_URI += "file://0001-configure.in-remove-check-for-chkconfig.patch \
|
||||
file://CVE-2022-39377.patch \
|
||||
file://CVE-2023-33204.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "9dfff5fac24e35bd92fb7896debf2ffb"
|
||||
|
||||
Reference in New Issue
Block a user