From 434353d1a742a740bbcdb60509441bbc8438834c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 06 2019 10:04:23 +0000 Subject: import procps-ng-3.3.10-26.el7 --- diff --git a/SOURCES/procps-ng-3.3.10-CVE-2018-1122.patch b/SOURCES/procps-ng-3.3.10-CVE-2018-1122.patch new file mode 100644 index 0000000..8c19d9c --- /dev/null +++ b/SOURCES/procps-ng-3.3.10-CVE-2018-1122.patch @@ -0,0 +1,44 @@ +diff -up ./top/top.c.ori ./top/top.c +--- ./top/top.c.ori 2019-02-27 17:23:48.060408215 +0100 ++++ ./top/top.c 2019-02-28 15:28:11.321927877 +0100 +@@ -3437,6 +3437,20 @@ static int config_cvt (WIN_t *q) { + } // end: config_cvt + + ++static int snprintf_Rc_name (const char *const format, ...) __attribute__((format(printf,1,2))); ++static int snprintf_Rc_name (const char *const format, ...) { ++ int len; ++ va_list ap; ++ va_start(ap, format); ++ len = vsnprintf(Rc_name, sizeof(Rc_name), format, ap); ++ va_end(ap); ++ if (len <= 0 || (size_t)len >= sizeof(Rc_name)) { ++ Rc_name[0] = '\0'; ++ return 0; ++ } ++ return len; ++} ++ + /* + * Build the local RC file name then try to read both of 'em. + * 'SYS_RCFILESPEC' contains two lines consisting of the secure +@@ -3458,8 +3472,18 @@ static void configs_read (void) { + FILE *fp; + int i; + ++ Rc_name[0] = '\0'; // "fopen() shall fail if pathname is an empty string." + p = getenv("HOME"); +- snprintf(Rc_name, sizeof(Rc_name), "%s/.%src", (p && *p) ? p : ".", Myname); ++ ++ if (!p || p[0] != '/') { ++ const struct passwd *const pwd = getpwuid(getuid()); ++ if (!pwd || !(p = pwd->pw_dir) || p[0] != '/') { ++ p = NULL; ++ } ++ } ++ if (p) { ++ snprintf_Rc_name("%s/.%src", p, Myname); ++ } + + fp = fopen(SYS_RCFILESPEC, "r"); + if (fp) { diff --git a/SOURCES/procps-ng-3.3.10-free-counts-unreclaim-slabs-in-avail-mem.patch b/SOURCES/procps-ng-3.3.10-free-counts-unreclaim-slabs-in-avail-mem.patch new file mode 100644 index 0000000..a943478 --- /dev/null +++ b/SOURCES/procps-ng-3.3.10-free-counts-unreclaim-slabs-in-avail-mem.patch @@ -0,0 +1,24 @@ +diff -up ./free.1.ori ./free.1 +--- ./free.1.ori 2019-04-12 13:28:22.255295567 +0200 ++++ ./free.1 2019-04-12 13:29:00.666768897 +0200 +@@ -32,7 +32,7 @@ kernels 2.6.32, displayed as zero if not + Memory used by kernel buffers (Buffers in /proc/meminfo) + .TP + \fBcache\fR +-Memory used by the page cache and slabs (Cached and Slab in /proc/meminfo) ++Memory used by the page cache and slabs (Cached and SReclaimable in /proc/meminfo) + .TP + \fBbuff/cache\fR + Sum of \fBbuffers\fR and \fBcache\fR +diff -up ./proc/sysinfo.c.ori ./proc/sysinfo.c +--- ./proc/sysinfo.c.ori 2019-04-12 13:28:22.241295394 +0200 ++++ ./proc/sysinfo.c 2019-04-12 13:29:00.668768921 +0200 +@@ -758,7 +758,7 @@ nextline: + if(kb_inactive==~0UL){ + kb_inactive = kb_inact_dirty + kb_inact_clean + kb_inact_laundry; + } +- kb_main_cached = kb_page_cache + kb_slab; ++ kb_main_cached = kb_page_cache + kb_slab_reclaimable; + kb_swap_used = kb_swap_total - kb_swap_free; + kb_main_used = kb_main_total - kb_main_free - kb_main_cached - kb_main_buffers; + diff --git a/SOURCES/procps-ng-3.3.10-recognize_sched_deadline.patch b/SOURCES/procps-ng-3.3.10-recognize_sched_deadline.patch new file mode 100644 index 0000000..ee34e10 --- /dev/null +++ b/SOURCES/procps-ng-3.3.10-recognize_sched_deadline.patch @@ -0,0 +1,82 @@ +diff -up ./man-po/fr.po.ori ./man-po/fr.po +--- ./man-po/fr.po.ori 2014-09-23 13:40:36.000000000 +0200 ++++ ./man-po/fr.po 2019-03-27 13:52:01.636939773 +0100 +@@ -4593,6 +4593,9 @@ msgstr "Le programme B a été é + #~ msgid "IDL\tSCHED_IDLE\n" + #~ msgstr "IDL\tSCHED_IDLE\n" + ++#~ msgid "DLN\tSCHED_DEADLINE\n" ++#~ msgstr "DLN\tSCHED_DEADLINE\n" ++ + #~ msgid "?\tunknown value\n" + #~ msgstr "?\tvaleur inconnue\n" + +@@ -5200,11 +5203,11 @@ msgstr "Le programme B a été é + #~ msgid "scheduling policy of the process. The policies SCHED_OTHER (SCHED_NORMAL),\n" + #~ msgstr "Ordonnancement de la politique du processus. Les politiques SCHED_OTHER (SCHED_NORMAL),\n" + +-#~ msgid "SCHED_FIFO, SCHED_RR, SCHED_BATCH, SCHED_ISO, and SCHED_IDLE are respectively\n" +-#~ msgstr "SCHED_FIFO, SCHED_RR, SCHED_BATCH, SCHED_ISO et SCHED_IDLE sont respectivement\n" ++#~ msgid "SCHED_FIFO, SCHED_RR, SCHED_BATCH, SCHED_ISO, SCHED_IDLE and SCHED_DEADLINE are respectively\n" ++#~ msgstr "SCHED_FIFO, SCHED_RR, SCHED_BATCH, SCHED_ISO, SCHED_IDLE et SCHED_DEADLINE sont respectivement\n" + +-#~ msgid "displayed as 0, 1, 2, 3, 4, and 5.\n" +-#~ msgstr "affichées comme 0, 1, 2, 3, 4 et 5.\n" ++#~ msgid "displayed as 0, 1, 2, 3, 4, 5 and 6.\n" ++#~ msgstr "affichées comme 0, 1, 2, 3, 4, 5 et 6.\n" + + #~ msgid "seat\tSEAT\tT{\n" + #~ msgstr "seat\tSEAT\tT{\n" +diff -up ./ps/output.c.ori ./ps/output.c +--- ./ps/output.c.ori 2019-03-27 13:51:51.072812431 +0100 ++++ ./ps/output.c 2019-03-27 13:52:01.638939797 +0100 +@@ -674,7 +674,7 @@ static int pr_class(char *restrict const + case 3: return snprintf(outbuf, COLWID, "B"); // SCHED_BATCH + case 4: return snprintf(outbuf, COLWID, "ISO"); // reserved for SCHED_ISO (Con Kolivas) + case 5: return snprintf(outbuf, COLWID, "IDL"); // SCHED_IDLE +- case 6: return snprintf(outbuf, COLWID, "#6"); // ++ case 6: return snprintf(outbuf, COLWID, "DLN"); // SCHED_DEADLINE + case 7: return snprintf(outbuf, COLWID, "#7"); // + case 8: return snprintf(outbuf, COLWID, "#8"); // + case 9: return snprintf(outbuf, COLWID, "#9"); // +diff -up ./ps/ps.1.ori ./ps/ps.1 +--- ./ps/ps.1.ori 2019-03-27 13:51:51.073812443 +0100 ++++ ./ps/ps.1 2019-03-27 13:52:01.639939809 +0100 +@@ -1138,6 +1138,8 @@ ISO SCHED_ISO + .br + IDL SCHED_IDLE + .br ++DLN SCHED_DEADLINE ++.br + ? unknown value + T} + +@@ -1160,6 +1162,8 @@ ISO SCHED_ISO + .br + IDL SCHED_IDLE + .br ++DLN SCHED_DEADLINE ++.br + ? unknown value + T} + +@@ -1485,6 +1489,8 @@ ISO SCHED_ISO + .br + IDL SCHED_IDLE + .br ++DLN SCHED_DEADLINE ++.br + ? unknown value + T} + +@@ -1553,8 +1559,8 @@ T} + + sched SCH T{ + scheduling policy of the process. The policies SCHED_OTHER (SCHED_NORMAL), +-SCHED_FIFO, SCHED_RR, SCHED_BATCH, SCHED_ISO, and SCHED_IDLE are respectively +-displayed as 0, 1, 2, 3, 4, and 5. ++SCHED_FIFO, SCHED_RR, SCHED_BATCH, SCHED_ISO, SCHED_IDLE and SCHED_DEADLINE are ++respectively displayed as 0, 1, 2, 3, 4, 5 and 6. + T} + + seat SEAT T{ diff --git a/SPECS/procps-ng.spec b/SPECS/procps-ng.spec index 267d951..d6ce2bd 100644 --- a/SPECS/procps-ng.spec +++ b/SPECS/procps-ng.spec @@ -4,7 +4,7 @@ Summary: System and process monitoring utilities Name: procps-ng Version: 3.3.10 -Release: 23%{?dist} +Release: 26%{?dist} License: GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ Group: Applications/System URL: https://sourceforge.net/projects/procps-ng/ @@ -30,6 +30,9 @@ Patch15: procps-ng-3.3.10-top-locale-independent-float-delay.patch Patch16: procps-ng-3.3.10-free-mem-petabytes-segfault.patch Patch17: procps-ng-3.3.10-ps-new-option-loginid-luid.patch Patch18: procps-ng-3.3.10-CVE-2018-1124.patch +Patch19: procps-ng-3.3.10-CVE-2018-1122.patch +Patch20: procps-ng-3.3.10-recognize_sched_deadline.patch +Patch21: procps-ng-3.3.10-free-counts-unreclaim-slabs-in-avail-mem.patch Requires(post): /sbin/ldconfig @@ -115,6 +118,9 @@ Internationalization pack for procps-ng %patch16 -p1 %patch17 -p1 %patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 %build @@ -196,6 +202,18 @@ rmdir %{buildroot}/share %{_datadir}/locale/* %changelog +* Fri Apr 12 2019 Jan Rybar - 3.3.10-26 +- free: unreclaimable slabs counted into free memory, used mem incorrect +- Resolves: rhbz#1699264 + +* Wed Mar 27 2019 Jan Rybar - 3.3.10-25 +- ps: recognize SCHED_DEADLINE in CLS field, upstream backport +- Resolves: rhbz#1692843 + +* Tue Feb 26 2019 Jan Rybar - 3.3.10-24 +- top: Do not default to the cwd in configs_read() +- Resolves: rhbz#1577023 + * Tue May 15 2018 Kamil Dudka - 3.3.10-23 - check for truncation after calling snprintf() - Related: CVE-2018-1124