diff --git a/system/base/procps/actions.py b/system/base/procps/actions.py index 2c1d6603..a45ac256 100644 --- a/system/base/procps/actions.py +++ b/system/base/procps/actions.py @@ -9,7 +9,7 @@ from pisi.actionsapi import pisitools from pisi.actionsapi import get def setup(): - pisitools.dosed("watch.c", "ncursesw/ncurses.h", "ncurses.h") + # pisitools.dosed("watch.c", "ncursesw/ncurses.h", "ncurses.h") autotools.configure("--prefix=/usr \ --exec-prefix=/ \ @@ -41,4 +41,4 @@ def install(): #pisitools.dosym("libproc-%s.so" % get.srcVERSION(), "/lib/libproc.so") - pisitools.dodoc("NEWS", "ps/HACKING") + pisitools.dodoc("NEWS", "src/ps/HACKING") diff --git a/system/base/procps/files/fedora/cve-2023-4016.patch b/system/base/procps/files/fedora/cve-2023-4016.patch new file mode 100644 index 00000000..371fda7f --- /dev/null +++ b/system/base/procps/files/fedora/cve-2023-4016.patch @@ -0,0 +1,75 @@ +From 8e7c09895b2d8dc0d65980d757926351ad6817e8 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Mon, 14 Aug 2023 14:12:41 +0200 +Subject: [PATCH] ps buffer overflow + +Resolves: bz#2230186 +--- + local/xalloc.h | 2 +- + src/ps/parser.c | 11 ++++++----- + 2 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/local/xalloc.h b/local/xalloc.h +index 8b4d368..a804689 100644 +--- a/local/xalloc.h ++++ b/local/xalloc.h +@@ -42,7 +42,7 @@ void *xcalloc(const size_t nelems, const size_t size) + { + void *ret = calloc(nelems, size); + if (!ret && size && nelems) +- xerrx(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size); ++ xerrx(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", nelems*size); + return ret; + } + +diff --git a/src/ps/parser.c b/src/ps/parser.c +index 248aa74..c46855c 100644 +--- a/src/ps/parser.c ++++ b/src/ps/parser.c +@@ -189,8 +189,8 @@ static const char *parse_list(const char *arg, const char *(*parse_fn)(char *, s + const char *err; /* error code that could or did happen */ + /*** prepare to operate ***/ + node = xmalloc(sizeof(selection_node)); +- node->u = xmalloc(strlen(arg)*sizeof(sel_union)); /* waste is insignificant */ + node->n = 0; ++ node->u = NULL; + buf = strdup(arg); + /*** sanity check and count items ***/ + need_item = 1; /* true */ +@@ -204,12 +204,13 @@ static const char *parse_list(const char *arg, const char *(*parse_fn)(char *, s + need_item=1; + break; + default: +- if(need_item) items++; ++ if(need_item && itemsn = items; ++ node->u = xcalloc(items, sizeof(sel_union)); + /*** actually parse the list ***/ + walk = buf; + while(items--){ +@@ -1050,15 +1051,15 @@ static const char *parse_trailing_pids(void){ + thisarg = ps_argc - 1; /* we must be at the end now */ + + pidnode = xmalloc(sizeof(selection_node)); +- pidnode->u = xmalloc(i*sizeof(sel_union)); /* waste is insignificant */ ++ pidnode->u = xcalloc(i, sizeof(sel_union)); /* waste is insignificant */ + pidnode->n = 0; + + grpnode = xmalloc(sizeof(selection_node)); +- grpnode->u = xmalloc(i*sizeof(sel_union)); /* waste is insignificant */ ++ grpnode->u = xcalloc(i,sizeof(sel_union)); /* waste is insignificant */ + grpnode->n = 0; + + sidnode = xmalloc(sizeof(selection_node)); +- sidnode->u = xmalloc(i*sizeof(sel_union)); /* waste is insignificant */ ++ sidnode->u = xcalloc(i, sizeof(sel_union)); /* waste is insignificant */ + sidnode->n = 0; + + while(i--){ +-- +2.40.1 + diff --git a/system/base/procps/pspec.xml b/system/base/procps/pspec.xml index 094c8cfe..dbad019b 100644 --- a/system/base/procps/pspec.xml +++ b/system/base/procps/pspec.xml @@ -12,16 +12,16 @@ app:console Standard informational utilities and process-handling tools procps is the package that has a bunch of small useful utilities that give information about processes using the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, free, slabtop, and skill. - http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-3.3.17.tar.xz + http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-4.0.5.tar.xz ncurses-devel - fedora/covscan-findings.patch - fedora/free-si-fix.patch - fedora/pwait-to-pidwait.patch - fedora/sysctl-hyphen-param.patch - fedora/sysctl-print-dotted-keys-again.patch + + + + + @@ -45,6 +45,13 @@ + + 2024-12-21 + 4.0.5 + Version bump. + Pisi Linux Community + admin@pisilinux.org + 2022-12-07 3.3.17