Compare commits
1 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| f9e9641f9b |
29
0011-disable-redis-proxying-by-default.patch
Normal file
29
0011-disable-redis-proxying-by-default.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
From 3bde240a2acc85e63e2f7813330713dd9b59386e Mon Sep 17 00:00:00 2001
|
||||
From: Nathan Scott <nathans@redhat.com>
|
||||
Date: Wed, 27 Mar 2024 14:51:28 +1100
|
||||
Subject: [PATCH] pmproxy: disable Redis protocol proxying by default
|
||||
|
||||
If a redis-server has been locked down in terms of connections,
|
||||
we want to prevent pmproxy from being allowed to send arbitrary
|
||||
RESP commands to it.
|
||||
|
||||
This protocol proxying doesn't affect PCP functionality at all,
|
||||
its more of a developer/sysadmin convenience when Redis used in
|
||||
cluster mode (relatively uncommon compared to localhost mode).
|
||||
---
|
||||
src/pmproxy/pmproxy.conf | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/pmproxy/pmproxy.conf b/src/pmproxy/pmproxy.conf
|
||||
index e54891792e..4cbc1c96af 100644
|
||||
--- a/src/pmproxy/pmproxy.conf
|
||||
+++ b/src/pmproxy/pmproxy.conf
|
||||
@@ -29,7 +29,7 @@ pcp.enabled = true
|
||||
http.enabled = true
|
||||
|
||||
# support Redis protocol proxying
|
||||
-redis.enabled = true
|
||||
+redis.enabled = false
|
||||
|
||||
# support SSL/TLS protocol wrapping
|
||||
secure.enabled = true
|
||||
131
0012-src-pmpost-pmpost.c-guard-against-possible-symlink-a.patch
Normal file
131
0012-src-pmpost-pmpost.c-guard-against-possible-symlink-a.patch
Normal file
@@ -0,0 +1,131 @@
|
||||
From 58ac1989fe64377b66af4090b10c807656237430 Mon Sep 17 00:00:00 2001
|
||||
From: Ken McDonell <kenj@kenj.id.au>
|
||||
Date: Tue, 13 Aug 2024 11:45:20 +1000
|
||||
Subject: [PATCH 12/19] src/pmpost/pmpost.c: guard against possible symlink
|
||||
attack
|
||||
|
||||
If $PCP_LOG_DIR/NOTICES is a symlink don't trust it.
|
||||
|
||||
Note that $PCP_LOG_DIR is owned pcp:pcp, so this would need a
|
||||
prior root penetration or compromise of the pcp account which has a
|
||||
/usr/sbin/nologin shell and no password by default.
|
||||
|
||||
Addresses SUSE Issue G.
|
||||
|
||||
Extend qa/640 to explore this possible attack vector.
|
||||
|
||||
(cherry picked from commit 22505f9a43c212217d4d53200dcf2f0e94febc8f)
|
||||
[ddiss: rebase qa/1370 without 39d434c0a ("libpcp et. al.: derived
|
||||
metric saga continues")]
|
||||
Acked-by: David Disseldorp <ddiss@suse.de>
|
||||
---
|
||||
qa/640 | 51 ++++++++++++++++++++++++++++++++++++++++++---
|
||||
qa/640.out | 3 +++
|
||||
src/pmpost/pmpost.c | 8 +++++--
|
||||
3 files changed, 57 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/qa/640 b/qa/640
|
||||
index c36018e0f..44088d75f 100755
|
||||
--- a/qa/640
|
||||
+++ b/qa/640
|
||||
@@ -6,6 +6,10 @@
|
||||
# years; so we now simply check the right permissions are in place
|
||||
# and move right along...
|
||||
#
|
||||
+# Aug 2024 update
|
||||
+# SuSE Issue G identifies another possible exploit, so try that
|
||||
+# as well.
|
||||
+#
|
||||
# Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
|
||||
#
|
||||
|
||||
@@ -17,13 +21,54 @@ echo "QA output created by $seq"
|
||||
. ./common.filter
|
||||
. ./common.check
|
||||
|
||||
-status=0 # success is the default!
|
||||
-trap "$sudo rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
||||
+rm -f $seq.full
|
||||
+ls -li $PCP_LOG_DIR/NOTICES $tmp/badness >>$seq.full 2>&1
|
||||
+
|
||||
+_cleanup()
|
||||
+{
|
||||
+ if [ -f $PCP_LOG_DIR/NOTICES.$seq ]
|
||||
+ then
|
||||
+ $sudo rm -f $PCP_LOG_DIR/NOTICES
|
||||
+ $sudo mv $PCP_LOG_DIR/NOTICES.$seq $PCP_LOG_DIR/NOTICES
|
||||
+ fi
|
||||
+ ls -li $PCP_LOG_DIR/NOTICES $tmp/badness >>$seq.full 2>&1
|
||||
+ $sudo rm -rf $tmp $tmp.*
|
||||
+}
|
||||
+
|
||||
+status=1 # failure is the default!
|
||||
+trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
+
|
||||
+_filter()
|
||||
+{
|
||||
+ sed \
|
||||
+ -e "s@$PCP_LOG_DIR@PCP_LOG_DIR@g" \
|
||||
+ -e '/^pmpost:/s/\[.*]/[DATE]/' \
|
||||
+ # end
|
||||
+}
|
||||
|
||||
# real QA test starts here
|
||||
pmpost=$PCP_BINADM_DIR/pmpost
|
||||
-echo "Using pmpost binary: $pmpost" > $seq.full
|
||||
+echo "Using pmpost binary: $pmpost" >>$seq.full
|
||||
test -u "$pmpost" && echo "FAIL: pmpost has setuid bit set"
|
||||
test -g "$pmpost" && echo "FAIL: pmpost has setgid bit set"
|
||||
+
|
||||
+$sudo mkdir $tmp || exit
|
||||
+$sudo chmod 700 $tmp || exit
|
||||
+$sudo -u $PCP_USER mv $PCP_LOG_DIR/NOTICES $PCP_LOG_DIR/NOTICES.$seq
|
||||
+
|
||||
+$sudo -u $PCP_USER ln -s $tmp/badness $PCP_LOG_DIR/NOTICES >>$seq.full
|
||||
+$pmpost ordinary user 2>&1 | _filter
|
||||
+$sudo ls -li $PCP_LOG_DIR/NOTICES $tmp/badness >>$seq.full 2>&1
|
||||
+$sudo -u pcp $pmpost pcp user 2>&1 | _filter
|
||||
+$sudo ls -li $PCP_LOG_DIR/NOTICES $tmp/badness >>$seq.full 2>&1
|
||||
+$sudo $pmpost root user 2>&1 | _filter
|
||||
+$sudo ls -li $PCP_LOG_DIR/NOTICES $tmp/badness >>$seq.full 2>&1
|
||||
+if $sudo test -f $tmp/badness
|
||||
+then
|
||||
+ $sudo cat $tmp/badness
|
||||
+fi
|
||||
+
|
||||
echo "Test complete"
|
||||
+
|
||||
+status=0
|
||||
exit
|
||||
diff --git a/qa/640.out b/qa/640.out
|
||||
index f8a70b72d..3de815cd2 100644
|
||||
--- a/qa/640.out
|
||||
+++ b/qa/640.out
|
||||
@@ -1,2 +1,5 @@
|
||||
QA output created by 640
|
||||
+pmpost: unposted message: [DATE] ordinary user
|
||||
+pmpost: unposted message: [DATE] pcp user
|
||||
+pmpost: unposted message: [DATE] root user
|
||||
Test complete
|
||||
diff --git a/src/pmpost/pmpost.c b/src/pmpost/pmpost.c
|
||||
index 4036baa41..398c104e5 100644
|
||||
--- a/src/pmpost/pmpost.c
|
||||
+++ b/src/pmpost/pmpost.c
|
||||
@@ -144,8 +144,12 @@ main(int argc, char **argv)
|
||||
goto oops;
|
||||
}
|
||||
|
||||
- if ((fd = open(notices, O_WRONLY|O_APPEND, 0)) < 0) {
|
||||
- if ((fd = open(notices, O_WRONLY|O_CREAT|O_APPEND, 0664)) < 0) {
|
||||
+ if ((fd = open(notices, O_WRONLY|O_APPEND|O_NOFOLLOW, 0)) < 0) {
|
||||
+ if (oserror() == ELOOP) {
|
||||
+ /* last component is symlink => attack? ... bail! */
|
||||
+ goto oops;
|
||||
+ }
|
||||
+ if ((fd = open(notices, O_WRONLY|O_CREAT|O_APPEND|O_NOFOLLOW, 0664)) < 0) {
|
||||
fprintf(stderr, "pmpost: cannot open or create file \"%s\": %s\n",
|
||||
notices, osstrerror());
|
||||
goto oops;
|
||||
--
|
||||
2.43.0
|
||||
|
||||
155
0013-src-libpcp-src-p_result.c-correct-buffer-over-run-te.patch
Normal file
155
0013-src-libpcp-src-p_result.c-correct-buffer-over-run-te.patch
Normal file
@@ -0,0 +1,155 @@
|
||||
From 33a21d3552ba59889654c53dfc41c385180dcc6a Mon Sep 17 00:00:00 2001
|
||||
From: Ken McDonell <kenj@kenj.id.au>
|
||||
Date: Thu, 8 Aug 2024 18:58:23 +1000
|
||||
Subject: [PATCH 13/19] src/libpcp/src/p_result.c: correct buffer over-run test
|
||||
in __pmDecodeValueSet()
|
||||
|
||||
Addresses SUSE Issue A.
|
||||
|
||||
Also new qa/1518 to verify fix.
|
||||
|
||||
(cherry picked from commit 3fc59861174ac0bbb08f5fa98cadb0d206f5cc60)
|
||||
[ddiss: rebase without 48ee02dc6 ("libpcp: extra diagnostics associated
|
||||
with PM_ERR_IPC")]
|
||||
Acked-by: David Disseldorp <ddiss@suse.de>
|
||||
---
|
||||
qa/1518 | 75 +++++++++++++++++++++++++++++++++++++++
|
||||
qa/1518.out | 11 ++++++
|
||||
qa/group | 1 +
|
||||
src/libpcp/src/p_result.c | 7 ++--
|
||||
4 files changed, 90 insertions(+), 4 deletions(-)
|
||||
create mode 100755 qa/1518
|
||||
create mode 100644 qa/1518.out
|
||||
|
||||
diff --git a/qa/1518 b/qa/1518
|
||||
new file mode 100755
|
||||
index 000000000..aee12567e
|
||||
--- /dev/null
|
||||
+++ b/qa/1518
|
||||
@@ -0,0 +1,75 @@
|
||||
+#!/bin/sh
|
||||
+# PCP QA Test No. 1518
|
||||
+# SUSE Issue A)
|
||||
+# __pmDecodeValueSet() Miscalculates Available Buffer Space
|
||||
+# Leading to a Possible Heap Corruption
|
||||
+#
|
||||
+# Copyright (c) 2024 Ken McDonell. All Rights Reserved.
|
||||
+# Copyright (c) 2024 Matthias Gerstner. All Rights Reserved.
|
||||
+#
|
||||
+
|
||||
+if [ $# -eq 0 ]
|
||||
+then
|
||||
+ seq=`basename $0`
|
||||
+ echo "QA output created by $seq"
|
||||
+else
|
||||
+ # use $seq from caller, unless not set
|
||||
+ [ -n "$seq" ] || seq=`basename $0`
|
||||
+ echo "QA output created by `basename $0` $*"
|
||||
+fi
|
||||
+
|
||||
+# get standard environment, filters and checks
|
||||
+. ./common.product
|
||||
+. ./common.filter
|
||||
+. ./common.check
|
||||
+
|
||||
+$sudo rm -rf $tmp $tmp.* $seq.full
|
||||
+
|
||||
+which nc >/dev/null 2>&1 || _notrun "no nc executable installed"
|
||||
+_check_valgrind
|
||||
+
|
||||
+_cleanup()
|
||||
+{
|
||||
+ cat pmcd.log >>$here/$seq.full
|
||||
+ cd $here
|
||||
+ $sudo rm -rf $tmp $tmp.*
|
||||
+}
|
||||
+
|
||||
+status=0 # success is the default!
|
||||
+trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
+
|
||||
+_filter()
|
||||
+{
|
||||
+ sed \
|
||||
+ -e '/^Command: /d' \
|
||||
+ # end
|
||||
+}
|
||||
+
|
||||
+mkdir $tmp || exit 1
|
||||
+cd $tmp
|
||||
+grep sampledso $PCP_PMCDCONF_PATH >pmcd.conf
|
||||
+cat pmcd.conf >>$here/$seq.full
|
||||
+port=`_find_free_port`
|
||||
+echo "port=$port" >>$here/$seq.full
|
||||
+
|
||||
+# real QA test starts here
|
||||
+valgrind $PCP_BINADM_DIR/pmcd -f -Dpdu -c ./pmcd.conf -s ./pmcd.socket -p $port >out 2>err &
|
||||
+valgrind_pid=$!
|
||||
+sleep 2
|
||||
+pmcd_pid=`$PCP_PS_PROG $PCP_PS_ALL_FLAGS | grep '[p]mcd -f -Dpdu' | $PCP_AWK_PROG '{ print $2 }'`
|
||||
+echo "pmcd_pid=$pmcd_pid" >>$here/$seq.full
|
||||
+nc -N -U ./pmcd.socket <$here/binary/decode-value-set-out-of-bound-write 2>&1 \
|
||||
+| od -c >>$here/$seq.full
|
||||
+sleep 2
|
||||
+kill -TERM $pmcd_pid
|
||||
+wait
|
||||
+
|
||||
+echo "expect error to be logged ..."
|
||||
+grep __pmDecodeValueSet pmcd.log
|
||||
+
|
||||
+echo
|
||||
+echo "and no valgrind badness ..."
|
||||
+cat out err | _filter_valgrind | _filter
|
||||
+
|
||||
+# success, all done
|
||||
+exit
|
||||
diff --git a/qa/1518.out b/qa/1518.out
|
||||
new file mode 100644
|
||||
index 000000000..3e9282414
|
||||
--- /dev/null
|
||||
+++ b/qa/1518.out
|
||||
@@ -0,0 +1,11 @@
|
||||
+QA output created by 1518
|
||||
+expect error to be logged ...
|
||||
+__pmDecodeValueSet: PM_ERR_IPC: pmid[0] value[0] vindex=1020 (max=255)
|
||||
+
|
||||
+and no valgrind badness ...
|
||||
+Memcheck, a memory error detector
|
||||
+LEAK SUMMARY:
|
||||
+definitely lost: 0 bytes in 0 blocks
|
||||
+indirectly lost: 0 bytes in 0 blocks
|
||||
+Rerun with --leak-check=full to see details of leaked memory
|
||||
+ERROR SUMMARY: 0 errors from 0 contexts ...
|
||||
diff --git a/qa/group b/qa/group
|
||||
index 98c371201..ffe0c5d92 100644
|
||||
--- a/qa/group
|
||||
+++ b/qa/group
|
||||
@@ -1951,6 +1951,7 @@ x11
|
||||
1503 pcp pidstat ps python local
|
||||
1511 pmcd local pmda.sample
|
||||
1515 pmda.denki local valgrind
|
||||
+1518 pmcd libpcp local
|
||||
1530 pmda.zfs local valgrind
|
||||
1531 pmda.zfs local valgrind
|
||||
1532 pmda.zfs local
|
||||
diff --git a/src/libpcp/src/p_result.c b/src/libpcp/src/p_result.c
|
||||
index 8826b5317..1500fe97c 100644
|
||||
--- a/src/libpcp/src/p_result.c
|
||||
+++ b/src/libpcp/src/p_result.c
|
||||
@@ -414,11 +414,10 @@ __pmDecodeValueSet(__pmPDU *pdubuf, int pdulen, __pmPDU *data, char *pduend,
|
||||
return PM_ERR_IPC;
|
||||
}
|
||||
vindex = ntohl(pduvp->value.lval);
|
||||
- if (vindex < 0 || vindex > pdulen) {
|
||||
+ if (vindex < 0 || (char *)&pdubuf[vindex] >= pduend) {
|
||||
if (pmDebugOptions.pdu && pmDebugOptions.desperate)
|
||||
- fprintf(stderr, "%s: Bad: pmid[%d] value[%d] "
|
||||
- "vindex=%d\n",
|
||||
- "__pmDecodeValueSet", i, j, vindex);
|
||||
+ fprintf(stderr, "__pmDecodeValueSet: PM_ERR_IPC: pmid[%d] value[%d] vindex=%d (max=%ld)\n",
|
||||
+ i, j, vindex, (long)((pduend-(char *)pdubuf) / sizeof(pdubuf[0])-1));
|
||||
return PM_ERR_IPC;
|
||||
}
|
||||
pduvbp = (pmValueBlock *)&pdubuf[vindex];
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
From 012a3c0efa3e17d803a91fd8a48adaac7f645f58 Mon Sep 17 00:00:00 2001
|
||||
From: Nathan Scott <nathans@redhat.com>
|
||||
Date: Fri, 9 Aug 2024 10:01:16 +1000
|
||||
Subject: [PATCH 14/19] src/libpcp/src/p_result.c: hardening of the result PDU
|
||||
handling
|
||||
|
||||
Updates to improve access to the result (store) PDU buffer; only
|
||||
access the numpmid and timestamp fields after verifying the length
|
||||
against the buffer size.
|
||||
|
||||
Addresses SUSE Issue B (part 2, the "similar issue note" for
|
||||
__pmDecodeResult_ctx()).
|
||||
|
||||
(cherry picked from commit e152a1179c5eae01e33787a1e89bc07432fc5821)
|
||||
---
|
||||
src/libpcp/src/p_result.c | 39 ++++++++++++++++++++++-----------------
|
||||
1 file changed, 22 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/src/libpcp/src/p_result.c b/src/libpcp/src/p_result.c
|
||||
index 1500fe97c..071b52bba 100644
|
||||
--- a/src/libpcp/src/p_result.c
|
||||
+++ b/src/libpcp/src/p_result.c
|
||||
@@ -763,6 +763,7 @@ __pmDecodeResult_ctx(__pmContext *ctxp, __pmPDU *pdubuf, __pmResult **result)
|
||||
int sts;
|
||||
int numpmid; /* number of metrics */
|
||||
int len = pdubuf[0];
|
||||
+ int v3archive;
|
||||
__pmPDU *vset;
|
||||
char *pduend; /* end pointer for incoming buffer */
|
||||
size_t bytes, nopad;
|
||||
@@ -773,38 +774,42 @@ __pmDecodeResult_ctx(__pmContext *ctxp, __pmPDU *pdubuf, __pmResult **result)
|
||||
if (ctxp != NULL)
|
||||
PM_ASSERT_IS_LOCKED(ctxp->c_lock);
|
||||
|
||||
- if (ctxp != NULL && ctxp->c_type == PM_CONTEXT_ARCHIVE && __pmLogVersion(ctxp->c_archctl->ac_log) == PM_LOG_VERS03) {
|
||||
- /*
|
||||
- * V3 archive
|
||||
- */
|
||||
- log_result_v3_t *lrp = (log_result_v3_t *)pdubuf;
|
||||
+ v3archive = (ctxp && ctxp->c_type == PM_CONTEXT_ARCHIVE &&
|
||||
+ __pmLogVersion(ctxp->c_archctl->ac_log) == PM_LOG_VERS03);
|
||||
+ if (v3archive) {
|
||||
pduend = (char *)pdubuf + len;
|
||||
bytes = sizeof(log_result_v3_t) - sizeof(__int32_t);
|
||||
+ }
|
||||
+ else { /* over the wire PDU or V2 archive */
|
||||
+ pduend = (char *)pdubuf + len;
|
||||
+ bytes = sizeof(result_t) - sizeof(__pmPDU);
|
||||
+ }
|
||||
+
|
||||
+ if (pduend - (char *)pdubuf < bytes) {
|
||||
+ if (pmDebugOptions.pdu && pmDebugOptions.desperate)
|
||||
+ fprintf(stderr, "%s: Bad: len=%d smaller than min %d\n",
|
||||
+ "__pmDecodeResult", len, (int)bytes);
|
||||
+ return PM_ERR_IPC;
|
||||
+ }
|
||||
+
|
||||
+ /* delayed until after buffer size check has been completed */
|
||||
+ if (v3archive) {
|
||||
+ log_result_v3_t *lrp = (log_result_v3_t *)pdubuf;
|
||||
+
|
||||
nopad = bytes;
|
||||
numpmid = ntohl(lrp->numpmid);
|
||||
__pmLoadTimestamp((__int32_t *)&lrp->sec[0], &stamp);
|
||||
vset = (__pmPDU *)lrp->data;
|
||||
}
|
||||
else {
|
||||
- /*
|
||||
- * over the wire PDU or V2 archive
|
||||
- */
|
||||
result_t *pp = (result_t *)pdubuf;
|
||||
- pduend = (char *)pdubuf + len;
|
||||
- bytes = sizeof(result_t) - sizeof(__pmPDU);
|
||||
+
|
||||
nopad = sizeof(pp->hdr) + sizeof(pp->timestamp) + sizeof(pp->numpmid);
|
||||
numpmid = ntohl(pp->numpmid);
|
||||
__pmLoadTimeval((__int32_t *)&pp->timestamp, &stamp);
|
||||
vset = pp->data;
|
||||
}
|
||||
|
||||
- if (pduend - (char *)pdubuf < bytes) {
|
||||
- if (pmDebugOptions.pdu && pmDebugOptions.desperate)
|
||||
- fprintf(stderr, "%s: Bad: len=%d smaller than min %d\n",
|
||||
- "__pmDecodeResult", len, (int)bytes);
|
||||
- return PM_ERR_IPC;
|
||||
- }
|
||||
-
|
||||
if (numpmid < 0 || numpmid > len) {
|
||||
if (pmDebugOptions.pdu && pmDebugOptions.desperate)
|
||||
fprintf(stderr, "%s: Bad: numpmid=%d negative or not smaller "
|
||||
--
|
||||
2.43.0
|
||||
|
||||
289
0015-src-libpcp-src-p_result.c-hardening-of-result-PDU-ev.patch
Normal file
289
0015-src-libpcp-src-p_result.c-hardening-of-result-PDU-ev.patch
Normal file
@@ -0,0 +1,289 @@
|
||||
From 5a7572c6e84dc5c7f42e170b90f275e96cfba77a Mon Sep 17 00:00:00 2001
|
||||
From: Nathan Scott <nathans@redhat.com>
|
||||
Date: Tue, 13 Aug 2024 06:54:25 +1000
|
||||
Subject: [PATCH 15/19] src/libpcp/src/p_result.c: hardening of result PDU
|
||||
event record decoding
|
||||
|
||||
Updates to improve access to the result (store) PDU buffer when it
|
||||
contains event records; adds buffer size overrun checking for each
|
||||
component that has variable sizes encoded within the buffer.
|
||||
|
||||
Addresses SUSE Issue D.
|
||||
|
||||
(cherry picked from commit 1f45c69bac2b08613fda6e5438c25cf889b3224f)
|
||||
[ddiss: rebase without 48ee02dc6 ("libpcp: extra diagnostics associated
|
||||
with PM_ERR_IPC")]
|
||||
Acked-by: David Disseldorp <ddiss@suse.de>
|
||||
---
|
||||
src/libpcp/src/endian.c | 13 +++-
|
||||
src/libpcp/src/internal.h | 4 +
|
||||
src/libpcp/src/p_result.c | 153 +++++++++++++++++++++++++++++++++++---
|
||||
3 files changed, 158 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/libpcp/src/endian.c b/src/libpcp/src/endian.c
|
||||
index 6dee5338a..fc6d931f9 100644
|
||||
--- a/src/libpcp/src/endian.c
|
||||
+++ b/src/libpcp/src/endian.c
|
||||
@@ -275,13 +275,17 @@ ntohEventArray(pmValueBlock * const vb, int highres)
|
||||
}
|
||||
|
||||
void
|
||||
-__ntohpmValueBlock(pmValueBlock * const vb)
|
||||
+__ntohpmValueBlock_hdr(pmValueBlock * const vb)
|
||||
{
|
||||
unsigned int *ip = (unsigned int *)vb;
|
||||
|
||||
/* Swab the first word, which contain vtype and vlen */
|
||||
*ip = ntohl(*ip);
|
||||
+}
|
||||
|
||||
+void
|
||||
+__ntohpmValueBlock_buf(pmValueBlock * const vb)
|
||||
+{
|
||||
switch (vb->vtype) {
|
||||
case PM_TYPE_U64:
|
||||
case PM_TYPE_64:
|
||||
@@ -305,6 +309,13 @@ __ntohpmValueBlock(pmValueBlock * const vb)
|
||||
break;
|
||||
}
|
||||
}
|
||||
+
|
||||
+void
|
||||
+__ntohpmValueBlock(pmValueBlock * const vb)
|
||||
+{
|
||||
+ __ntohpmValueBlock_hdr(vb);
|
||||
+ __ntohpmValueBlock_buf(vb);
|
||||
+}
|
||||
#endif
|
||||
|
||||
#ifndef __htonpmPDUInfo
|
||||
diff --git a/src/libpcp/src/internal.h b/src/libpcp/src/internal.h
|
||||
index d0a2fd3c0..1e38f4796 100644
|
||||
--- a/src/libpcp/src/internal.h
|
||||
+++ b/src/libpcp/src/internal.h
|
||||
@@ -60,6 +60,8 @@ extern int __pmGetDate(struct timespec *, char const *, struct timespec const *)
|
||||
#define __ntohpmLabel(a) /* noop */
|
||||
#define __htonpmValueBlock(a) /* noop */
|
||||
#define __ntohpmValueBlock(a) /* noop */
|
||||
+#define __ntohpmValueBlock_hdr(a) /* noop */
|
||||
+#define __ntohpmValueBlock_buf(a) /* noop */
|
||||
#define __htonf(a) /* noop */
|
||||
#define __ntohf(a) /* noop */
|
||||
#define __htond(a) /* noop */
|
||||
@@ -90,6 +92,8 @@ extern void __htonpmLabel(pmLabel * const) _PCP_HIDDEN;
|
||||
extern void __ntohpmLabel(pmLabel * const) _PCP_HIDDEN;
|
||||
extern void __htonpmValueBlock(pmValueBlock * const) _PCP_HIDDEN;
|
||||
extern void __ntohpmValueBlock(pmValueBlock * const) _PCP_HIDDEN;
|
||||
+extern void __ntohpmValueBlock_hdr(pmValueBlock * const) _PCP_HIDDEN;
|
||||
+extern void __ntohpmValueBlock_buf(pmValueBlock * const) _PCP_HIDDEN;
|
||||
extern void __htonf(char *) _PCP_HIDDEN; /* float */
|
||||
#define __ntohf(v) __htonf(v)
|
||||
#define __htond(v) __htonll(v) /* double */
|
||||
diff --git a/src/libpcp/src/p_result.c b/src/libpcp/src/p_result.c
|
||||
index 071b52bba..b5a49df68 100644
|
||||
--- a/src/libpcp/src/p_result.c
|
||||
+++ b/src/libpcp/src/p_result.c
|
||||
@@ -323,6 +323,124 @@ __pmSendHighResResult(int fd, int from, const __pmResult *result)
|
||||
return __pmSendHighResResult_ctx(NULL, fd, from, result);
|
||||
}
|
||||
|
||||
+/* Check that a network encoded event array is within a given buffer size */
|
||||
+int
|
||||
+__pmEventArrayCheck(pmValueBlock * const vb, int highres, int pmid, int value, size_t check)
|
||||
+{
|
||||
+ char *base;
|
||||
+ int r; /* records */
|
||||
+ int p; /* parameters in a record ... */
|
||||
+ int nrecords;
|
||||
+ int nparams;
|
||||
+
|
||||
+ if (highres) {
|
||||
+ pmHighResEventArray *hreap = (pmHighResEventArray *)vb;
|
||||
+ base = (char *)&hreap->ea_record[0];
|
||||
+ if (base > (char *)vb + check) {
|
||||
+ if (pmDebugOptions.pdu)
|
||||
+ fprintf(stderr, "__pmEventArrayCheck: PM_ERR_IPC: pmid[%d] value[%d] highres event records past end of PDU buffer\n",
|
||||
+ pmid, value);
|
||||
+ return PM_ERR_IPC;
|
||||
+ }
|
||||
+ nrecords = ntohl(hreap->ea_nrecords);
|
||||
+ }
|
||||
+ else {
|
||||
+ pmEventArray *eap = (pmEventArray *)vb;
|
||||
+ base = (char *)&eap->ea_record[0];
|
||||
+ if (base > (char *)vb + check) {
|
||||
+ if (pmDebugOptions.pdu)
|
||||
+ fprintf(stderr, "__pmEventArrayCheck: PM_ERR_IPC: pmid[%d] value[%d] event records past end of PDU buffer\n",
|
||||
+ pmid, value);
|
||||
+ return PM_ERR_IPC;
|
||||
+ }
|
||||
+ nrecords = ntohl(eap->ea_nrecords);
|
||||
+ }
|
||||
+
|
||||
+ /* walk packed event record array */
|
||||
+ for (r = 0; r < nrecords; r++) {
|
||||
+ unsigned int flags, type;
|
||||
+ size_t size, remaining;
|
||||
+
|
||||
+ remaining = check - (base - (char *)vb);
|
||||
+ if (highres) {
|
||||
+ pmHighResEventRecord *hrerp = (pmHighResEventRecord *)base;
|
||||
+ size = sizeof(hrerp->er_timestamp) + sizeof(hrerp->er_flags) +
|
||||
+ sizeof(hrerp->er_nparams);
|
||||
+ if (size > remaining) {
|
||||
+ if (pmDebugOptions.pdu)
|
||||
+ fprintf(stderr, "__pmEventArrayCheck: PM_ERR_IPC: pmid[%d] value[%d] record[%d] highres event record past end of PDU buffer\n",
|
||||
+ pmid, value, r);
|
||||
+ return PM_ERR_IPC;
|
||||
+ }
|
||||
+ nparams = ntohl(hrerp->er_nparams);
|
||||
+ flags = ntohl(hrerp->er_flags);
|
||||
+ }
|
||||
+ else {
|
||||
+ pmEventRecord *erp = (pmEventRecord *)base;
|
||||
+ size = sizeof(erp->er_timestamp) + sizeof(erp->er_flags) +
|
||||
+ sizeof(erp->er_nparams);
|
||||
+ if (size > remaining) {
|
||||
+ if (pmDebugOptions.pdu)
|
||||
+ fprintf(stderr, "__pmEventArrayCheck: PM_ERR_IPC: pmid[%d] value[%d] record[%d] event record past end of PDU buffer\n",
|
||||
+ pmid, value, r);
|
||||
+ return PM_ERR_IPC;
|
||||
+ }
|
||||
+ nparams = ntohl(erp->er_nparams);
|
||||
+ flags = ntohl(erp->er_flags);
|
||||
+ }
|
||||
+
|
||||
+ if (flags & PM_EVENT_FLAG_MISSED)
|
||||
+ nparams = 0;
|
||||
+
|
||||
+ base += size;
|
||||
+ remaining = check - (base - (char *)vb);
|
||||
+
|
||||
+ for (p = 0; p < nparams; p++) {
|
||||
+ __uint32_t *tp; /* points to int holding vtype/vlen */
|
||||
+ pmEventParameter *epp = (pmEventParameter *)base;
|
||||
+
|
||||
+ if (sizeof(pmEventParameter) > remaining) {
|
||||
+ if (pmDebugOptions.pdu)
|
||||
+ fprintf(stderr, "__pmEventArrayCheck: PM_ERR_IPC: pmid[%d] value[%d] record[%d] param[%d] event record past end of PDU buffer\n",
|
||||
+ pmid, value, r, p);
|
||||
+ return PM_ERR_IPC;
|
||||
+ }
|
||||
+
|
||||
+ tp = (__uint32_t *)&epp->ep_pmid;
|
||||
+ tp++; /* now points to ep_type/ep_len */
|
||||
+ *tp = ntohl(*tp);
|
||||
+ type = epp->ep_type;
|
||||
+ size = epp->ep_len;
|
||||
+ *tp = htonl(*tp); /* leave the buffer how we found it */
|
||||
+
|
||||
+ if (sizeof(pmID) + size > remaining) {
|
||||
+ if (pmDebugOptions.pdu)
|
||||
+ fprintf(stderr, "__pmEventArrayCheck: PM_ERR_IPC: pmid[%d] value[%d] record[%d] param[%d] event record past end of PDU buffer\n",
|
||||
+ pmid, value, r, p);
|
||||
+ return PM_ERR_IPC;
|
||||
+ }
|
||||
+
|
||||
+ base += sizeof(pmID) + PM_PDU_SIZE_BYTES(size);
|
||||
+
|
||||
+ size = 8; /* 64-bit types */
|
||||
+ switch (type) {
|
||||
+ case PM_TYPE_32:
|
||||
+ case PM_TYPE_U32:
|
||||
+ case PM_TYPE_FLOAT:
|
||||
+ size = 4; /* 32-bit types */
|
||||
+ break;
|
||||
+ }
|
||||
+ if (sizeof(pmID) + size > remaining) {
|
||||
+ if (pmDebugOptions.pdu)
|
||||
+ fprintf(stderr, "__pmEventArrayCheck: PM_ERR_IPC: pmid[%d] value[%d] record[%d] param[%d] event record past end of PDU buffer\n",
|
||||
+ pmid, value, r, p);
|
||||
+ return PM_ERR_IPC;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
#if defined(HAVE_64BIT_PTR)
|
||||
int
|
||||
__pmDecodeValueSet(__pmPDU *pdubuf, int pdulen, __pmPDU *data, char *pduend,
|
||||
@@ -336,7 +454,7 @@ __pmDecodeValueSet(__pmPDU *pdubuf, int pdulen, __pmPDU *data, char *pduend,
|
||||
int i, j;
|
||||
/*
|
||||
* Note: all sizes are in units of bytes ... beware that 'data' is in
|
||||
- * units of __pmPDU
|
||||
+ * units of __pmPDU (four bytes)
|
||||
*/
|
||||
int vsize; /* size of vlist_t's in PDU buffer */
|
||||
int nvsize; /* size of pmValue's after decode */
|
||||
@@ -433,7 +551,7 @@ __pmDecodeValueSet(__pmPDU *pdubuf, int pdulen, __pmPDU *data, char *pduend,
|
||||
return PM_ERR_IPC;
|
||||
}
|
||||
|
||||
- __ntohpmValueBlock(pduvbp);
|
||||
+ __ntohpmValueBlock_hdr(pduvbp);
|
||||
if (pduvbp->vlen < PM_VAL_HDR_SIZE ||
|
||||
pduvbp->vlen > pdulen) {
|
||||
if (pmDebugOptions.pdu && pmDebugOptions.desperate)
|
||||
@@ -442,13 +560,19 @@ __pmDecodeValueSet(__pmPDU *pdubuf, int pdulen, __pmPDU *data, char *pduend,
|
||||
i, j, pduvbp->vlen);
|
||||
return PM_ERR_IPC;
|
||||
}
|
||||
- if (pduvbp->vlen > (size_t)(pduend - (char *)pduvbp)) {
|
||||
+ if (pduvbp->vlen > check) {
|
||||
if (pmDebugOptions.pdu && pmDebugOptions.desperate)
|
||||
- fprintf(stderr, "%s: Bad: pmid[%d] value[%d] "
|
||||
- "pduvp past end of PDU buffer\n",
|
||||
- "__pmDecodeValueSet", i, j);
|
||||
+ fprintf(stderr, "__pmDecodeValueSet: PM_ERR_IPC: pmid[%d] value[%d] pduvp past end of PDU buffer\n",
|
||||
+ i, j);
|
||||
return PM_ERR_IPC;
|
||||
}
|
||||
+ if (pduvbp->vtype == PM_TYPE_HIGHRES_EVENT ||
|
||||
+ pduvbp->vtype == PM_TYPE_EVENT) {
|
||||
+ vindex = (pduvbp->vtype == PM_TYPE_HIGHRES_EVENT);
|
||||
+ if (__pmEventArrayCheck(pduvbp, vindex, i, j, check) < 0)
|
||||
+ return PM_ERR_IPC;
|
||||
+ }
|
||||
+ __ntohpmValueBlock_buf(pduvbp);
|
||||
vbsize += PM_PDU_SIZE_BYTES(pduvbp->vlen);
|
||||
if (pmDebugOptions.pdu && pmDebugOptions.desperate) {
|
||||
fprintf(stderr, " len: %d type: %d",
|
||||
@@ -700,7 +824,8 @@ __pmDecodeValueSet(__pmPDU *pdubuf, int pdulen, __pmPDU *data, char *pduend,
|
||||
"__pmDecodeValueSet", i, j);
|
||||
return PM_ERR_IPC;
|
||||
}
|
||||
- __ntohpmValueBlock(pduvbp);
|
||||
+
|
||||
+ __ntohpmValueBlock_hdr(pduvbp);
|
||||
if (pduvbp->vlen < PM_VAL_HDR_SIZE ||
|
||||
pduvbp->vlen > pdulen) {
|
||||
if (pmDebugOptions.pdu && pmDebugOptions.desperate)
|
||||
@@ -709,13 +834,19 @@ __pmDecodeValueSet(__pmPDU *pdubuf, int pdulen, __pmPDU *data, char *pduend,
|
||||
i, j, pduvbp->vlen);
|
||||
return PM_ERR_IPC;
|
||||
}
|
||||
- if (pduvbp->vlen > (size_t)(pduend - (char *)pduvbp)) {
|
||||
+ if (pduvbp->vlen > check) {
|
||||
if (pmDebugOptions.pdu && pmDebugOptions.desperate)
|
||||
- fprintf(stderr, "%s: Bad: pmid[%d] value[%d] "
|
||||
- "pduvp past end of PDU buffer\n",
|
||||
- "__pmDecodeValueSet", i, j);
|
||||
+ fprintf(stderr, "__pmDecodeValueSet: PM_ERR_IPC: pmid[%d] value[%d] pduvp past end of PDU buffer\n",
|
||||
+ i, j);
|
||||
return PM_ERR_IPC;
|
||||
}
|
||||
+ if (pduvbp->vtype == PM_TYPE_HIGHRES_EVENT ||
|
||||
+ pduvbp->vtype == PM_TYPE_EVENT) {
|
||||
+ vindex = (pduvbp->vtype == PM_TYPE_HIGHRES_EVENT);
|
||||
+ if (__pmEventArrayCheck(pduvbp, vindex, i, j, check) < 0)
|
||||
+ return PM_ERR_IPC;
|
||||
+ }
|
||||
+ __ntohpmValueBlock_buf(pduvbp);
|
||||
pduvp->value.pval = pduvbp;
|
||||
}
|
||||
}
|
||||
--
|
||||
2.43.0
|
||||
|
||||
126
0016-src-libpcp-src-p_result.c-rework-PDU-integrity-check.patch
Normal file
126
0016-src-libpcp-src-p_result.c-rework-PDU-integrity-check.patch
Normal file
@@ -0,0 +1,126 @@
|
||||
From e90ad45cf1c4bcc95c0a43f583643e01242891cf Mon Sep 17 00:00:00 2001
|
||||
From: Ken McDonell <kenj@kenj.id.au>
|
||||
Date: Sun, 25 Aug 2024 15:07:12 +1000
|
||||
Subject: [PATCH 16/19] src/libpcp/src/p_result.c: rework PDU integrity checks
|
||||
in __pmEventArrayCheck()
|
||||
|
||||
1. rework the final check in this routine to work with all data types
|
||||
|
||||
2. add #1, #2, ... annotations in error messages with similar (in some
|
||||
cases identical) wording so we know which guard is being tripped.
|
||||
|
||||
(cherry picked from commit 383b8f615a93b8bda43dd6f6b44c3e21b06e9703)
|
||||
---
|
||||
src/libpcp/src/p_result.c | 33 ++++++++++++++++++++++-----------
|
||||
1 file changed, 22 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/libpcp/src/p_result.c b/src/libpcp/src/p_result.c
|
||||
index b5a49df68..41481967b 100644
|
||||
--- a/src/libpcp/src/p_result.c
|
||||
+++ b/src/libpcp/src/p_result.c
|
||||
@@ -338,7 +338,7 @@ __pmEventArrayCheck(pmValueBlock * const vb, int highres, int pmid, int value, s
|
||||
base = (char *)&hreap->ea_record[0];
|
||||
if (base > (char *)vb + check) {
|
||||
if (pmDebugOptions.pdu)
|
||||
- fprintf(stderr, "__pmEventArrayCheck: PM_ERR_IPC: pmid[%d] value[%d] highres event records past end of PDU buffer\n",
|
||||
+ fprintf(stderr, "__pmEventArrayCheck #1: PM_ERR_IPC: pmid[%d] value[%d] highres event records past end of PDU buffer\n",
|
||||
pmid, value);
|
||||
return PM_ERR_IPC;
|
||||
}
|
||||
@@ -349,7 +349,7 @@ __pmEventArrayCheck(pmValueBlock * const vb, int highres, int pmid, int value, s
|
||||
base = (char *)&eap->ea_record[0];
|
||||
if (base > (char *)vb + check) {
|
||||
if (pmDebugOptions.pdu)
|
||||
- fprintf(stderr, "__pmEventArrayCheck: PM_ERR_IPC: pmid[%d] value[%d] event records past end of PDU buffer\n",
|
||||
+ fprintf(stderr, "__pmEventArrayCheck #2: PM_ERR_IPC: pmid[%d] value[%d] event records past end of PDU buffer\n",
|
||||
pmid, value);
|
||||
return PM_ERR_IPC;
|
||||
}
|
||||
@@ -368,7 +368,7 @@ __pmEventArrayCheck(pmValueBlock * const vb, int highres, int pmid, int value, s
|
||||
sizeof(hrerp->er_nparams);
|
||||
if (size > remaining) {
|
||||
if (pmDebugOptions.pdu)
|
||||
- fprintf(stderr, "__pmEventArrayCheck: PM_ERR_IPC: pmid[%d] value[%d] record[%d] highres event record past end of PDU buffer\n",
|
||||
+ fprintf(stderr, "__pmEventArrayCheck #3: PM_ERR_IPC: pmid[%d] value[%d] record[%d] highres event record past end of PDU buffer\n",
|
||||
pmid, value, r);
|
||||
return PM_ERR_IPC;
|
||||
}
|
||||
@@ -381,7 +381,7 @@ __pmEventArrayCheck(pmValueBlock * const vb, int highres, int pmid, int value, s
|
||||
sizeof(erp->er_nparams);
|
||||
if (size > remaining) {
|
||||
if (pmDebugOptions.pdu)
|
||||
- fprintf(stderr, "__pmEventArrayCheck: PM_ERR_IPC: pmid[%d] value[%d] record[%d] event record past end of PDU buffer\n",
|
||||
+ fprintf(stderr, "__pmEventArrayCheck #4: PM_ERR_IPC: pmid[%d] value[%d] record[%d] event record past end of PDU buffer\n",
|
||||
pmid, value, r);
|
||||
return PM_ERR_IPC;
|
||||
}
|
||||
@@ -401,7 +401,7 @@ __pmEventArrayCheck(pmValueBlock * const vb, int highres, int pmid, int value, s
|
||||
|
||||
if (sizeof(pmEventParameter) > remaining) {
|
||||
if (pmDebugOptions.pdu)
|
||||
- fprintf(stderr, "__pmEventArrayCheck: PM_ERR_IPC: pmid[%d] value[%d] record[%d] param[%d] event record past end of PDU buffer\n",
|
||||
+ fprintf(stderr, "__pmEventArrayCheck #5: PM_ERR_IPC: pmid[%d] value[%d] record[%d] param[%d] event record past end of PDU buffer\n",
|
||||
pmid, value, r, p);
|
||||
return PM_ERR_IPC;
|
||||
}
|
||||
@@ -415,24 +415,35 @@ __pmEventArrayCheck(pmValueBlock * const vb, int highres, int pmid, int value, s
|
||||
|
||||
if (sizeof(pmID) + size > remaining) {
|
||||
if (pmDebugOptions.pdu)
|
||||
- fprintf(stderr, "__pmEventArrayCheck: PM_ERR_IPC: pmid[%d] value[%d] record[%d] param[%d] event record past end of PDU buffer\n",
|
||||
+ fprintf(stderr, "__pmEventArrayCheck #6: PM_ERR_IPC: pmid[%d] value[%d] record[%d] param[%d] event record past end of PDU buffer\n",
|
||||
pmid, value, r, p);
|
||||
return PM_ERR_IPC;
|
||||
}
|
||||
|
||||
base += sizeof(pmID) + PM_PDU_SIZE_BYTES(size);
|
||||
|
||||
- size = 8; /* 64-bit types */
|
||||
+ /*
|
||||
+ * final check for the types below, ep_len should be 4 or
|
||||
+ * 8, but a malformed PDU could have smaller ep_len values
|
||||
+ * and then unpacking these types risk going past the end
|
||||
+ * of the PDU buffer
|
||||
+ */
|
||||
+ size = 0;
|
||||
switch (type) {
|
||||
case PM_TYPE_32:
|
||||
case PM_TYPE_U32:
|
||||
case PM_TYPE_FLOAT:
|
||||
size = 4; /* 32-bit types */
|
||||
break;
|
||||
+ case PM_TYPE_64:
|
||||
+ case PM_TYPE_U64:
|
||||
+ case PM_TYPE_DOUBLE:
|
||||
+ size = 8; /* 64-bit types */
|
||||
+ break;
|
||||
}
|
||||
- if (sizeof(pmID) + size > remaining) {
|
||||
+ if (size > 0 && sizeof(pmID) + size > remaining) {
|
||||
if (pmDebugOptions.pdu)
|
||||
- fprintf(stderr, "__pmEventArrayCheck: PM_ERR_IPC: pmid[%d] value[%d] record[%d] param[%d] event record past end of PDU buffer\n",
|
||||
+ fprintf(stderr, "__pmEventArrayCheck #7: PM_ERR_IPC: pmid[%d] value[%d] record[%d] param[%d] event record past end of PDU buffer\n",
|
||||
pmid, value, r, p);
|
||||
return PM_ERR_IPC;
|
||||
}
|
||||
@@ -968,7 +979,7 @@ __pmDecodeResult_ctx(__pmContext *ctxp, __pmPDU *pdubuf, __pmResult **result)
|
||||
return sts;
|
||||
}
|
||||
|
||||
- if (pmDebugOptions.pdu)
|
||||
+ if (pmDebugOptions.pdu && pmDebugOptions.desperate)
|
||||
__pmPrintResult_ctx(ctxp, stderr, pr);
|
||||
|
||||
/*
|
||||
@@ -1050,7 +1061,7 @@ __pmDecodeHighResResult_ctx(__pmContext *ctxp, __pmPDU *pdubuf, __pmResult **res
|
||||
return sts;
|
||||
}
|
||||
|
||||
- if (pmDebugOptions.pdu)
|
||||
+ if (pmDebugOptions.pdu && pmDebugOptions.desperate)
|
||||
__pmPrintResult_ctx(ctxp, stderr, pr);
|
||||
|
||||
/*
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 9d2ae45d47ce5efd51db0213b9ea57430b16d85f Mon Sep 17 00:00:00 2001
|
||||
From: Ken McDonell <kenj@kenj.id.au>
|
||||
Date: Tue, 27 Aug 2024 08:44:27 +1000
|
||||
Subject: [PATCH 17/19] src/libpcp/src/p_result.c: re-instate
|
||||
__pmPrintResult_ctx() call in __pmDecodeResult_ctx()
|
||||
|
||||
Historically was guarded by:
|
||||
pmDebugOptions.pdu
|
||||
but a recent commit changed this to
|
||||
pmDebugOptions.pdu && pmDebugOptions.desperate
|
||||
which caused unfortunate QA fallout, so revert to the historical guard.
|
||||
|
||||
(cherry picked from commit f682445925db7dc0ee0b4d780da55061aec775af)
|
||||
---
|
||||
src/libpcp/src/p_result.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/libpcp/src/p_result.c b/src/libpcp/src/p_result.c
|
||||
index 41481967b..878229f08 100644
|
||||
--- a/src/libpcp/src/p_result.c
|
||||
+++ b/src/libpcp/src/p_result.c
|
||||
@@ -979,7 +979,7 @@ __pmDecodeResult_ctx(__pmContext *ctxp, __pmPDU *pdubuf, __pmResult **result)
|
||||
return sts;
|
||||
}
|
||||
|
||||
- if (pmDebugOptions.pdu && pmDebugOptions.desperate)
|
||||
+ if (pmDebugOptions.pdu)
|
||||
__pmPrintResult_ctx(ctxp, stderr, pr);
|
||||
|
||||
/*
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From 2d4d9bbef4f661dd19dc6693bee7c18a16cf1791 Mon Sep 17 00:00:00 2001
|
||||
From: Ken McDonell <kenj@kenj.id.au>
|
||||
Date: Tue, 27 Aug 2024 08:50:34 +1000
|
||||
Subject: [PATCH 18/19] src/libpcp/src/p_result.c: re-instate
|
||||
__pmPrintResult_ctx() call in __pmDecodeHighResult_ctx()
|
||||
|
||||
Same change as made for __pmDecodeResult_ctx() in previous commit.
|
||||
|
||||
(cherry picked from commit de9f08eecea579ca52cf363b8a05840953d1043e)
|
||||
---
|
||||
src/libpcp/src/p_result.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/libpcp/src/p_result.c b/src/libpcp/src/p_result.c
|
||||
index 878229f08..97ead82d7 100644
|
||||
--- a/src/libpcp/src/p_result.c
|
||||
+++ b/src/libpcp/src/p_result.c
|
||||
@@ -1061,7 +1061,7 @@ __pmDecodeHighResResult_ctx(__pmContext *ctxp, __pmPDU *pdubuf, __pmResult **res
|
||||
return sts;
|
||||
}
|
||||
|
||||
- if (pmDebugOptions.pdu && pmDebugOptions.desperate)
|
||||
+ if (pmDebugOptions.pdu)
|
||||
__pmPrintResult_ctx(ctxp, stderr, pr);
|
||||
|
||||
/*
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 954c0dac431cd71ede4c03a58daa0db68a544078 Mon Sep 17 00:00:00 2001
|
||||
From: Ken McDonell <kenj@kenj.id.au>
|
||||
Date: Wed, 28 Aug 2024 07:21:32 +1000
|
||||
Subject: [PATCH 19/19] src/libpcp/src/p_result.c: 32-bit fix for SUSE Issue A
|
||||
|
||||
The previous commit 3fc598611 only applied to the 64-bit pointer
|
||||
version of __pmDecodeValueSet(), this commit makes the same change
|
||||
to the 32-bit pointer version.
|
||||
|
||||
Fixes qa/1518 failures on 32-bit platforms.
|
||||
|
||||
(cherry picked from commit eadb79aab46175d7a58d0fa88028408743e2a93f)
|
||||
[ddiss: rebase without 48ee02dc6 ("libpcp: extra diagnostics associated
|
||||
with PM_ERR_IPC")]
|
||||
Acked-by: David Disseldorp <ddiss@suse.de>
|
||||
---
|
||||
src/libpcp/src/p_result.c | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/libpcp/src/p_result.c b/src/libpcp/src/p_result.c
|
||||
index 97ead82d7..ade927ac2 100644
|
||||
--- a/src/libpcp/src/p_result.c
|
||||
+++ b/src/libpcp/src/p_result.c
|
||||
@@ -816,11 +816,10 @@ __pmDecodeValueSet(__pmPDU *pdubuf, int pdulen, __pmPDU *data, char *pduend,
|
||||
} else {
|
||||
/* salvage pmValueBlocks from end of PDU */
|
||||
vindex = ntohl(pduvp->value.lval);
|
||||
- if (vindex < 0 || vindex > pdulen) {
|
||||
+ if (vindex < 0 || (char *)&pdubuf[vindex] >= pduend) {
|
||||
if (pmDebugOptions.pdu && pmDebugOptions.desperate)
|
||||
- fprintf(stderr, "%s: Bad: pmid[%d] value[%d] "
|
||||
- "vindex=%d\n",
|
||||
- "__pmDecodeValueSet", i, j, vindex);
|
||||
+ fprintf(stderr, "__pmDecodeValueSet: PM_ERR_IPC: pmid[%d] value[%d] vindex=%d (max=%ld)\n",
|
||||
+ i, j, vindex, (long)((pduend-(char *)pdubuf) / sizeof(pdubuf[0])-1));
|
||||
return PM_ERR_IPC;
|
||||
}
|
||||
pduvbp = (pmValueBlock *)&pdubuf[vindex];
|
||||
--
|
||||
2.43.0
|
||||
|
||||
BIN
pcp-6.2.0.tar.gz
LFS
Normal file
BIN
pcp-6.2.0.tar.gz
LFS
Normal file
Binary file not shown.
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:189d6cb56e6b8e2eae5fab93c11d1a58cdc3ec8c8860b52aa8819c79a7fedc9e
|
||||
size 52260893
|
||||
91
pcp.changes
91
pcp.changes
@@ -1,68 +1,33 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 14 20:25:32 UTC 2024 - Martin Schreiner <martin.schreiner@suse.com>
|
||||
Wed Apr 30 13:56:01 UTC 2025 - Cathy Hu <cathy.hu@suse.com>
|
||||
|
||||
- Remove 0011-disable-redis-proxying-by-default.patch. This patch has
|
||||
been merged upstream during the 6.2.1 release.
|
||||
- Add new subpackage: pcp-pmda-uwsgi.
|
||||
- Upgrade to 6.2.1. Changelog:
|
||||
- PMDA additions, enhancements and bug fixes:
|
||||
pmdauwsgi: (new) instrumentation from uWSGI servers
|
||||
pmdalinux: new hugepage metrics from sysfs (fixed size hugepages)
|
||||
pmdalinux: new filesys.uuid and filesys.type metrics
|
||||
pmdalinux: new TcpExt metrics from /proc/net/netstat
|
||||
pmdalinux: new softnet metrics from newer kernel versions
|
||||
pmdalinux: new /proc/vmstat khugepaged metrics
|
||||
pmdabpf: updates to add eBPF networking metrics for pcp-atop
|
||||
pmdaopenmetrics: fix script error diagnostic cascading exception
|
||||
- Client tools and utilities:
|
||||
pcp2openmetrics: (new) push PCP metrics in OpenMetrics format
|
||||
pmcheck: (new) interrogate and control PCP components
|
||||
pmcheck: Redis server detection and agent recommendation
|
||||
pmcheck: PostgreSQL server detection and agent recommendation
|
||||
pmcheck: uwSGI server detection and agent recommendation
|
||||
pcp-atopsar: fix TZ mishandling relating to day-crossover
|
||||
pcp-dstat: fix an I/O config typo, sum reads and writes
|
||||
pcp-htop: sync latest htop-3.3.0 fixes
|
||||
pmrep.conf: use bpf instead of bcc pmda for proc net metrics
|
||||
pmrep.conf: proc-essential cosmetic improvements
|
||||
pmrep.conf: remove vmeff field from sar -B config
|
||||
pmrepconf: use pmrep-internal representations for each metric
|
||||
- Server-side utilities and log management scripts:
|
||||
pmlogger: bizarre timezone fix (github #1936)
|
||||
pmlogger: improve handling of a change in metadata semantics
|
||||
pmlogdump: add support for multi-archive contexts
|
||||
pmproxy: disable Redis protocol proxying by default
|
||||
runaspcp: remove hard-coded "pcp" for user and group
|
||||
init scripts: drop conditonal use of setpriv(1) or runuser(1)
|
||||
- libpcp, libpcp_pmda, libpcp_mmv, libpcp_web and language bindings:
|
||||
libpcp: fix logmeta.c SEGV with V3 archives
|
||||
libpcp: fix memleak on repeated __pmFixPMNSHashTab calls
|
||||
libpcp: add pmgetopt pmflush() call for warnings
|
||||
libpcp: fixes for V3 archives and multi-archive contexts
|
||||
libpcp: export __pmLogChangeArchive() interface to tools
|
||||
libpcp: fix for PMNS with multi-archive contexts
|
||||
libpcp: small derived metrics bug fix (github #1921)
|
||||
- Build, infrastructure and packaging updates:
|
||||
Linux MX distro support (Debian without systemd)
|
||||
riscv: configure pmdabpf_arch value correctly
|
||||
tar packages: fix perl modules install in postinstall script
|
||||
eBPF updates: add submodule for blazesym, sync to latest
|
||||
debian build: add postrm for pcp-zeroconf
|
||||
build: removed cppcheck from 'make check', too flakey
|
||||
container: Fedora 40 container testing added
|
||||
constainer: fixed Fedora base image location (quay.io)
|
||||
build: add support for riscv64 to pcp rpm spec files
|
||||
- Security Enhanced Linux:
|
||||
selinux policy: small tweak for pmie signal handling
|
||||
- Documentation:
|
||||
man pages: document pmlogger_check and pmlogger_daily SaveLogs
|
||||
man pages: man-spell and corrections
|
||||
docs: updated donations page with new fiscal sponsor details
|
||||
- Add missing dependencies for selinux-policy-targeted in
|
||||
%post for pcp-selinux (bsc#1242052)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 14 15:36:47 UTC 2024 - Cathy Hu <cathy.hu@suse.com>
|
||||
Tue Mar 25 15:22:15 UTC 2025 - Martin Schreiner <martin.schreiner@suse.com>
|
||||
|
||||
- Enable custom pcp-selinux module (bsc#1223260)
|
||||
- Enable custom pcp-selinux module (bsc#1237260)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 21 08:05:48 UTC 2025 - pgajdos@suse.com
|
||||
|
||||
- Fix symlink race; CVE-2024-45770; (bsc#1230552)
|
||||
+ 0012-src-pmpost-pmpost.c-guard-against-possible-symlink-a.patch
|
||||
- Fix pmstore corruption; CVE-2024-45769 (bsc#1230551)
|
||||
+ 0013-src-libpcp-src-p_result.c-correct-buffer-over-run-te.patch
|
||||
+ 0014-src-libpcp-src-p_result.c-hardening-of-the-result-PD.patch
|
||||
+ 0015-src-libpcp-src-p_result.c-hardening-of-result-PDU-ev.patch
|
||||
+ 0016-src-libpcp-src-p_result.c-rework-PDU-integrity-check.patch
|
||||
+ 0017-src-libpcp-src-p_result.c-re-instate-__pmPrintResult.patch
|
||||
+ 0018-src-libpcp-src-p_result.c-re-instate-__pmPrintResult.patch
|
||||
+ 0019-src-libpcp-src-p_result.c-32-bit-fix-for-SUSE-Issue-.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 27 14:42:34 UTC 2024 - Martin Schreiner <martin.schreiner@suse.com>
|
||||
|
||||
- Replace dejavu-fonts with liberation-fonts.
|
||||
- Fix for bsc#1232695.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 15 10:51:06 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
@@ -73,13 +38,13 @@ Mon Apr 15 10:51:06 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 3 14:49:06 UTC 2024 - Martin Schreiner <martin.schreiner@suse.com>
|
||||
|
||||
- Add fix for bsc#1222121:
|
||||
- Add fix for bsc#1222121 CVE-2024-3019:
|
||||
* 0011-disable-redis-proxying-by-default.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
------------------------------------------------------------------
|
||||
Mon Apr 1 01:21:44 UTC 2024 - Martin Schreiner <martin.schreiner@suse.com>
|
||||
|
||||
- Upgrade to 6.2.0 (bsc#1217826):
|
||||
- Upgrade to 6.2.0 (bsc#1217826 CVE-2023-6917, bsc#1217783):
|
||||
* Changes from pcp-6.2.0:
|
||||
- Client tools and utilities:
|
||||
pmlogger: default to creating version 3 PCP archives
|
||||
|
||||
313
pcp.spec
313
pcp.spec
@@ -66,7 +66,7 @@ Summary: System-level performance monitoring and performance management
|
||||
License: %{license_gplv2plus} AND %{license_lgplv2plus} AND %{license_cc_by}
|
||||
Group: %{pcp_gr}
|
||||
Name: pcp
|
||||
Version: 6.2.1
|
||||
Version: 6.2.0
|
||||
Release: 0
|
||||
%global buildversion 1
|
||||
|
||||
@@ -88,6 +88,18 @@ Patch5: 0005-SUSE-fy-pmsnap-control-path.patch
|
||||
Patch6: 0006-pmsnap-control-var-www-srv-www.patch
|
||||
# PATCH-FIX-UPSTREAM, ddiss@suse.de
|
||||
Patch10: 0010-services-switch-logutil-and-pmieutil-scripts-from-ty.patch
|
||||
# PATCH-FIX-UPSTREAM (bsc#1222121), martin.schreiner@suse.com
|
||||
Patch11: 0011-disable-redis-proxying-by-default.patch
|
||||
# PATCH-FIX-UPSTREAM (bsc#1230552), acked: ddiss@suse.de
|
||||
Patch12: 0012-src-pmpost-pmpost.c-guard-against-possible-symlink-a.patch
|
||||
# PATCH-FIX-UPSTREAM (bsc#1230551), acked: ddiss@suse.de
|
||||
Patch13: 0013-src-libpcp-src-p_result.c-correct-buffer-over-run-te.patch
|
||||
Patch14: 0014-src-libpcp-src-p_result.c-hardening-of-the-result-PD.patch
|
||||
Patch15: 0015-src-libpcp-src-p_result.c-hardening-of-result-PDU-ev.patch
|
||||
Patch16: 0016-src-libpcp-src-p_result.c-rework-PDU-integrity-check.patch
|
||||
Patch17: 0017-src-libpcp-src-p_result.c-re-instate-__pmPrintResult.patch
|
||||
Patch18: 0018-src-libpcp-src-p_result.c-re-instate-__pmPrintResult.patch
|
||||
Patch19: 0019-src-libpcp-src-p_result.c-32-bit-fix-for-SUSE-Issue-.patch
|
||||
|
||||
%global disable_selinux 0
|
||||
%if 0%{?suse_version} < 1600
|
||||
@@ -543,6 +555,9 @@ applications to easily retrieve and process any subset of that data.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-conf
|
||||
#
|
||||
@@ -563,6 +578,9 @@ Performance Co-Pilot (PCP) run-time configuration
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-libs
|
||||
#
|
||||
@@ -651,6 +669,9 @@ Performance Co-Pilot (PCP) headers for development.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-devel
|
||||
#
|
||||
@@ -672,6 +693,9 @@ Performance Co-Pilot (PCP) documentation and tools for development.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-testsuite
|
||||
#
|
||||
@@ -698,6 +722,9 @@ Quality assurance test suite for Performance Co-Pilot (PCP).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# perl-PCP-PMDA. This is the PCP agent perl binding.
|
||||
#
|
||||
@@ -721,6 +748,9 @@ an application, etc.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# perl-PCP-MMV
|
||||
#
|
||||
@@ -745,6 +775,10 @@ and analysis with pmchart, pmie, pmlogger and other PCP tools.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# perl-PCP-LogImport
|
||||
#
|
||||
@@ -766,6 +800,10 @@ they can be replayed with standard PCP monitoring tools.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# perl-PCP-LogSummary
|
||||
#
|
||||
@@ -790,6 +828,10 @@ exporting this data into third-party tools (e.g. spreadsheets).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-import-sar2pcp
|
||||
#
|
||||
@@ -814,6 +856,10 @@ into standard PCP archive logs for replay with any PCP monitoring tool.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-import-iostat2pcp
|
||||
#
|
||||
@@ -879,6 +925,10 @@ into standard PCP archive logs for replay with any PCP monitoring tool.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-import-ganglia2pcp
|
||||
#
|
||||
@@ -902,6 +952,10 @@ into standard PCP archive logs for replay with any PCP monitoring tool.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-import-collectl2pcp
|
||||
#
|
||||
@@ -964,6 +1018,10 @@ See https://www.elastic.co/community for further details.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-export-pcp2graphite
|
||||
#
|
||||
@@ -987,6 +1045,10 @@ to graphite (http://graphite.readthedocs.org).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# pcp-export-pcp2influxdb
|
||||
#
|
||||
%package export-pcp2influxdb
|
||||
@@ -1011,6 +1073,10 @@ to InfluxDB (https://influxdata.com/time-series-platform/influxdb).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-export-pcp2json
|
||||
#
|
||||
@@ -1032,6 +1098,10 @@ in JSON format.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-export-pcp2spark
|
||||
#
|
||||
@@ -1091,6 +1161,10 @@ in XML format.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-export-pcp2zabbix
|
||||
#
|
||||
@@ -1198,6 +1272,10 @@ collecting metrics about the ActiveMQ message broker.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-activemq
|
||||
#
|
||||
# pcp-pmda-bind2
|
||||
@@ -1219,6 +1297,10 @@ collecting metrics from BIND (Berkeley Internet Name Domain).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-bind2
|
||||
#
|
||||
# pcp-pmda-redis
|
||||
@@ -1281,6 +1363,9 @@ collecting metrics about bonded network interfaces.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-bonding
|
||||
#
|
||||
# pcp-pmda-dbping
|
||||
@@ -1303,6 +1388,10 @@ collecting metrics about the Database response times and Availablility.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-dbping
|
||||
#
|
||||
# pcp-pmda-ds389
|
||||
@@ -1329,6 +1418,9 @@ collecting metrics about a 389 Directory Server.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-ds389
|
||||
#
|
||||
# pcp-pmda-ds389log
|
||||
@@ -1351,6 +1443,9 @@ collecting metrics from a 389 Directory Server log.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-ds389log
|
||||
#
|
||||
# pcp-pmda-gpfs
|
||||
@@ -1372,6 +1467,9 @@ collecting metrics about the GPFS filesystem.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-gpfs
|
||||
#
|
||||
# pcp-pmda-gpsd
|
||||
@@ -1394,6 +1492,9 @@ collecting metrics about a GPS Daemon.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-gpsd
|
||||
#
|
||||
# pcp-pmda-docker
|
||||
@@ -1411,6 +1512,9 @@ collecting metrics using the Docker daemon REST API.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-docker
|
||||
#
|
||||
# pcp-pmda-lustre
|
||||
@@ -1432,6 +1536,10 @@ collecting metrics about the Lustre Filesystem.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-lustre
|
||||
#
|
||||
# pcp-pmda-lustrecomm
|
||||
@@ -1454,6 +1562,10 @@ collecting metrics about the Lustre Filesystem Comms.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-lustrecomm
|
||||
#
|
||||
# pcp-pmda-memcache
|
||||
@@ -1476,6 +1588,10 @@ collecting metrics about Memcached.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-memcache
|
||||
#
|
||||
# pcp-pmda-mysql
|
||||
@@ -1502,6 +1618,10 @@ collecting metrics about the MySQL database.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-mysql
|
||||
#
|
||||
# pcp-pmda-named
|
||||
@@ -1524,6 +1644,10 @@ collecting metrics about the Named nameserver.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-named
|
||||
# pcp-pmda-netfilter
|
||||
#
|
||||
@@ -1545,6 +1669,10 @@ collecting metrics about the Netfilter packet filtering framework.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-netfilter
|
||||
#
|
||||
# pcp-pmda-news
|
||||
@@ -1567,6 +1695,10 @@ collecting metrics about Usenet News.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-news
|
||||
#
|
||||
# pcp-pmda-nginx
|
||||
@@ -1590,6 +1722,10 @@ collecting metrics about the Nginx Webserver.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-nginx
|
||||
#
|
||||
# pcp-pmda-oracle
|
||||
@@ -1613,6 +1749,10 @@ collecting metrics about the Oracle database.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-oracle
|
||||
#
|
||||
# pcp-pmda-pdns
|
||||
@@ -1635,6 +1775,10 @@ collecting metrics about the PowerDNS.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-pdns
|
||||
#
|
||||
# pcp-pmda-postfix
|
||||
@@ -1674,6 +1818,10 @@ collecting metrics about the Postfix (MTA).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-postfix
|
||||
#
|
||||
# pcp-pmda-rsyslog
|
||||
@@ -1701,6 +1849,10 @@ collecting metrics about Rsyslog.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-rsyslog
|
||||
#
|
||||
# pcp-pmda-samba
|
||||
@@ -1723,6 +1875,10 @@ collecting metrics about Samba.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-samba
|
||||
#
|
||||
# pcp-pmda-slurm
|
||||
@@ -1785,6 +1941,10 @@ collecting metrics for VMware.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-vmware
|
||||
#
|
||||
# pcp-pmda-zimbra
|
||||
@@ -1804,6 +1964,10 @@ collecting metrics about Zimbra.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-zimbra
|
||||
#
|
||||
# pcp-pmda-dm
|
||||
@@ -1843,6 +2007,10 @@ collecting metrics about the gluster filesystem.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-gluster
|
||||
#
|
||||
# pcp-pmda-nfsclient
|
||||
@@ -1901,6 +2069,10 @@ collecting metrics about compressed swap.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-zswap
|
||||
#
|
||||
# pcp-pmda-unbound
|
||||
@@ -1922,6 +2094,10 @@ collecting metrics about the Unbound DNS Resolver.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-unbound
|
||||
#
|
||||
# pcp-pmda-mic
|
||||
@@ -1943,6 +2119,10 @@ collecting metrics about Intel MIC cards.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-mic
|
||||
#
|
||||
# pcp-pmda-haproxy
|
||||
@@ -2009,6 +2189,10 @@ collecting metrics about Elasticsearch.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-elasticsearch
|
||||
#
|
||||
# pcp-pmda-openvswitch
|
||||
@@ -2030,6 +2214,10 @@ collecting metrics from Open vSwitch.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-openvswitch
|
||||
#
|
||||
# pcp-pmda-rabbitmq
|
||||
@@ -2103,6 +2291,10 @@ extracting metrics from OpenMetrics (https://openmetrics.io/) endpoints.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-openmetrics
|
||||
#
|
||||
# pcp-pmda-lmsensors
|
||||
@@ -2127,6 +2319,10 @@ collecting metrics about the Linux hardware monitoring sensors.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-lmsensors
|
||||
#
|
||||
# pcp-pmda-netcheck
|
||||
@@ -2191,23 +2387,6 @@ interface to provide information on the last level cache.
|
||||
# end pcp-pmda-resctrl
|
||||
%endif
|
||||
|
||||
#
|
||||
# pcp-pmda-uwsgi
|
||||
#
|
||||
%package pmda-uwsgi
|
||||
Summary: Performance Co-Pilot (PCP) metrics uWSGI servers
|
||||
License: %{license_gplv2plus}
|
||||
Group: %{pcp_gr}
|
||||
URL: https://pcp.io
|
||||
%if !0%{?suse_version}
|
||||
Requires: %{lib_pkg} = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%description pmda-uwsgi
|
||||
This package contains the PCP Performance Metrics Domain Agent (PMDA)
|
||||
for collecting metrics from uWSGI servers.
|
||||
|
||||
# end pcp-pmda-uwsgi
|
||||
%if !%{disable_json}
|
||||
#
|
||||
# pcp-pmda-json
|
||||
@@ -2253,6 +2432,10 @@ collecting metrics about the Apache webserver.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-apache
|
||||
#
|
||||
# pcp-pmda-bash
|
||||
@@ -2274,6 +2457,10 @@ collecting metrics about the Bash shell.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-bash
|
||||
#
|
||||
# pcp-pmda-cifs
|
||||
@@ -2294,6 +2481,10 @@ collecting metrics about the Common Internet Filesytem.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-cifs
|
||||
#
|
||||
# pcp-pmda-cisco
|
||||
@@ -2315,6 +2506,10 @@ collecting metrics about Cisco routers.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-cisco
|
||||
#
|
||||
# pcp-pmda-gfs2
|
||||
@@ -2335,6 +2530,10 @@ collecting metrics about the Global Filesystem v2.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-gfs2
|
||||
#
|
||||
# pcp-pmda-logger
|
||||
@@ -2357,6 +2556,10 @@ supports both sampled and event-style metrics.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-logger
|
||||
#
|
||||
# pcp-pmda-mailq
|
||||
@@ -2378,6 +2581,10 @@ collecting metrics about email queues managed by sendmail.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-mailq
|
||||
#
|
||||
# pcp-pmda-mounts
|
||||
@@ -2399,6 +2606,10 @@ collecting metrics about filesystem mounts.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-mounts
|
||||
#
|
||||
# pcp-pmda-nvidia-gpu
|
||||
@@ -2419,6 +2630,10 @@ collecting metrics about Nvidia GPUs.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-nvidia-gpu
|
||||
#
|
||||
# pcp-pmda-roomtemp
|
||||
@@ -2480,6 +2695,10 @@ collecting metrics about Sendmail traffic.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-sendmail
|
||||
#
|
||||
# pcp-pmda-shping
|
||||
@@ -2502,6 +2721,10 @@ arbitrary shell commands.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-shping
|
||||
#
|
||||
# pcp-pmda-smart
|
||||
@@ -2521,6 +2744,10 @@ smartmontools package.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-smart
|
||||
#
|
||||
# pcp-pmda-sockets
|
||||
@@ -2540,6 +2767,10 @@ collecting per-socket statistics, making use of utilities such as 'ss'.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-sockets
|
||||
#
|
||||
# pcp-pmda-hacluster
|
||||
@@ -2558,6 +2789,10 @@ collecting metrics about linux High Availability (HA) Clusters.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-hacluster
|
||||
#
|
||||
# pcp-pmda-summary
|
||||
@@ -2617,6 +2852,10 @@ collecting metrics about trace performance data in applications.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-trace
|
||||
#
|
||||
# pcp-pmda-weblog
|
||||
@@ -2639,6 +2878,10 @@ collecting metrics about web server logs.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-weblog
|
||||
# end C pmdas
|
||||
|
||||
@@ -2720,10 +2963,8 @@ Group: %{pcp_gr}
|
||||
URL: https://pcp.io
|
||||
%if !0%{?suse_version}
|
||||
Requires: %{lib_pkg} = %{version}-%{release}
|
||||
Requires: liberation-sans-fonts
|
||||
%else
|
||||
Requires: dejavu-fonts
|
||||
%endif
|
||||
Requires: liberation-fonts
|
||||
BuildRequires: hicolor-icon-theme
|
||||
|
||||
%description gui
|
||||
@@ -2770,6 +3011,8 @@ License: %{license_gplv2plus} AND %{license_cc_by}
|
||||
Group: Applications/System
|
||||
URL: https://pcp.io
|
||||
BuildRequires: selinux-policy-devel
|
||||
BuildRequires: selinux-policy-targeted
|
||||
%{?selinux_requires}
|
||||
%if 0%{?rhel} == 5
|
||||
BuildRequires: setools
|
||||
%else
|
||||
@@ -3347,19 +3590,8 @@ fi
|
||||
%{_datadir}/pcp/lib/rc-proc.sh
|
||||
%{_datadir}/pcp/lib/rc-proc.sh.minimal
|
||||
%{_datadir}/pcp/lib/unlockpmns
|
||||
%{_datadir}/pcp/lib/checkproc.sh
|
||||
%{_datadir}/pcp/lib/pmcheck/pmcd
|
||||
%{_datadir}/pcp/lib/pmcheck/pmda-overhead
|
||||
%{_datadir}/pcp/lib/pmcheck/pmda-postgresql
|
||||
%{_datadir}/pcp/lib/pmcheck/pmda-redis
|
||||
%{_datadir}/pcp/lib/pmcheck/pmda-sample
|
||||
%{_datadir}/pcp/lib/pmcheck/pmda-uwsgi
|
||||
%{_datadir}/pcp/lib/pmcheck/pmie
|
||||
%{_datadir}/pcp/lib/pmcheck/pmlogger
|
||||
%{_datadir}/pcp/lib/pmcheck/pmproxy
|
||||
%{_datadir}/pcp/lib/pmcheck/zeroconf
|
||||
%dir %{_datadir}/pcp/lib/pmcheck
|
||||
|
||||
### 6.2.0 BEGIN
|
||||
%config %{_sysusersdir}/pcp-testsuite.conf
|
||||
%config %{_sysusersdir}/pcp.conf
|
||||
%config %{_tmpfilesdir}/pcp-reboot-init.conf
|
||||
@@ -3422,6 +3654,7 @@ fi
|
||||
%{_usr}/share/pcp/htop/screens/exitsnoop
|
||||
%{_usr}/share/pcp/htop/screens/filesystems
|
||||
%{_usr}/share/pcp/htop/screens/opensnoop
|
||||
|
||||
%dir %{_libexecdir}/pcp/pmdas/farm
|
||||
%dir %{_libexecdir}/pcp/pmdas/overhead
|
||||
%dir %{_localstatedir}/lib/pcp/config/pmlogredact
|
||||
@@ -3432,6 +3665,7 @@ fi
|
||||
%dir %{_sysconfdir}/pcp/overhead/examples
|
||||
%dir %{_sysconfdir}/pcp/pmlogredact
|
||||
%dir %{_usr}/share/pcp/htop/screens
|
||||
### 6.2.0 END
|
||||
|
||||
%dir %attr(0775,pcp,pcp) %{_logsdir}
|
||||
%attr(0775,pcp,pcp) %{_logsdir}/pmcd
|
||||
@@ -3956,19 +4190,6 @@ fi
|
||||
%dir %{_localstatedir}/lib/pcp/pmdas/resctrl
|
||||
%endif
|
||||
|
||||
%files pmda-uwsgi
|
||||
%config(noreplace) %{_confdir}/uwsgi/uwsgi.conf
|
||||
%{_libexecdir}/pcp/pmdas/uwsgi/Install
|
||||
%{_libexecdir}/pcp/pmdas/uwsgi/Remove
|
||||
%{_libexecdir}/pcp/pmdas/uwsgi/pmdauwsgi.python
|
||||
%{_localstatedir}/lib/pcp/pmdas/uwsgi/Install
|
||||
%{_localstatedir}/lib/pcp/pmdas/uwsgi/Remove
|
||||
%{_localstatedir}/lib/pcp/pmdas/uwsgi/pmdauwsgi.python
|
||||
%{_localstatedir}/lib/pcp/pmdas/uwsgi/uwsgi.conf
|
||||
%dir %{_confdir}/uwsgi
|
||||
%dir %{_libexecdir}/pcp/pmdas/uwsgi
|
||||
%dir %{_localstatedir}/lib/pcp/pmdas/uwsgi
|
||||
|
||||
%if !%{disable_json}
|
||||
%files pmda-json
|
||||
%{_pmdasdir}/json
|
||||
|
||||
Reference in New Issue
Block a user