Merge ~lucaskanashiro/ubuntu/+source/munin:xenial-lp-1673357 into ubuntu/+source/munin:ubuntu/xenial-devel

Proposed by Lucas Kanashiro
Status: Merged
Approved by: Lucas Kanashiro
Approved revision: 4cbef057d9e355b823a0917660f7c61605c11e18
Merged at revision: 4cbef057d9e355b823a0917660f7c61605c11e18
Proposed branch: ~lucaskanashiro/ubuntu/+source/munin:xenial-lp-1673357
Merge into: ubuntu/+source/munin:ubuntu/xenial-devel
Diff against target: 55 lines (+33/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/0005-Do-not-report-speed-below-0-for-network-devices.patch (+25/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Sergio Durigan Junior (community) Approve
Canonical Server MOTU reviewers Pending
Review via email: mp+387713@code.launchpad.net

Description of the change

Fixes LP #1673357 in Xenial. This MP applies a simple upstream patch to address the reported issue. I also filled the SRU template in the bug description.

Here is a PPA with the proposed package:

https://launchpad.net/~lucaskanashiro/+archive/ubuntu/xenial-munin/

and autopkgtest output:

autopkgtest [17:58:22]: @@@@@@@@@@@@@@@@@@@@ summary
run-tests PASS

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

I'll review this one.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Reproduced the problem:

$ munin-run if_enp5s0 config | tail -n 3
up.max -1000000
up.info Traffic of the enp5s0 interface. Maximum speed is -1 Mb/s.
down.max -1000000

And here's what I get when I use the PPA version of the package:

$ munin-run if_enp5s0 config | tail -n 3
up.cdef up,8,*
up.min 0
up.info Traffic of the enp5s0 interface. Unable to determine interface speed. Please install ethtool, wireless-tools, mii-tool or whatever is appropriate for the interface.

The problem seems to be that my VM is not properly reporting the speed of its network interface:

$ cat /sys/class/net/enp5s0/speed
-1

In this specific case, I consider that the problem has been fixed: the warning is much more informative than reporting "-1" as the speed.

The changes themselves look fine, so this is a +1 from me. Thanks!

review: Approve
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks Sergio! Package uploaded:

$ git push pkg upload/2.0.25-2ubuntu0.16.04.4
Enumerating objects: 16, done.
Counting objects: 100% (16/16), done.
Delta compression using up to 8 threads
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 1.78 KiB | 364.00 KiB/s, done.
Total 11 (delta 7), reused 0 (delta 0)
To ssh://git.launchpad.net/ubuntu/+source/munin
 * [new tag] upload/2.0.25-2ubuntu0.16.04.4 -> upload/2.0.25-2ubuntu0.16.04.4

$ dput ubuntu ../munin_2.0.25-2ubuntu0.16.04.4_source.changes
Checking signature on .changes
gpg: ../munin_2.0.25-2ubuntu0.16.04.4_source.changes: Valid signature from F823A2729883C97C
Checking signature on .dsc
gpg: ../munin_2.0.25-2ubuntu0.16.04.4.dsc: Valid signature from F823A2729883C97C
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading munin_2.0.25-2ubuntu0.16.04.4.dsc: done.
  Uploading munin_2.0.25-2ubuntu0.16.04.4.debian.tar.xz: done.
  Uploading munin_2.0.25-2ubuntu0.16.04.4_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index d9be16e..a8c2e8e 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+munin (2.0.25-2ubuntu0.16.04.4) xenial; urgency=medium
7+
8+ * Add patch to avoid reporting speed below 0 for network devices
9+ (LP: #1673357).
10+
11+ -- Lucas Kanashiro <kanashiro@ubuntu.com> Mon, 20 Jul 2020 10:04:10 -0300
12+
13 munin (2.0.25-2ubuntu0.16.04.3) xenial-security; urgency=medium
14
15 * SECURITY REGRESSION: log spamming issue (LP: #1669764)
16diff --git a/debian/patches/0005-Do-not-report-speed-below-0-for-network-devices.patch b/debian/patches/0005-Do-not-report-speed-below-0-for-network-devices.patch
17new file mode 100644
18index 0000000..783424e
19--- /dev/null
20+++ b/debian/patches/0005-Do-not-report-speed-below-0-for-network-devices.patch
21@@ -0,0 +1,25 @@
22+From: Lucas Kanashiro <lucas.kanashiro@canonical.com>
23+Date: Mon, 20 Jul 2020 09:58:22 -0300
24+Subject: Do not report speed below 0 for network devices
25+
26+Origin: upstream, https://github.com/munin-monitoring/munin/commit/78c3c3aa
27+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1673357
28+Reviewed-by: Lucas Kanashiro <kanashiro@ubuntu.com>
29+Last-Updated: 2020-07-20
30+---
31+ plugins/node.d.linux/if_.in | 2 +-
32+ 1 file changed, 1 insertion(+), 1 deletion(-)
33+
34+diff --git a/plugins/node.d.linux/if_.in b/plugins/node.d.linux/if_.in
35+index 7718979..34b57ef 100644
36+--- a/plugins/node.d.linux/if_.in
37++++ b/plugins/node.d.linux/if_.in
38+@@ -91,7 +91,7 @@ findspeed_mbps() {
39+ # iwlist first)
40+ if [[ -r /sys/class/net/$INTERFACE/speed ]]; then
41+ SPEED=$(cat /sys/class/net/$INTERFACE/speed 2>/dev/null)
42+- if [[ -n "$SPEED" ]]; then
43++ if [[ "$SPEED" -gt 0 ]]; then
44+ echo $SPEED
45+ return
46+ fi
47diff --git a/debian/patches/series b/debian/patches/series
48index 0a35848..37dd39c 100644
49--- a/debian/patches/series
50+++ b/debian/patches/series
51@@ -2,3 +2,4 @@
52 CVE-2017-6188.patch
53 CVE-2017-6188-2.patch
54 CVE-2017-6188-3.patch
55+0005-Do-not-report-speed-below-0-for-network-devices.patch

Subscribers

People subscribed via source and target branches