[sos41][networking] May invoke devlink module when not loaded depending on how the kernel is configured

Bug #1923661 reported by Eric Desrochers
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sosreport (Ubuntu)
Fix Released
Medium
Eric Desrochers
Bionic
Fix Released
Medium
Heitor Alves de Siqueira
Focal
Fix Released
Medium
Heitor Alves de Siqueira
Groovy
Won't Fix
Medium
Heitor Alves de Siqueira
Hirsute
Fix Released
Medium
Heitor Alves de Siqueira

Bug Description

[Impact]

sos's networking plugin may trigger the devlink kernel module to load. We don't want sos to modify/change/alter the state of a machine whatsoever, especially during troubleshooting. But it may be the case for the networking plugin, depending on the running kernel configuration.

As a side note, this is also causing Bionic autopkgtest to fails as it is tested w/ 4.15 series kernel by default. 'simple.sh' (sos testsuite part of the autopkgtest) will report a failure as follows:

"new kernel modules loaded during execution"

[Test case]

On a 4.15 kernel (Bionic)

On a bare metal system:
root@srv:~# lsmod | grep -i devlink
root@srv:~# sos report -o networking
root@srv:~# lsmod | grep -i devlink
devlink 45056 0

Not reproducible on Bionic w/ 5.4 kernel for instance

Reason:
config-4.15.0-140-generic:CONFIG_MAY_USE_DEVLINK=m
config-5.4.0-70-generic:CONFIG_NET_DEVLINK=y

CONFIG_MAY_USE_DEVLINK:
Drivers using the devlink infrastructure should have a dependency on MAY_USE_DEVLINK to ensure they do not cause link errors when devlink is a loadable module and the driver using it is built-in.

[Where problem could occur]
The fix first checks for /sys/class/devlink before adding the devlink commands to the networking plugin. If this path changes in future kernels, or it becomes possible to collect devlink information without this path being present, we'll miss that information in sosreports. It's also possible that in future kernels, additional modules get loaded due to the devlink commands, so we should also be on the lookout for those changing the system state between sos executions.

The above are very unlikely scenarios in any case, and we should get previous notice of such changes. The patchset will also be tested with the now fixed autopkgtests, and that should give a bit more confidence in the fixes.

[Other information]
This is fixed by upstream commit:
- c90315e23c57 "[networking] check for the presence of devlink"

Upstream issues:
https://github.com/sosreport/sos/commit/e7801c5bf50d129f93559f8c459a3c96bba1375e

Eric Desrochers (slashd)
tags: added: seg sts
description: updated
summary: [sos41] networking plugin may invoke devlink module when not loaded
- depending on how the kernel is configure
+ depending on how the kernel is configured
summary: - [sos41] networking plugin may invoke devlink module when not loaded
- depending on how the kernel is configured
+ [sos41][networking] May invoke devlink module when not loaded depending
+ on how the kernel is configured
Eric Desrochers (slashd)
description: updated
Eric Desrochers (slashd)
Changed in sosreport (Ubuntu Hirsute):
assignee: nobody → Eric Desrochers (slashd)
status: New → In Progress
Eric Desrochers (slashd)
description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sosreport - 4.1-1ubuntu2

