[sru] sosreport does not obfuscate a mac address when --mask is used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sosreport |
Fix Released
|
Unknown
|
|||
sosreport (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Bionic |
Fix Released
|
Medium
|
Unassigned | ||
Focal |
Fix Released
|
Medium
|
Unassigned | ||
Impish |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
[Impact]
sos 4.3 has a regression in mac address obfuscation. The file etc/netplan/
[TEST PLAN]
Documentation for Special Cases:
https:/
[WHERE PROBLEMS COULD OCCUR]
Since we are changing the regex parser code in sos/cleaner/
-------------
[Other Info]
Upstream issue is https:/
Upstream MR is https:/
Reproducer details:
sos 4.2 shows correct behavior. testing shows..
/etc/netplan/
network:
ethernets:
ens3:
dhcp4: true
match:
version: 2
4.2 sos contains the file but with the obfuscated mac address. correct behavior.
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/
# network: {config: disabled}
network:
ethernets:
ens3:
dhcp4: true
match:
version: 2
-------
4.3 testing shows the bug,
the /etc/netplan/
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/
# network: {config: disabled}
network:
ethernets:
ens3:
dhcp4: true
match:
version: 2
---
generated sosreport (run with --mask) contains
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/
# network: {config: disabled}
network:
ethernets:
ens3:
dhcp4: true
match:
version: 2
So the mac address isnt being obfuscated.
Whats interesting is.. sosreport-
{
"hostname_map": {
},
"ip_map": {
"10.0.2.3": "100.0.0.2/24",
"5.4.0.26": "58.82.14.73",
"5.4.0.99": "74.19.96.35",
},
"mac_map": {
},
"keyword_map": {},
"username_map": {}
}
But somehow the file itself is collected without changing the ip address from original ("52:54:
----
Tested with upstream sos:
root@autopkgtes
origin https:/
origin https:/
root@autopkgtes
AUTHORS bin docs LICENSE man MANIFEST.in plugins_overview.py po README.md requirements.txt setup.py snap sos sos.conf sos.spec tests tmpfilesd-sos.conf
root@autopkgtes
root@autopkgtes
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/
# network: {config: disabled}
network:
ethernets:
ens3:
dhcp4: true
match:
version: 2
Note it contains the mac addr 52:54:00:12:34:56
Now we will run the sos report, (upstream version)
oot@autopkgtest
sos sos-collector sosreport
root@autopkgtes
/home/nikhil/
root@autopkgtes
sosreport (version 4.3)
This command will collect system configuration and diagnostic
information from this Ubuntu system.
For more information on Canonical visit:
Community Website : https:/
Commercial Support : https:/
The generated archive may contain data considered sensitive and its
content should be reviewed by the originating organization before being
passed to any third party.
No changes will be made to system configuration.
Press ENTER to continue, or CTRL-C to quit.
Optionally, please enter the case id that you are generating this report for []:
Setting up archive ...
Setting up plugins ...
[plugin:
[plugin:
[plugin:
[plugin:networking] skipped command 'ip -s macsec show': required kmods missing: macsec. Use '--allow-
[plugin:networking] skipped command 'ss -peaonmi': required kmods missing: unix_diag, udp_diag, netlink_diag, af_packet_diag, inet_diag, xsk_diag, tcp_diag. Use '--allow-
[plugin:ufw] skipped command 'ufw status numbered': required kmods missing: bpfilter, iptable_filter.
[plugin:ufw] skipped command 'ufw app list': required kmods missing: bpfilter, iptable_filter.
[plugin:wireless] skipped command 'iw list': required kmods missing: cfg80211.
[plugin:wireless] skipped command 'iw dev': required kmods missing: cfg80211.
[plugin:wireless] skipped command 'iwconfig': required kmods missing: cfg80211.
[plugin:wireless] skipped command 'iwlist scanning': required kmods missing: cfg80211.
Running plugins. Please wait ...
Finishing plugins [Running: systemd]
Finished running plugins
Found 1 total reports to obfuscate, processing up to 4 concurrently
sosreport-
sosreport-
Successfully obfuscated 1 report(s)
Creating compressed archive...
A mapping of obfuscated elements is available at
/tmp/sosreport
Your sosreport has been generated and saved in:
/tmp/sosreport
Size 2.27MiB
Owner root
sha256 e9d19933cfed512
Please send this file to your support representative.
Lets open the file and see if mac address in that file is left unobfuscated,
root@autopkgtes
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/
# network: {config: disabled}
network:
ethernets:
ens3:
dhcp4: true
match:
version: 2
root@autopkgtes
Note,
root@autopkgtes
total 9448
drwx------ 3 root root 4096 Mar 2 15:48 systemd-
drwx------ 3 root root 4096 Mar 2 15:48 systemd-
drwx------ 3 root root 4096 Mar 2 15:48 systemd-
drwx------ 3 root root 4096 Mar 2 15:48 systemd-
-rwxr-xr-x 1 root root 691 Mar 2 15:48 eofcat
-rwxr-xr-x 1 root root 285 Mar 2 15:48 autopkgtest-reboot
-rwxr-xr-x 1 root root 269 Mar 2 15:48 autopkgtest-
drwxrwxrwt 5 root root 4096 Mar 2 15:48 autopkgtest.RixDKr
drwx------ 10 root root 4096 Mar 2 15:48 sosreport-
drwx------ 3 root root 4096 Mar 2 15:48 systemd-
drwx------ 3 root root 4096 Mar 2 15:48 systemd-
-rw------- 1 root root 1645 Mar 2 15:49 sosreport-
-rw------- 1 root root 2389116 Mar 2 15:50 sosreport-
drwxr-xr-x 12 root root 4096 Mar 2 15:50 sosreport_test
drwx------ 12 root root 4096 Mar 2 15:55 sosreport-
-rw------- 1 root root 2409380 Mar 2 15:55 sosreport-
-rw-r--r-- 1 root root 65 Mar 2 15:55 sosreport-
-rw------- 1 root root 2411848 Mar 2 15:58 sosreport-
-rw-r--r-- 1 root root 65 Mar 2 15:58 sosreport-
drwx------ 12 root root 4096 Mar 2 15:58 sosreport-
-rw------- 1 root root 1645 Mar 2 15:59 sosreport-
-rw------- 1 root root 2378324 Mar 2 15:59 sosreport-
-rw------- 1 root root 65 Mar 2 15:59 sosreport-
root@autopkgtes
{
"hostname_map": {
},
"ip_map": {
"10.0.2.3": "100.0.0.2/24",
"5.4.0.26": "13.16.68.51",
"5.4.0.99": "37.44.72.50",
},
"mac_map": {
},
"keyword_map": {},
"username_map": {}
-------------
Changed in sosreport (Ubuntu Bionic): | |
importance: | Undecided → Medium |
Changed in sosreport (Ubuntu Focal): | |
importance: | Undecided → Medium |
Changed in sosreport (Ubuntu Impish): | |
importance: | Undecided → Medium |
Changed in sosreport (Ubuntu): | |
assignee: | nobody → nikhil kshirsagar (nkshirsagar) |
Changed in sosreport (Ubuntu Bionic): | |
assignee: | nobody → nikhil kshirsagar (nkshirsagar) |
Changed in sosreport (Ubuntu Focal): | |
assignee: | nobody → nikhil kshirsagar (nkshirsagar) |
Changed in sosreport (Ubuntu Impish): | |
assignee: | nobody → nikhil kshirsagar (nkshirsagar) |
Changed in sosreport: | |
status: | Unknown → New |
summary: |
- sosreport does not obfuscate a mac address even with --mask is used + [sru] sosreport does not obfuscate a mac address even with --mask is + used |
summary: |
- [sru] sosreport does not obfuscate a mac address even with --mask is - used + [sru] sosreport does not obfuscate a mac address when --mask is used |
Changed in sosreport (Ubuntu Impish): | |
milestone: | none → impish-updates |
Changed in sosreport (Ubuntu Focal): | |
milestone: | none → focal-updates |
Changed in sosreport (Ubuntu Bionic): | |
milestone: | none → bionic-updates |
Changed in sosreport (Ubuntu): | |
milestone: | none → jammy-updates |
description: | updated |
Changed in sosreport: | |
status: | New → Fix Released |
Ubuntu 21.10 (Impish Indri) has reached end of life, so this bug will not be fixed for that specific release.