Bug 1151190 - AUDIT-TRACKER: ksysguard5 would like cap_net_raw+ep on its network traffic helper
Summary: AUDIT-TRACKER: ksysguard5 would like cap_net_raw+ep on its network traffic he...
Status: RESOLVED FIXED
: 1161732 (view as bug list)
Alias: None
Product: SUSE Security Incidents
Classification: Novell Products
Component: Audits (show other bugs)
Version: unspecified
Hardware: Other Other
: P5 - None : Normal
Target Milestone: ---
Assignee: Malte Kraus
QA Contact: Security Team bot
URL:
Whiteboard:
Keywords:
Depends on: 1152634 1152638 1152639 1152641 1152642 1152644 1152646
Blocks:
  Show dependency treegraph
 
Reported: 2019-09-18 12:11 UTC by Fabian Vogt
Modified: 2023-04-06 09:35 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Vogt 2019-09-18 12:11:57 UTC
With Plasma 5.17, ksysguard has the capability to show the network traffic for each process.
As this is not directly possible using the usual user capabilities, there is a new helper binary which needs cap_net_raw+ep: %{_libdir}/libexec/ksysguard/ksgrd_network_helper

Got introduced here: https://cgit.kde.org/ksysguard.git/commit/?id=842d64591d8481ae10fe1db2c906640ec3d5c7d3

Latest code is here: https://cgit.kde.org/ksysguard.git/tree/plugins/process/network/helper
Comment 1 Malte Kraus 2019-09-30 11:59:44 UTC
I'll look into this.
Comment 3 Malte Kraus 2019-10-01 09:59:35 UTC
Something else I noticed which isn't security-relevant: The computation of addresses in Packet::parseIPv6() is buggy: it's using & instead of | so IPv6 addresses will always be parsed as all-zero.

It also relies on implicit integer promotion of char to unsigned integer - so the upper bits of the address will be zero on platforms where an 'unsigned int' has less than 32bits.
Comment 6 Fabian Vogt 2019-10-02 11:39:06 UTC
Upstream responded with a patch: https://phabricator.kde.org/D24359

Can you have a look?
Comment 7 Fabian Vogt 2019-10-08 09:58:08 UTC
(In reply to Fabian Vogt from comment #6)
> Upstream responded with a patch: https://phabricator.kde.org/D24359
> 
> Can you have a look?

Note that the (soft) deadline for the final 5.17 is this Thursday, so having this merged until then would be good. Otherwise the final 5.17 would ship with the currently identified issues unfixed.
Comment 8 Fabian Vogt 2019-11-15 10:17:58 UTC
All of the found issues were fixed in 5.17.1 a while ago, so can this be whilelisted finally?
Comment 9 Malte Kraus 2019-11-18 09:26:40 UTC
Fuzzing found one more bug [1]. I'll start the whitelisting process now, under the assumption that you'll include the patch in any submissions.


1: https://phabricator.kde.org/D25363
Comment 10 Swamp Workflow Management 2019-11-18 11:10:11 UTC
This is an autogenerated message for OBS integration:
This bug (1151190) was mentioned in
https://build.opensuse.org/request/show/749269 Factory / permissions
Comment 11 Fabian Vogt 2020-01-24 14:05:22 UTC
It appears like the path in the permissions package is wrong.

It has to be "/usr/lib64/libexec/ksysguard/ksgrd_network_helper", but the "lib64"/"lib" part is missing: https://github.com/openSUSE/permissions/blob/7f3d0e12f527632ced175b1f8c68ee80a40269d3/profiles/permissions.secure#L437
Comment 12 Fabian Vogt 2020-01-24 14:05:28 UTC
*** Bug 1161732 has been marked as a duplicate of this bug. ***
Comment 13 Malte Kraus 2020-01-27 09:50:11 UTC
I can adjust the whitelisting, but isn't /usr/libexec actually the correct path? Did this get rolled back?
Comment 14 Fabian Vogt 2020-01-27 10:05:39 UTC
(In reply to Malte Kraus from comment #13)
> I can adjust the whitelisting, but isn't /usr/libexec actually the correct
> path? Did this get rolled back?

Apparently: https://build.opensuse.org/package/rdiff/Base:System/rpm?linkrev=base&rev=516

So it might change in the future, but for current TW and Leap 15.2 (which this is needed for as well), /usr/lib(64)/libexec is the right path.

Additionally, there's a bug in ksysguard.spec which uses /usr/lib(64)/libexec/kf5/... in the chkstat call, I'll fix that.
Comment 15 Swamp Workflow Management 2020-01-27 10:40:05 UTC
This is an autogenerated message for OBS integration:
This bug (1151190) was mentioned in
https://build.opensuse.org/request/show/767607 Factory / ksysguard5
Comment 17 Malte Kraus 2020-02-03 09:10:29 UTC
The updated whitelisting with /usr/lib{64,}/libexec paths just got rejected:
https://build.opensuse.org/request/show/767672

Fabian, can you please talk with dimstar and figure out the correct paths?
Comment 18 Fabian Vogt 2020-02-04 10:27:36 UTC
(In reply to Malte Kraus from comment #17)
> The updated whitelisting with /usr/lib{64,}/libexec paths just got rejected:
> https://build.opensuse.org/request/show/767672
> 
> Fabian, can you please talk with dimstar and figure out the correct paths?

Done, please reopen/resubmit the sr - no change necessary.
Comment 19 Malte Kraus 2020-03-03 14:05:58 UTC
closing
Comment 20 OBSbugzilla Bot 2020-11-16 10:20:07 UTC
This is an autogenerated message for OBS integration:
This bug (1151190) was mentioned in
https://build.opensuse.org/request/show/848830 15.2 / permissions
Comment 21 Swamp Workflow Management 2020-11-23 14:29:18 UTC
openSUSE-RU-2020:1999-1: An update that has one recommended fix can now be installed.

Category: recommended (moderate)
Bug References: 1151190
CVE References: 
JIRA References: 
Sources used:
openSUSE Leap 15.2 (src):    permissions-20181224-lp152.14.3.1, rpmlint-mini-1.10-lp152.7.3.1
Comment 22 OBSbugzilla Bot 2021-11-17 15:40:46 UTC
This is an autogenerated message for OBS integration:
This bug (1151190) was mentioned in
https://build.opensuse.org/request/show/931965 15.3 / permissions
Comment 23 Swamp Workflow Management 2021-12-02 20:18:38 UTC
openSUSE-SU-2021:1520-1: An update that solves three vulnerabilities and has 27 fixes is now available.

Category: security (moderate)
Bug References: 1028975,1029961,1093414,1133678,1148788,1150345,1150366,1151190,1157498,1160285,1160764,1161335,1161779,1163588,1167163,1169614,1171164,1171173,1171569,1171580,1171686,1171879,1171882,1173221,1174504,1175720,1175867,1178475,1178476,1183669
CVE References: CVE-2019-3687,CVE-2019-3688,CVE-2020-8013
JIRA References: 
Sources used:
openSUSE Leap 15.3 (src):    permissions-20200127-lp153.24.3.1