---------------
sosreport (4.1-1ubuntu2) impish; urgency=medium

  * d/p/series:
    - Re-order patches in numerical order.

  * d/p/0003-ubuntu-policy-fix-upload.patch:
    - Fix sos archive upload to UA Canonical server
      (LP: #1923209)

  * d/p/0004-chrony-configuration-can-now-be-fragmented.patch:
    - Chrony 4.0, first introduced in Hirsute, support
      fragmented configuration.

  * d/p/0005-global-drop-plugin-version.patch:
    - Removal of plugins versionning features as it generate
      unhelpful noise. (LP: #1922925)

  * d/p/0006-networking-check-presence-of-devlink.patch:
    - On certain kernel configuration, devlink cmds may
      trigger the module to load automatically. This will
      also prevent simple.sh, part of the autopkgtest, in
      Bionic to fail due to devlink kernel conf in 4.15.
      (LP: #1923661)

  * d/p/0007-sosnode-avoid-checksum-cleanup-if-no-archive.patch:
    - Fixes an exception propagation from `cleanup()`
      where an attempt to look for and remove a checksum
      file was made when an archive was not generated.
      (LP: #1923641)

 -- Eric Desrochers <email address hidden> Mon, 26 Apr 2021 15:34:42 -0400

Changed in sosreport (Ubuntu):
status: In Progress → Fix Released
Eric Desrochers (slashd)
Changed in sosreport (Ubuntu Groovy):
status: New → In Progress
Changed in sosreport (Ubuntu Focal):
status: New → In Progress
Changed in sosreport (Ubuntu Bionic):
status: New → In Progress
assignee: nobody → Eric Desrochers (slashd)
Changed in sosreport (Ubuntu Focal):
assignee: nobody → Eric Desrochers (slashd)
Changed in sosreport (Ubuntu Groovy):
assignee: nobody → Eric Desrochers (slashd)
Changed in sosreport (Ubuntu Bionic):
assignee: Eric Desrochers (slashd) → Heitor Alves de Siqueira (halves)
Changed in sosreport (Ubuntu Focal):
assignee: Eric Desrochers (slashd) → Heitor Alves de Siqueira (halves)
Changed in sosreport (Ubuntu Groovy):
assignee: Eric Desrochers (slashd) → Heitor Alves de Siqueira (halves)
Changed in sosreport (Ubuntu Hirsute):
assignee: Eric Desrochers (slashd) → Heitor Alves de Siqueira (halves)
Eric Desrochers (slashd)
description: updated
Changed in sosreport (Ubuntu Bionic):
importance: Undecided → Medium
Changed in sosreport (Ubuntu Groovy):
importance: Undecided → Medium
Changed in sosreport (Ubuntu Hirsute):
importance: Undecided → Medium
Changed in sosreport (Ubuntu Focal):
importance: Undecided → Medium
description: updated
Revision history for this message
Heitor Alves de Siqueira (halves) wrote :
Revision history for this message
Heitor Alves de Siqueira (halves) wrote :
Revision history for this message
Heitor Alves de Siqueira (halves) wrote :
Revision history for this message
Heitor Alves de Siqueira (halves) wrote :
Changed in sosreport (Ubuntu Groovy):
status: In Progress → Won't Fix
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Eric, or anyone else affected,

Accepted sosreport into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/4.1-1ubuntu1.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in sosreport (Ubuntu Hirsute):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-hirsute
Changed in sosreport (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Eric, or anyone else affected,

Accepted sosreport into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/4.1-1ubuntu0.20.04.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Eric, or anyone else affected,

Accepted sosreport into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/4.1-1ubuntu0.18.04.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in sosreport (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (sosreport/4.1-1ubuntu1.2)

All autopkgtests for the newly accepted sosreport (4.1-1ubuntu1.2) for hirsute have finished running.
The following regressions have been reported in tests triggered by the package:

sosreport/4.1-1ubuntu1.2 (s390x)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/hirsute/update_excuses.html#sosreport

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (sosreport/4.1-1ubuntu0.20.04.3)

All autopkgtests for the newly accepted sosreport (4.1-1ubuntu0.20.04.3) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

sosreport/4.1-1ubuntu0.20.04.3 (amd64, ppc64el, arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#sosreport

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Dariusz Gadomski (dgadomski) wrote :

There are regressions reported in autopkgtests for amd64, arm64 and ppc64el:
Failures within each test:
   test_mask: IP address not obfuscated in all places

I'm not sure if that's caused by the change. I'd appreciate an opinion from Eric or Heitor.

Thanks!

Revision history for this message
Eric Desrochers (slashd) wrote :

It's just a matter to retry them until they work. It's due to the autopkgtest env for 'exotic' arches.

- Eric

Revision history for this message
Eric Desrochers (slashd) wrote :

It happens at every SRU ^

Mathew Hodson (mhodson)
Changed in sosreport (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Heitor Alves de Siqueira (halves) wrote :

Verified Bionic according to test case from description:

root@b-sos:~# dpkg -l | grep sosreport
ii sosreport 4.1-1ubuntu0.18.04.3 amd64 Set of tools to gather troubleshooting data from a system
root@b-sos:~# lsmod | grep -i devlink
root@b-sos:~# sos report -o networking
[...]
root@b-sos:~# lsmod | grep -i devlink
root@b-sos:~#

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Heitor Alves de Siqueira (halves) wrote :

Verified Focal according to test case from description:

root@f-sos:~# dpkg -l | grep sosreport
ii sosreport 4.1-1ubuntu0.20.04.3 amd64 Set of tools to gather troubleshooting data from a system
root@f-sos:~# lsmod | grep -i devlink
root@f-sos:~# sos report -o networking
[...]
root@f-sos:~# lsmod | grep -i devlink
root@f-sos:~#

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Heitor Alves de Siqueira (halves) wrote :

Verified Hirsute according to test case from description:

root@h-sos:~# dpkg -l | grep sos
ii sosreport 4.1-1ubuntu1.2 amd64 Set of tools to gather troubleshooting data from a system
root@h-sos:~# lsmod | grep -i devlink
root@h-sos:~# sos report -o networking
[...]
root@h-sos:~# lsmod | grep -i devlink
root@h-sos:~#

tags: added: verification-done verification-done-hirsute
removed: verification-needed verification-needed-hirsute
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sosreport - 4.1-1ubuntu1.2

---------------
sosreport (4.1-1ubuntu1.2) hirsute; urgency=medium

  * d/p/0004-networking-check-presence-of-devlink.patch:
    - Fix devlink module load by networking plugin (LP: #1923661)

 -- Heitor Alves de Siqueira <email address hidden> Tue, 08 Jun 2021 20:22:26 +0000

Changed in sosreport (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for sosreport has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Ok, I'll hint the sosreport test and proceed with release into focal-updates.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sosreport - 4.1-1ubuntu0.20.04.3

---------------
sosreport (4.1-1ubuntu0.20.04.3) focal; urgency=medium

  * d/p/0004-networking-check-presence-of-devlink.patch:
    - Fix devlink module load by networking plugin (LP: #1923661)

 -- Heitor Alves de Siqueira <email address hidden> Tue, 08 Jun 2021 20:16:09 +0000

Changed in sosreport (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sosreport - 4.1-1ubuntu0.18.04.3

---------------
sosreport (4.1-1ubuntu0.18.04.3) bionic; urgency=medium

  * d/p/0004-networking-check-presence-of-devlink.patch:
    - Fix devlink module load by networking plugin (LP: #1923661)

 -- Heitor Alves de Siqueira <email address hidden> Tue, 08 Jun 2021 20:10:27 +0000

Changed in sosreport (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.